On Wed, Jun 23, 2010 at 05:46:40PM +0200, Nicolas Palix wrote:
> 
> 
> On Wednesday 23 June 2010 15:16:41 Pierre Habouzit wrote:
> > No it doesn't work on:
> > 
> > void broken(void)
> > {
> >     t_foo();
> >     t_foo();
> >     t_push();
> >     t_pop();
> >     t_foo();
> >     t_foo();
> > }
> 
> 
> The attached SmPL file works on that case too.

Indeed, all my other corner cases work fine too now :)

> > And I've absolutely no clue why. Coccinelle documentation is rather terse on
> > how regexp constraints work, so I really was expecting what I wrote to 
> > work. I
> > mean when I write:
> 
> It is not a problem with regexp. It is the use of "..." inside a function
> and the way coccinelle determines the paths that match the given pattern.
> 
> The idea is to split the rule in two pieces:
>  - the first one looks for use of a "g" function
>  - the second identifies the function "f" where it occurs.

I see. It makes sense indeed.

-- 
Intersec <http://www.intersec.com>
Pierre Habouzit <[email protected]> | Chief Software Architect
Tél : +33 (0)1 5570 3346
Mob : +33 (0)6 1636 8131
Fax : +33 (0)1 5570 3332
37 Rue Pierre Lhomme
92400 Courbevoie
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to