On Thu, Jul 26, 2018 at 1:57 PM, Julia Lawall <[email protected]> wrote:
>> @rule1@
>> expression x, y;
>> @@
>> -DBG_PRINTF((x, y));
>> +NV_PRINTF(y);
>
> Try expression list y;

You mean like this:

@rule1@
expression x;
expression list y;
@@
-DBG_PRINTF((x, y));
+NV_PRINTF(y);

That gives me an error:

$ spatch -sp_file ~/sw/dev/gpu_drv/chips_a/nv_printf.cocci osinit.c
init_defs_builtins: /usr/lib/coccinelle/standard.h
60 61
Fatal error: exception Failure("minus: parse error: \n = File
\"/home/ttabi/sw/dev/gpu_drv/chips_a/nv_printf.cocci\", line 5, column
16,  charpos = 60\n    around = 'y', whole content = -DBG_PRINTF((x,
y));\n")

I also tried this, but it gave me a different error:

@rule1@
expression x;
expression list y;
@@
-DBG_PRINTF(
-(x,
+NV_PRINTF(
 y
-)
 );

Fatal error: exception Failure("minus: parse error: \n = File
\"/home/ttabi/sw/dev/gpu_drv/chips_a/nv_printf.cocci\", line 8, column
1,  charpos = 75\n    around = 'y', whole content =  y\n")
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to