[clang-tools-extra] 62beb7c - [clang-tidy] Fix module options being registered with different priorities

Nathan James via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 08:19:16 PDT 2020


Author: Nathan James
Date: 2020-07-29T16:19:07+01:00
New Revision: 62beb7c6f4f2288793751740f06edc0dc25d01f6

URL: https://github.com/llvm/llvm-project/commit/62beb7c6f4f2288793751740f06edc0dc25d01f6
DIFF: https://github.com/llvm/llvm-project/commit/62beb7c6f4f2288793751740f06edc0dc25d01f6.diff

LOG: [clang-tidy] Fix module options being registered with different priorities

Not a bug that is ever likely to materialise, but still worth fixing

Reviewed By: DmitryPolukhin

Differential Revision: https://reviews.llvm.org/D84850

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/ClangTidyOptions.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
index 4c1f28673781..bb5a4b513967 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
@@ -114,11 +114,9 @@ ClangTidyOptions ClangTidyOptions::getDefaults() {
   Options.SystemHeaders = false;
   Options.FormatStyle = "none";
   Options.User = llvm::None;
-  unsigned Priority = 0;
   for (const ClangTidyModuleRegistry::entry &Module :
        ClangTidyModuleRegistry::entries())
-    Options =
-        Options.mergeWith(Module.instantiate()->getModuleOptions(), ++Priority);
+    Options = Options.mergeWith(Module.instantiate()->getModuleOptions(), 0);
   return Options;
 }
 


        


More information about the cfe-commits mailing list