Skip to contentSkip to conversation

Whitespace Issue When Adding "!!"

Cocci Michael Stefaniuc 2 participants 2 messages Feb 1, 2019

lore
Share & tools
lore
#0 lore raw

Hello,

when adding a "!!" the generated diff will have "! !". Test case and results are attached.

thanks
bye
michael

bool foo(int bar)

{
    return bar ? true : false;
}

@@
expression E;
@@
+ !!
E
- ? true : false

tmp/cocci-output-18828-5323c2-notnot.c renamed from tmp/notnot.c +1 -1
@@ -1,4 +1,4 @@
 bool foo(int bar)
 {
-    return bar ? true : false;
+    return ! !bar;
 }

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci