diff mbox series

[v2,3/3] cocci: prevent extern function declarations

Message ID b2787f98146c20764ca528b181202f843d22f08b.1555352526.git.liu.denton@gmail.com (mailing list archive)
State New, archived
Headers show
Series [RFC] *.h: remove extern from function declarations | expand

Commit Message

Denton Liu April 15, 2019, 6:24 p.m. UTC
Since function declarations already implicitly imply extern, create a
Coccinelle rule which removes the redundant extern.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
---
 contrib/coccinelle/noextern.cocci | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 contrib/coccinelle/noextern.cocci
diff mbox series

Patch

diff --git a/contrib/coccinelle/noextern.cocci b/contrib/coccinelle/noextern.cocci
new file mode 100644
index 0000000000..8cb39ac947
--- /dev/null
+++ b/contrib/coccinelle/noextern.cocci
@@ -0,0 +1,6 @@ 
+@@
+type T;
+identifier f;
+@@
+- extern
+  T f(...);