On 06/09/2017 10:28 AM, Marc-André Lureau wrote: > sadly, coccinelle is unabarebly slow on my machine,
Odd. It's pretty fast for this series: $ time spatch --sp-file scripts/coccinelle/qobject.cocci \ --macro-file scripts/cocci-macro-file.h --dir . --in-place 2>/dev/null real 0m2.136s user 0m2.003s sys 0m0.125s This is on Fedora 25. Although I _will_ grant that the time taken is also dependent on the complexity of the script it is running on (some scripts are inherently slower than others, and coccinelle takes shortcuts like grepping for which files to even fully analyze, but not all scripts are conducive to those shortcuts). > not easy to grasp, and > thereby fails to catch a lot of cases.. I agree with the 'not easy to grasp'. As for not catching cases, you HAVE to use the --macro-file scripts/cocci-macro-file.h to avoid a lot of skipped files. But even so, you're probably right that it still misses some things (although it often catches far more than "grep in anger" is able to do). > I am looking at alternative from > clang tools/lib, by curiosity. I'll be interested to see if it produces any (easy-to-reproduce) cleanup results. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature