Skip to content

Commit 64c45dc

Browse files
committed
fix comment
1 parent 5bb2c6c commit 64c45dc

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,14 @@ ClangTidyOptions &ClangTidyOptions::mergeWith(const ClangTidyOptions &Other,
290290
overrideValue(UseColor, Other.UseColor);
291291
mergeVectors(ExtraArgs, Other.ExtraArgs);
292292
mergeVectors(ExtraArgsBefore, Other.ExtraArgsBefore);
293-
293+
// FIXME: how to handle duplicate names check?
294+
mergeVectors(CustomChecks, Other.CustomChecks);
294295
for (const auto &KeyValue : Other.CheckOptions) {
295296
CheckOptions.insert_or_assign(
296297
KeyValue.getKey(),
297298
ClangTidyValue(KeyValue.getValue().Value,
298299
KeyValue.getValue().Priority + Order));
299300
}
300-
mergeVectors(CustomChecks, Other.CustomChecks);
301-
302301
return *this;
303302
}
304303

clang-tools-extra/clang-tidy/custom/CustomTidyModule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class CustomModule : public ClangTidyModule {
1616
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {}
1717
};
1818

19-
// FIXME: could be clearer to add parameter of addCheckFactories to pass
20-
// Options?
19+
// We need to register the checks more flexibly than builtin modules. The checks
20+
// will changed dynamically when switching to different source file.
2121
extern void registerCustomChecks(ClangTidyOptions const &Options,
2222
ClangTidyCheckFactories &Factories) {
2323
static llvm::SmallSet<llvm::SmallString<32>, 8> CustomCheckNames{};

0 commit comments

Comments
 (0)