On Wed, 23 Jan 2019, Guenter Roeck wrote:

> Hi Julia,
>
> On 1/22/19 10:35 PM, Julia Lawall wrote:
> >
> >
> > On Tue, 22 Jan 2019, Guenter Roeck wrote:
> >
> > > Hi,
> > >
> > > I am trying to match a construct such as
> > >
> > > #define func(a,b,c) \
> > >      some_call(a##b, c, NULL)
> > >
> > > to replace it with, for example,
> > >
> > > #define func(a,b,c) \
> > >     some_other_call(a##b, c)
> > >
> > > Is this possible with coccinelle ?
> > > I tried several variants, but I don't seem to be able to match "a##b".
> >
> > I doubt that ## is supported in the matching language.  I will add it.
> >
>
> All I was able to find about the subject was in the Coccinelle change log:
>
> 20.4 Internals:
> "reorganize the way we parse C identifiers, especially concatenated cpp
>  identifiers as in a##b. This may lead to some regressions as we may not
>  parse as much code as before."

Yeah, it's supported on the C side, but not on the pattern matching side.
I'm working on that.

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

Reply via email to