Release coccinelle-0.2.3rc6
[bpt/coccinelle.git] / tests / retval2.cocci
diff --git a/tests/retval2.cocci b/tests/retval2.cocci
new file mode 100644 (file)
index 0000000..1e095a4
--- /dev/null
@@ -0,0 +1,19 @@
+@ voidfunc @
+function fn;
+position voidpos;
+@@
+  void  fn@voidpos(...) {
+    ...
+  }
+    
+@ func disable ret exists @
+type T;
+function fn;
+position pos != voidfunc.voidpos;
+@@
+  T  
+-    fn@pos
++    newname
+     (...) {
+    ... WHEN != return ...;
+  }