@is_member_function@
identifier f, s;
type t;
@@
 struct s
 {
  ...
  t (*f)(...);
  ...
 }

I have tried out the SmPL construct "nest" a few times.
http://coccinelle.lip6.fr/docs/main_grammar004.html

Now I wonder why it does not work as expected with the following variant of a filter pattern.


@is_member_function@
identifier f, s;
type t;
position p;
@@
 struct s
 {
  <+...
  t@p (*f)(...);
  ...+>
 }


elfring@Sonne:~/Projekte/Coccinelle/lokal/demos/return_values> spatch -sp_file select_non_void_functions3.cocci example1b.c
init_defs_builtins: /usr/share/coccinelle/standard.h
679 684
Fatal error: exception Failure("minus: parse error:
 = File "select_non_void_functions3.cocci", line 30, column 2,  charpos = 679
    around = '<+...', whole content =   <+...
")



How do you think about information from an article like "Tag vs. Type Names" by Dan Saks?
http://eetimes.com/discussion/programming-pointers/4024450/Tag-vs-Type-Names

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

Reply via email to