Re: [cocci] Can we match a known macro by macro name instead of expanded function name?
Markus Elfring <[email protected]>
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
>>> .c
>>>
>>> SYSCALL_DEFINE1(foo,int,x) { return 0; }
>>
>> How can a macro call be matched here?
>
> We have already discussed extensively that it can't.
There might corresponding collateral evolution become more helpful.
> Because the code
> doesn't parse without doing the expansion.
Where is the information provided that we may actually expect a macro expansion here?
(Is special pattern recognition applied eventually?)
Does such functionality usually belong to a preprocessor?
See also:
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/4c9d00ae071800cb447efaffd753f3bb2be28800/docs/manual/introduction.tex#L1-6
Regards,
Markus