[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
This commit is contained in:
Nathan James 2020-07-29 16:19:06 +01:00
parent bfa140376d
commit 62beb7c6f4
No known key found for this signature in database
GPG Key ID: CC007AFCDA90AA5F
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}