>> elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci 
>> show_same_statements7.cocci
>> …
>> Variable find.p2 in duplicated_code cannot be used as both a position and a 
>> constraint
>
> I think that you have to declare find.p1 and find.p2 on a subsequent line.

I have observed the same error message then.


I have adjusted the SmPL code also in the following way.

@duplicated_code@
identifier work;
position find.p1, find.p2;
position pos != find.p2;
statement s1, s2;
type T;
@@
…


elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci 
show_same_statements7x.cocci
…
meta: parse error:
  File "show_same_statements7x.cocci", line 29, column 21, charpos = 315
  around = 'p2',
  whole content = position pos != find.p2;


How will the software situation evolve further?

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

Reply via email to