Julia Lawall <julia <at> diku.dk> writes: > On Fri, 17 Dec 2010, Michael T wrote: [snip] > > Surely it would be possible to make Coccinelle sufficiently aware of these > > syntactic forms that it can parse the files and get the correct flow in ninety > > percent of cases. > > Allowing :: in identifier names is certainly possible. We could even > allow <>. But aren't there class declarations in C++? All code inside > them would be completely ignored.
Classes (and structs, as in C++ the two are essentially the same thing) can include member function definitions among other things. So for this case accepting definitions here and treating them as normal C/C++ functions would do the trick. Before I take too much of your time though, are you interested in finding rules of thumb that would make Coccinelle work with more C++ code than it currently does? It would certainly suit the code base I am working on fine, as that is essentially C code inside .cpp files with a few C++ constructs where we think they make sense. Regards, Michael _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
