Julia Lawall wrote:

> There is no short term solution for the semantic patch as written.  But it 
> is possible to reorganize the semantic patch in this case to make it work.
> The transformation needs to be just on the specific declared variable, and 
> not on the complete declaration statement:
>
> @@
> identifier x;
> type T;
> @@
>
> T x
> - = x
>   ;

Neat trick.

I just remembered another feature request: would it be difficult for
spatch to write a relevant filename and line number with its error
messages?  (In this example, I made do by repeatedly bisecting the set
of files passed on the command line.)

Thanks for the quick and thorough response.
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to