On Fri, 1 Jul 2011, Ajay Panyala wrote:

> Since I am not sure if the includes
> would use < > or " ", I could write
> rules for both.
> 
> +#include <foo.h>
> #include "..."
> 
> +#include <foo.h>
> #include <...>
> 
> before
> --------
> 
> #include <bar.h>
> #include "abc.h"
> 
> after
> -------
> 
> *#include <foo.h>*
> #include <bar.h>
> *#include <foo.h>*
> #include "abc.h"
> 
> But it would end up inserting the header multiple
> times if there are both of those includes that use < > and " "
> as shown above.
> 
> Is there any way to apply only one of those rules if more than
> one match is found ?

In principle, it can be done similarly to the case for functions.  In 
practice it is notworking for me at the moment.

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to