summaryrefslogtreecommitdiff
path: root/contrib/coccinelle/preincr.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/coccinelle/preincr.cocci')
-rw-r--r--contrib/coccinelle/preincr.cocci5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/coccinelle/preincr.cocci b/contrib/coccinelle/preincr.cocci
new file mode 100644
index 0000000..7fe1e8d
--- /dev/null
+++ b/contrib/coccinelle/preincr.cocci
@@ -0,0 +1,5 @@
+@ preincrement @
+identifier i;
+@@
+- ++i > 1
++ i++