On Thu, 15 Sep 2016, Waldemar Rymarkiewicz wrote:

> >
> > Could you send the exact semantic patch that you tried?  Coccinelle should
> > allos parsing #defines.
>
> Simply
>
> @@
> @@
> -#define pr_fmt(fmt) KBUILD_MODNAME
>
> works, but
>
> @@
> @@
> -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> fails  with
>
> Fatal error: exception Failure("minus: parse error: \n = File
> \"patches/1021-pr_fmt_undef.cocci\", line 4, column 38,  charpos =
> 59\n    around = '\"', whole content = #define pr_fmt(fmt)
> KBUILD_MODNAME \": \" fmt\n")
>
> but even if I want to match just
>
> @@
> @@
> -#define pr_fmt(fmt) KBUILD_MODNAME  fmt
>
> it also fails with
>
> Fatal error: exception Failure("minus: parse error: \n = File
> \"patches/1021-pr_fmt_undef.cocci\", line 4, column 0,  charpos = 21\n
>    around = '#define pr_fmt(', whole content = #define pr_fmt(fmt)
> KBUILD_MODNAME fmt\n")

OK, thanks I will look into it.  At least in the last case, that is not
the intended behavior.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to