Hello,

is there a trick to use the field list? The matching rule is easy (although it is awkward that F isn't followed by a ";")
@ object @
typedef IFace;
typedef IFaceVtbl;
type Tobj;
field list[n] F;
@@
  typedef struct tag_obj {
      F
-     const IFaceVtbl *lpVtbl;
+     IFace IFace_iface;
      ...
  } Tobj;

But I cannot make the replacement rule work
@@
identifier obj;
identifier vtbl;
expression list[object.n] E;
@@
  static struct IFaceImpl obj = {
      E,
-     &vtbl,
+     { &vtbl },
      ...,
  };

I keep getting
Fatal error: exception Failure("minus: parse error:
 = File "field_list.cocci", line 20, column 6,  charpos = 296
    around = 'E', whole content =       E
")


thanks
bye
        michael
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to