On Wed, 16 Oct 2019, Markus Elfring wrote:

> > Anyway, to my understanding the goal was not to modify the #define part,
> > but rather only the code part.
>
> Will it become supported by the semantic patch language to change
> source code directly after the occurrence of an empty macro?
>
> @replacement@
> identifier M;
> @@
>  #define M
> -snprintf
> +spgprintf_d
>  (...)

I think you could put \ in your semantic patch, like in C, but I don't
know.

julia

>
>
> elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch --parse-cocci 
> use_spgprintf5.cocci
> …
> minus: parse error:
>   File "use_spgprintf5.cocci", line 8, column 0, charpos = 72
>   around = '',
>   whole content =
>
>
> Regards,
> Markus
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to