[PATCH] Refactor: Move llvm clang-tidy checks to namespace clang::tidy::llvm

Richard legalize at xmission.com
Mon Mar 2 10:13:54 PST 2015


================
Comment at: clang-tidy/llvm/IncludeOrderCheck.cpp:50
@@ -48,3 +49,3 @@
   Compiler.getPreprocessor().addPPCallbacks(
-      llvm::make_unique<IncludeOrderPPCallbacks>(*this,
+      ::llvm::make_unique<IncludeOrderPPCallbacks>(*this,
                                                  Compiler.getSourceManager()));
----------------
alexfh wrote:
> alexfh wrote:
> > Wow, just one case of compiler being confused with another namespace llvm ;)
> BTW, this needs to be clang-formatted.
Yes, I noticed a bunch of files in clang-tidy are deviating from clang-format style=LLVM.  I planned to submit a separate changeset that will just clang-format everything.

================
Comment at: clang-tidy/llvm/LLVMTidyModule.cpp:36
@@ -32,3 +35,3 @@
 // Register the LLVMTidyModule using this statically initialized variable.
-static ClangTidyModuleRegistry::Add<LLVMModule> X("llvm-module",
-                                                  "Adds LLVM lint checks.");
+static ClangTidyModuleRegistry::Add<llvm::LLVMModule>
+    X("llvm-module", "Adds LLVM lint checks.");
----------------
alexfh wrote:
> I'd put it inside namespace llvm to avoid the need to qualify LLVMModule.
I was following the existing example of the readability module where they had it arranged this way.  I was getting an error when the static was inside the namespace.  I'll try it out and see if I can resolve the error.

http://reviews.llvm.org/D7995

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list