On Tue, 19 May 2020, Markus Elfring wrote: > >> 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. The pattern that comes > > after #define has to be in the definition of the macro. > > I suggest to consider additional source code variants. > With which SmPL constructs should be ensured that a search pattern > like “<+... f(...) ...+>” refers only to content from the same logical source line? > https://en.cppreference.com/w/c/language/translation_phases#Phase_2 Please stop asking the same question over and over. In the context of a macro definition, <+... f(...) ...+> will only match what is from the same logical source line. Because that is all that there is in a macro definition. If Coccinelle is working on a macro definition, it works only on that macro definition. If it is working on a function definition, it works only on that function definition. julia