> PS. I sort of turned around the problem by splitting my rule in two:
>
> --- trace2.cocci:
> @@ statement s1; @@
> if(...)
> +{trace("ifth");
> s1
> +}
>
> @@ statement s1; @@
> if(...) s1
> +trace("endif");
I was going to suggest this solution. The empty block, though seems
strange. I will look into it.
julia
> In this case, the third trace("endif") is correctly added after the
> "if", but the produced code is still a bit strange, as it contains an
> emtpy block:
>
> if ( pcDate == 0 ) { trace("ifth");
> {
> }
> sRetour = 1;
> return sRetour;
> }
> trace("endif");
>
>
> _______________________________________________
> Cocci mailing list
> [email protected]
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci