>> Can the semantic patch language help to insist for a search that a bit >> of source code belongs to the implementation of a function-like macro? > > That's what the search that was written does.
I interpret the example in another way. *#define mac(...) <+... f(...) ...+> > The pattern that comes after #define has to be in the definition of the macro. * Would you find it as acceptable if a function-like macro was implemented in the way that it became empty? * If find that the specification “<+... f(...) ...+>” does not explicitly express a requirement for a replacement list (despite of being so close). https://en.cppreference.com/w/c/preprocessor/replace > Coccinelle never matches things in more than one top-level term in the C file. Which is the corresponding scope for such source code? Regards, Markus _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
