[Cocci] function name alternative
Julia Lawall
julia at diku.dk
Sat Nov 27 14:01:47 CET 2010
On Sat, 27 Nov 2010, Vasiliy Kulikov wrote:
> On Sat, Nov 27, 2010 at 13:27 +0100, Julia Lawall wrote:
> > position p != r.p;
>
> Well, I wanted to do it, but if "r.p" is not found then the rule is not
> processed:
OK good point. It should work to then have another rule that says
depends on !r and doesn't inherit anything.
julia
> --
> @r@
> identifier f ~= "no_such_f";
> @@
>
> f (...)
> {
> ...
> }
>
> @@
> identifier f != r.f;
> @@
>
> *f (...)
> {
> ...
> }
> --
>
>
> void f(void *s)
> {}
>
> It should find "f", but no.
>
> --
> Vasiliy
>
More information about the Cocci
mailing list