On Thu, 2 Aug 2018, Timur Tabi wrote:
> My cocci script (attached) ignores lines that are embedded inside other
> macros. Example:
>
> #define DB(x) x
>
> void func()
> {
> DB(if (DEBUG_IO_TRACE())
> DBG_PRINTF((DBG_MODULE_GLOBAL, DBG_LEVEL_INFO, "inb %#04x \n",
> addr));)
> }
>
> Is there a way to get coccinelle to ignore the DB( and )?
No. Either Coccinelle can parse the macro use as is, which is not
possible here, because an if can't be an argument to a function call, or
it expands the macro, in which case no transformation is possible.
julia_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci