From ea9fd99215088b136c224d40074f2faa735a073b Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 24 Feb 2016 13:35:32 +0000 Subject: [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 --- clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp') 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( "misc-definitions-in-headers"); + CheckFactories.registerCheck( + "misc-forward-declaration-namespace"); CheckFactories.registerCheck( "misc-inaccurate-erase"); CheckFactories.registerCheck( -- cgit v1.2.3