Hi,
I'm trying to write a .cocci file to transform all calls to a function
"f(ex)" to something like this:
#ifdef USE_F
f(ex)
#else
g(ex)
#endif
The function has this signature:
bool f(int x);
This is the patch that I tried to use:
@@
expression ex;
@@
+#ifdef USE_F
f(ex)
+#else
+g(ex)
+#endif
On 11/25/2019 1:10 PM, Julia Lawall wrote:
> On Mon, 25 Nov 2019, David Frey wrote:
>
>> Hi,
>>
>> I'm trying to write a .cocci file to transform all calls to a function
>> "f(ex)" to something like this:
>>
>> #ifdef USE_F
>>