On Thu, 27 Dec 2018, SF Markus Elfring wrote:

> > If you have a problem, provide a complete example.
>
> Do you find software development difficulties easier
> to clarify based on source code analysis by a SmPL script
> like the following?
>
> @find@
> identifier f, x;
> type ft, xt;
> @@
>  ft f(...)
>  {
>  ... when any
>  xt x;
>  ... when != x
>  }
>
> @show@
> identifier find.f, find.x;
> type find.ft, find.xt;
> @@
>  ft f(...)
>  {
>  ... when any
>  xt x;
>  ...
> *x
>  ...
>  }

I don't know what you expect the second rule to do, but it will only match
when there exists a control-flow path through the function where x is
referenced exactly once.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to