On 2.11.2013 17:49, Julia Lawall wrote:
>> +@r depends on report || context@
>> +expression E;
>> +position p;
>> +@@
>> +if@p (E) {}
>
> There should be a * in front of the if, to support context mode.
Josh, will you send a v3 with the above fix?
Thanks,
Michal
> +@r depends on report || context@
> +expression E;
> +position p;
> +@@
> +if@p (E) {}
There should be a * in front of the if, to support context mode.
julia
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
This script finds code like this, with an unnecessary if:
if (foo) {}
Provides report mode only, since patching often eliminates conditionals
that contain TODO comments or similar.
Signed-off-by: Josh Triplett
---
v2: Drop patch mode.
scripts/coccinelle/misc/unnecessary-if.cocci | 23 +++