On Fri, 22 Nov 2019, Markus Elfring wrote:
> >> Another example:
> >> “[PATCH] coccinelle: improve array.cocci” from 2019-11-18
> >> https://public-inbox.org/git/0d9cf772-268d-bd00-1cbb-0bbbec9df...@web.de/
> >
> > OK, so you already know how to express type constraints for things.
>
> Where do you see that I did this?
T *ptr for example.
>
>
> > So what are you actually asking?
>
> I hope that another clarification variant can also help.
>
> How can the C data type be determined for an expression metavariable
> so that it could be used for subsequent source code searches?
@@
type T;
T x;
@@
Now after matching x, you can use both x and T. If Coccinelle cannot
figure out the type of an expression, x will not be able to match that
expression.
julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci