Hi!
I've found that spatch fails to detect correct indentation when it
replaces two functions inside of #ifdef block with one function.

bug.c:

int main(void)
{
#if ! HAVE_XYZ
        f1();
        f2();
#endif
}

bug.cocci:

@@ @@
- f1();
- f2();
+ f3();

result:

init_defs_builtins: /usr/lib64/ocaml/coccinelle/standard.h
HANDLING: d.c
diff = 
--- d.c
+++ /tmp/cocci-output-32687-903dcc-d.c
@@ -1,7 +1,6 @@
 int main(void)
 {
 #if ! HAVE_XYZ
-       f1();
-       f2();
+f3();
 #endif
 }

spatch --version
spatch version 1.0.0-rc19 with Python support and with PCRE support

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

Reply via email to