On Tue, 25 Jun 2019, Markus Elfring wrote:
> > The expected difference can trigger the need to express this detail
> > by the usage of two identifiers based on the same metavariable type.
>
> I guess that this wording should be clarified a bit more according to
> the current software development status around the semantic patch language.
> A selection of different metavariable types is supported already.
> https://github.com/coccinelle/coccinelle/blob/c6d7554edf7c4654aeae4d33c3f040e300682f23/docs/manual/cocci_syntax.tex#L199
>
> So it seems to be occasionally appropriate to use metavariables with
> the same type while different names are chosen then for the corresponding
> variable declaration.
>
>
> Another SmPL script example:
> @test@
> constant c1, c2;
> @@
> x =
> * c1
> ;
> x =
> * c2
> ;
@@
expression x;
constant c1,c2;
@@
x = c1;
(
x = c1;
|
*x = c2;
)
julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci