diff options
| author | Daniel Marjamaki <daniel.marjamaki@evidente.se> | 2016-11-01 13:26:15 +0000 |
|---|---|---|
| committer | Daniel Marjamaki <daniel.marjamaki@evidente.se> | 2016-11-01 13:26:15 +0000 |
| commit | 399a50cf356f4881cbab46a95d2c9efed18454ba (patch) | |
| tree | 810df5388c966a3e8535a71dd7dd31cdb5a7b5ea /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
| parent | 62f516f5906f967179610a73e4cc1d852b908bbd (diff) | |
| download | bcm5719-llvm-399a50cf356f4881cbab46a95d2c9efed18454ba.tar.gz bcm5719-llvm-399a50cf356f4881cbab46a95d2c9efed18454ba.zip | |
[clang-tidy] Add check readability-redundant-declaration
Finds redundant variable and function declarations.
extern int X;
extern int X; // <- redundant
Differential Revision: https://reviews.llvm.org/D24656
llvm-svn: 285689
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 0b6508a80d2..285826bbf95 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -23,6 +23,7 @@ #include "NamedParameterCheck.h" #include "NonConstParameterCheck.h" #include "RedundantControlFlowCheck.h" +#include "RedundantDeclarationCheck.h" #include "RedundantMemberInitCheck.h" #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" @@ -68,6 +69,8 @@ public: "readability-non-const-parameter"); CheckFactories.registerCheck<RedundantControlFlowCheck>( "readability-redundant-control-flow"); + CheckFactories.registerCheck<RedundantDeclarationCheck>( + "readability-redundant-declaration"); CheckFactories.registerCheck<RedundantSmartptrGetCheck>( "readability-redundant-smartptr-get"); CheckFactories.registerCheck<RedundantStringCStrCheck>( |

