On Sun, 15 Feb 2015, Sören Brinkmann wrote:
> On Sun, 2015-02-15 at 10:41PM +0100, Julia Lawall wrote:
> > > If you look at my example, I tested by creating types.h (in the same
> > > directory), that did include the single line 'typedef unsigned int u32;'
> > > only. I then ran
> > > spatch --all-includes -I . --sp-file test.cocci testcase2.c
> > > But that doesn't seem to make any difference. If I move the typedef into
> > > the c file, it works though.
> >
> > OK, maybe types in header files are indeed treated differently.
>
> I even tried --preprocess without seeing different behavior. No clue
> what's going on there.
No idea... I can try to check.
> > A patch that adds a few more parsing hacks is below. It may apply to
> > your version or you may need to upgrade.
>
> Applied and rebuilt. That seems to do the trick. My testcase passes and
> even on the real code base everything seems to get replaced correctly
> now.
Sounds good. I'm not sure that complicated const constructions are tested
as well as they should be...
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci