File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -290,15 +290,14 @@ ClangTidyOptions &ClangTidyOptions::mergeWith(const ClangTidyOptions &Other,
290
290
overrideValue (UseColor, Other.UseColor );
291
291
mergeVectors (ExtraArgs, Other.ExtraArgs );
292
292
mergeVectors (ExtraArgsBefore, Other.ExtraArgsBefore );
293
-
293
+ // FIXME: how to handle duplicate names check?
294
+ mergeVectors (CustomChecks, Other.CustomChecks );
294
295
for (const auto &KeyValue : Other.CheckOptions ) {
295
296
CheckOptions.insert_or_assign (
296
297
KeyValue.getKey (),
297
298
ClangTidyValue (KeyValue.getValue ().Value ,
298
299
KeyValue.getValue ().Priority + Order));
299
300
}
300
- mergeVectors (CustomChecks, Other.CustomChecks );
301
-
302
301
return *this ;
303
302
}
304
303
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ class CustomModule : public ClangTidyModule {
16
16
void addCheckFactories (ClangTidyCheckFactories &CheckFactories) override {}
17
17
};
18
18
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.
21
21
extern void registerCustomChecks (ClangTidyOptions const &Options,
22
22
ClangTidyCheckFactories &Factories) {
23
23
static llvm::SmallSet<llvm::SmallString<32 >, 8 > CustomCheckNames{};
You can’t perform that action at this time.
0 commit comments