[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 16:16:57 PDT 2020


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:116-121
+  unsigned Priority = 0;
   for (ClangTidyModuleRegistry::iterator I = ClangTidyModuleRegistry::begin(),
                                          E = ClangTidyModuleRegistry::end();
        I != E; ++I)
-    Options = Options.mergeWith(I->instantiate()->getModuleOptions());
+    Options =
+        Options.mergeWith(I->instantiate()->getModuleOptions(), ++Priority);
----------------
Is there a reason for incrementing the priority on each successive iteration, Seems like a bug that will lead to the later registered modules having higher priority for their options.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75184/new/

https://reviews.llvm.org/D75184



More information about the cfe-commits mailing list