[Cocci] Embedding Meta-variables in added Comments using semantic patchesز

Moustafa Mahmoud moustafa at cmpsamurai.com
Tue Aug 28 09:36:33 CEST 2018


this semantic patch doesn't produce the required behavioir

@annotate_if_conditions@
expression ex;
@@

<+...
+ /* ex */
if(ex){...}
...+>


it produces the following

     int x =5;
     int y =6;
     int m =funct();
+    /* ex */   // the required behavoir I need is  /* x */
     if(x)
     {
+       /* ex */
        if(y)
        {
            return 1;

Regards,
Moustafa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20180828/47bf471a/attachment.html>


More information about the Cocci mailing list