>> @replacement@
>> identifier x;
>> @@
>> -int
>> +int*
>> x; >
>>
>> In which scopes would you like to add the asterisk for the usage of a pointer
>> data type?
…
> 1) "x" has a type of "int *"
The asterisk addition seems to work for (local) variables.
> 2) the new "int *x" gets passed to a function "void g(int *)" instead.
The succinct SmPL change specification looks like it could express
data type adjustments also at other places.
But an additional SmPL rule seems to be needed at the moment.
@replacement2@
identifier f, x;
type t;
@@
t
f(...,
- int
+ int*
x, ...)
{ ... }
Do you distinguish any references to global variables here?
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci