summaryrefslogtreecommitdiffstats
path: root/devel/coccinelle/rename-fn.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'devel/coccinelle/rename-fn.cocci')
-rw-r--r--devel/coccinelle/rename-fn.cocci23
1 files changed, 23 insertions, 0 deletions
diff --git a/devel/coccinelle/rename-fn.cocci b/devel/coccinelle/rename-fn.cocci
new file mode 100644
index 0000000..5bce9b7
--- /dev/null
+++ b/devel/coccinelle/rename-fn.cocci
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2021 the Pacemaker project contributors
+ *
+ * The version control history for this file may have further details.
+ *
+ * This source code is licensed under the GNU General Public License version 2
+ * or later (GPLv2+) WITHOUT ANY WARRANTY.
+ */
+
+/*
+ * Rename a function or macro. This is here as a template; replace "old" and
+ * "new" below with the old and new names, run in the devel directory:
+ *
+ * make COCCI_FILES=coccinelle/rename-fn.cocci cocci-inplace
+ *
+ * then revert the file before committing.
+ */
+
+virtual internal
+
+@@ expression E; @@
+- old(E)
++ new(E)