forked from OSchip/llvm-project
[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:
parent
bfa140376d
commit
62beb7c6f4
|
@ -114,11 +114,9 @@ ClangTidyOptions ClangTidyOptions::getDefaults() {
|
||||||
Options.SystemHeaders = false;
|
Options.SystemHeaders = false;
|
||||||
Options.FormatStyle = "none";
|
Options.FormatStyle = "none";
|
||||||
Options.User = llvm::None;
|
Options.User = llvm::None;
|
||||||
unsigned Priority = 0;
|
|
||||||
for (const ClangTidyModuleRegistry::entry &Module :
|
for (const ClangTidyModuleRegistry::entry &Module :
|
||||||
ClangTidyModuleRegistry::entries())
|
ClangTidyModuleRegistry::entries())
|
||||||
Options =
|
Options = Options.mergeWith(Module.instantiate()->getModuleOptions(), 0);
|
||||||
Options.mergeWith(Module.instantiate()->getModuleOptions(), ++Priority);
|
|
||||||
return Options;
|
return Options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue