diff options
author | Miklos Vajna <vmiklos@vmiklos.hu> | 2019-01-11 07:59:47 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@vmiklos.hu> | 2019-01-11 07:59:47 +0000 |
commit | 98ef5337c9dfab72ad8f93a83b6429dfd0da168e (patch) | |
tree | ca8a7fb7c972c6b88dcf918f44ff6b2358864325 /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
parent | 114ad37c1dc805e1dfd694e076257f87f1b705d0 (diff) | |
download | llvm-98ef5337c9dfab72ad8f93a83b6429dfd0da168e.zip llvm-98ef5337c9dfab72ad8f93a83b6429dfd0da168e.tar.gz llvm-98ef5337c9dfab72ad8f93a83b6429dfd0da168e.tar.bz2 |
[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/clang-tidy/readability/ReadabilityTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp index 8dab296..e032d1f 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -31,6 +31,7 @@ #include "RedundantDeclarationCheck.h" #include "RedundantFunctionPtrDereferenceCheck.h" #include "RedundantMemberInitCheck.h" +#include "RedundantPreprocessorCheck.h" #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" #include "RedundantStringInitCheck.h" @@ -83,6 +84,8 @@ public: "readability-redundant-function-ptr-dereference"); CheckFactories.registerCheck<RedundantMemberInitCheck>( "readability-redundant-member-init"); + CheckFactories.registerCheck<RedundantPreprocessorCheck>( + "readability-redundant-preprocessor"); CheckFactories.registerCheck<SimplifySubscriptExprCheck>( "readability-simplify-subscript-expr"); CheckFactories.registerCheck<StaticAccessedThroughInstanceCheck>( |