> Add a test case for both of the erroneous cases.
Thanks for your contribution.
Will a slightly different subject be more appropriate for this patch?
> +@ r0 @
> +type t;
> +position p;
I suggest to omit this variable for the shown simple SmPL script.
> +@ script:python r1 @
> +id;
> +@@
> +coccinelle.id = "id/* user comment */"
> +
> +@ r2 @
> +identifier r1.id;
> +type r0.t;
> +@@
> +foo() {
> +...
> +++ t id;
> +}
This variable assignment and the addition of commented variable declarations
looks interesting.
* Can such a change be achieved also directly without using an extra
Python (or OCaml) script?
* I would usually prefer to avoid the generation of duplicate source code.
The corresponding example might demonstrate other test goals.
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci