On Tue, 16 Apr 2019, Jerome Glisse wrote:
> I would like to add code after local variable declaration but there
> is nothing particular to match there for me. Roughly i want to do:
>
> void FooFun(..., struct fooicareabout *identifier, ...)
> {
> // bunch of local variable
>
> // I want to add code here after all local variables
> }
@@
statement S,S1;
@@
foo(...) {
... when != S
+ added code
S1
...
}
A declaration doesn't match S.
>
> The thing i match on is one of the function argument. So is that do-
> able ? If so any pointer on how to do this would be much appreciated.
I'm not sure what you are trying to do here. You can certainly make a
pattern for your parameters like you have shown in the example. Do you
mean that you want to go find the argument value at the call site?
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci