> The following file combination produces another usable search result.
>
> @display@
> constant C;
> expression A, B;
> identifier X;
> type T;
> @@
>  T X = A
>  <<
> *C
>  <<
>  B + ...;

Yes, because now ... is replacing an expression.

> Should anything be found in the following source code variant then?
>
> int main(void)
> {
> unsigned int a = 2, b = 4;
> unsigned long c = a << 2 << b;
> return c;
> }

No, because there is no empty statement to match the final ;.  The ...
matches a complete statement (in general, 0 or more complete statements).
It doesn't match return c

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

Reply via email to