On Thu, 12 Jul 2012, Eric Leblond wrote: > Hello, > > I'm currently running spatch (via coccigrep) on a code and I've got > matches in some conditional code: > > #ifdef UNITTESTS > ... > #endif > > I would like to be able to not do matches on this part of the code. Is > their an easy way to do so ?
No. The matching process doesn't see the ifdefs. There is a notion of skipping code that is under #if 0. It could indeed be nice to generalize that to other constants. Ideally, we would do partial evaluations as well, ie if we know that X is undefined, then perhaps X && Y is also undefined. I can look into it. julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
