Index: clang-tidy/llvm/HeaderGuardCheck.h =================================================================== --- clang-tidy/llvm/HeaderGuardCheck.h +++ clang-tidy/llvm/HeaderGuardCheck.h @@ -14,6 +14,7 @@ namespace clang { namespace tidy { +namespace llvm { /// Finds and fixes header guards that do not adhere to LLVM style. class LLVMHeaderGuardCheck : public HeaderGuardCheck { @@ -25,6 +26,7 @@ std::string getHeaderGuard(StringRef Filename, StringRef OldGuard) override; }; +} // namespace llvm } // namespace tidy } // namespace clang Index: clang-tidy/llvm/HeaderGuardCheck.cpp =================================================================== --- clang-tidy/llvm/HeaderGuardCheck.cpp +++ clang-tidy/llvm/HeaderGuardCheck.cpp @@ -11,6 +11,7 @@ namespace clang { namespace tidy { +namespace llvm { bool LLVMHeaderGuardCheck::shouldFixHeaderGuard(StringRef Filename) { return Filename.endswith(".h"); @@ -49,5 +50,6 @@ return StringRef(Guard).upper(); } +} // namespace llvm } // namespace tidy } // namespace clang Index: clang-tidy/llvm/IncludeOrderCheck.h =================================================================== --- clang-tidy/llvm/IncludeOrderCheck.h +++ clang-tidy/llvm/IncludeOrderCheck.h @@ -14,6 +14,7 @@ namespace clang { namespace tidy { +namespace llvm { /// \brief Checks the correct order of \c #includes. /// @@ -25,6 +26,7 @@ void registerPPCallbacks(CompilerInstance &Compiler) override; }; +} // namespace llvm } // namespace tidy } // namespace clang Index: clang-tidy/llvm/IncludeOrderCheck.cpp =================================================================== --- clang-tidy/llvm/IncludeOrderCheck.cpp +++ clang-tidy/llvm/IncludeOrderCheck.cpp @@ -14,6 +14,7 @@ namespace clang { namespace tidy { +namespace llvm { namespace { class IncludeOrderPPCallbacks : public PPCallbacks { @@ -46,7 +47,7 @@ void IncludeOrderCheck::registerPPCallbacks(CompilerInstance &Compiler) { Compiler.getPreprocessor().addPPCallbacks( - llvm::make_unique(*this, + ::llvm::make_unique(*this, Compiler.getSourceManager())); } @@ -163,5 +164,6 @@ IncludeDirectives.clear(); } +} // namespace llvm } // namespace tidy } // namespace clang Index: clang-tidy/llvm/LLVMTidyModule.cpp =================================================================== --- clang-tidy/llvm/LLVMTidyModule.cpp +++ clang-tidy/llvm/LLVMTidyModule.cpp @@ -17,6 +17,7 @@ namespace clang { namespace tidy { +namespace llvm { class LLVMModule : public ClangTidyModule { public: @@ -29,9 +30,11 @@ } }; +} // namespace llvm + // Register the LLVMTidyModule using this statically initialized variable. -static ClangTidyModuleRegistry::Add X("llvm-module", - "Adds LLVM lint checks."); +static ClangTidyModuleRegistry::Add + X("llvm-module", "Adds LLVM lint checks."); // This anchor is used to force the linker to link in the generated object file // and thus register the LLVMModule. Index: clang-tidy/llvm/TwineLocalCheck.h =================================================================== --- clang-tidy/llvm/TwineLocalCheck.h +++ clang-tidy/llvm/TwineLocalCheck.h @@ -14,6 +14,7 @@ namespace clang { namespace tidy { +namespace llvm { /// \brief Looks for local Twine variables which are prone to use after frees /// and should be generally avoided. @@ -25,6 +26,7 @@ void check(const ast_matchers::MatchFinder::MatchResult &Result) override; }; +} // namespace llvm } // namespace tidy } // namespace clang Index: clang-tidy/llvm/TwineLocalCheck.cpp =================================================================== --- clang-tidy/llvm/TwineLocalCheck.cpp +++ clang-tidy/llvm/TwineLocalCheck.cpp @@ -16,6 +16,7 @@ namespace clang { namespace tidy { +namespace llvm { void TwineLocalCheck::registerMatchers(MatchFinder *Finder) { auto TwineType = @@ -57,5 +58,6 @@ } } +} // namespace llvm } // namespace tidy } // namespace clang Index: unittests/clang-tidy/LLVMModuleTest.cpp =================================================================== --- unittests/clang-tidy/LLVMModuleTest.cpp +++ unittests/clang-tidy/LLVMModuleTest.cpp @@ -3,6 +3,8 @@ #include "llvm/IncludeOrderCheck.h" #include "gtest/gtest.h" +using namespace clang::tidy::llvm; + namespace clang { namespace tidy { namespace test {