> Coccinelle doesn't currently support adding ifdefs on expressions,
> only on statements.

Can the following transformation approach ever work

@adjustment2@
expression x;
@@
+#ifdef USE_F
 f
+#else
+g
+#endif
 (x);

in addition to this code variant for the semantic patch language?

@adjustment1@
expression x;
@@
+#ifdef USE_F
 f(x);
+#else
+g(x);
+#endif


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

Reply via email to