>>>> @movement@ >>>> expression E; >>>> identifier V1, V2, Vx; >>>> statement S; >>>> type T1, T2; >>>> @@ >>>> T1 V1; >>>> ... when any >>>> T2 V2 >>>> - = \( <+... Vx ...+> \& E \) >>> >>> What is Vx for? He wants an expression that involves a. >> >> I chose a slightly more unique metavariable identifier for the desired >> clarification of this use case. >> >> a ⇔ Vx >> (Or should the identifier “V1” be used instead?) > > Vx is not bound to anything.
This interpretation might be appropriate. > It will match any identifier. Should the desired “binding” work with the variable name “V1” (or “a”) finally? >>>> ; >>>> ... when any >>>> when != S >>>> ++ V2 = E; >>> >>> What do you expect this code to be added on to? >> >> I imagine that we would like to determine the end of the code block >> for variable declarations somehow. … > I already asked above what you expected the ++ code to be attached to. > All added code has to be attached to something. The shown simple SmPL exclusion specification for statements can be replaced also with a better source code search approach. Would you recommend to exclude declarations (and/or definitions) of C variables by any other means? (Is more SmPL code needed for this purpose?) Regards, Markus _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
