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,
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
Original file line number Diff line number Diff 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.
2121extern void registerCustomChecks (ClangTidyOptions const &Options,
2222 ClangTidyCheckFactories &Factories) {
2323 static llvm::SmallSet<llvm::SmallString<32 >, 8 > CustomCheckNames{};
You can’t perform that action at this time.
0 commit comments