Release coccinelle-0.2.3rc1
[bpt/coccinelle.git] / tests / fnty.cocci
diff --git a/tests/fnty.cocci b/tests/fnty.cocci
new file mode 100644 (file)
index 0000000..a49fce5
--- /dev/null
@@ -0,0 +1,32 @@
+@structure@
+identifier idtype, y;
+type t;
+position p;
+@@
+struct idtype {
+  ...
+        t (*y)(...);@p
+  ...
+};
+
+@bad@
+identifier structure.idtype, y;
+type t;
+position p != structure.p;
+@@
+
+struct idtype {
+  ...
+        t y;@p
+  ...
+};
+
+@depends on !bad@
+identifier structure.idtype;
+@@
+struct
+- idtype
++ newname
+{
+  ...
+};