Hello,

I have tried another small SmPL script out.


@display@
identifier work;
statement s1, s2;
type T;
@@
 T work(...)
 {
 ... when any
 {
 ... when any
*s1
 s2
 }
 ... when any
 }


I have observed that no statements were shown from if branches
in my test source file.
This happened then after the addition of the SmPL specification “if (...)”
before an opening curly bracket in this analysis approach.
Now I am curious if compound statements can be handled also without
the addition of a SmPL disjunction for known C key words.
Can extra code be treated as optional by default there?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to