diff options
author | Alexander Kornienko <alexfh@google.com> | 2016-02-24 13:35:32 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2016-02-24 13:35:32 +0000 |
commit | ea9fd99215088b136c224d40074f2faa735a073b (patch) | |
tree | ce0a473299df3a7a7a170d5d61d61bb419f06831 /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp | |
parent | 31bcca47d3c5e988826416a42a1bd92d511f5d38 (diff) | |
download | bcm5719-llvm-ea9fd99215088b136c224d40074f2faa735a073b.tar.gz bcm5719-llvm-ea9fd99215088b136c224d40074f2faa735a073b.zip |
[clang-tidy] Added a check for forward declaration in the potentially wrong namespace
Adds a new check "misc-forward-declaration-namespace".
In check, A forward declaration is considerred in a potentially wrong namespace
if there is any definition/declaration with the same name exists in a different
namespace.
Reviewers: akuegel, hokein, alexfh
Patch by Eric Liu!
Differential Revision: http://reviews.llvm.org/D17195
llvm-svn: 261737
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp index efb5cb9cf24..b6d88e45619 100644 --- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp @@ -15,6 +15,7 @@ #include "AssignOperatorSignatureCheck.h" #include "BoolPointerImplicitConversionCheck.h" #include "DefinitionsInHeadersCheck.h" +#include "ForwardDeclarationNamespaceCheck.h" #include "InaccurateEraseCheck.h" #include "IncorrectRoundings.h" #include "InefficientAlgorithmCheck.h" @@ -55,6 +56,8 @@ public: "misc-bool-pointer-implicit-conversion"); CheckFactories.registerCheck<DefinitionsInHeadersCheck>( "misc-definitions-in-headers"); + CheckFactories.registerCheck<ForwardDeclarationNamespaceCheck>( + "misc-forward-declaration-namespace"); CheckFactories.registerCheck<InaccurateEraseCheck>( "misc-inaccurate-erase"); CheckFactories.registerCheck<IncorrectRoundings>( |