On 29.10.2014 09:29, SF Markus Elfring wrote: >> I wanted to add a #define just above a function prototype or the >> function itself. > [...] >> @rule1@ >> identifier func; >> @@ >> >> -#define func BAR(func) > > I find this SmPL approach strange according to your description. > - Would you really like to delete the definition for a preprocessor symbol > here? > - Should this semantic patch express the change to move the position of such a > statement to other source code places?
I wanted to be able to re-run spatch on an already patched content. The use case is to add new function prototypes manually and run spatch to handle the associated #define automatically. -- Jean-Sébastien Pédron
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
