summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@vmiklos.hu>2019-01-11 07:59:47 +0000
committerMiklos Vajna <vmiklos@vmiklos.hu>2019-01-11 07:59:47 +0000
commit98ef5337c9dfab72ad8f93a83b6429dfd0da168e (patch)
treeca8a7fb7c972c6b88dcf918f44ff6b2358864325 /clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h
parent114ad37c1dc805e1dfd694e076257f87f1b705d0 (diff)
downloadbcm5719-llvm-98ef5337c9dfab72ad8f93a83b6429dfd0da168e.tar.gz
bcm5719-llvm-98ef5337c9dfab72ad8f93a83b6429dfd0da168e.zip
[clang-tidy] new check 'readability-redundant-preprocessor'
Finds potentially redundant preprocessor directives. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D54349 llvm-svn: 350922
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h')
-rw-r--r--clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h b/clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h
new file mode 100644
index 00000000000..dfe5f9733af
--- /dev/null
+++ b/clang-tools-extra/test/clang-tidy/readability-redundant-preprocessor.h
@@ -0,0 +1,5 @@
+#ifndef FOO
+#ifndef FOO // this would warn, but not in a header
+void f();
+#endif
+#endif
OpenPOWER on IntegriCloud