> Fatal error: exception Failure("meta: parse error:
>  = File "false_declare_completion.cocci", line 27, column 14,  charpos = 511
>     around = 'DECLARE_COMPLETION', whole content = declarer name 
> DECLARE_COMPLETION;
> ")
> ...

OK, it's not super intuitive, but the problem is that it wants declarer
names, like typedefs, to be declared once and only once.  And in deciding
about this, it doesn't take into account the dependencies on virtual
rules.  So if you use -D patch, then it complains about a declaration in a
case that says depends on !patch.  And if you remove the declarer name
declaration in the latter rule, when you use eg -D report, it takes into
account the declaration in the previous, but disabled, -D patch rule.

So if you drop the second declarer name declaration, everything will be
fine.

The fact that declaring a typedef, declarer name, or iterator name once
was good enough was supposed to make things easier, but it seems to just
make things confusing.  Maybe I should get rid of this feature, or at
least not complain about redeclarations that are consistent with the
previous one.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to