File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -505,14 +505,13 @@ getCheckNames(const ClangTidyOptions &Options,
505505
506506void filterCheckOptions (ClangTidyOptions &Options,
507507 const std::vector<std::string> &EnabledChecks) {
508- StringSet<> EnabledChecksSet (llvm::from_range, EnabledChecks);
509508 ClangTidyOptions::OptionMap FilteredOptions;
510509 for (const auto &[OptionName, Value] : Options.CheckOptions ) {
511510 const size_t CheckNameEndPos = OptionName.find (' .' );
512511 if (CheckNameEndPos == StringRef::npos)
513512 continue ;
514513 const StringRef CheckName = OptionName.substr (0 , CheckNameEndPos);
515- if (EnabledChecksSet. contains ( CheckName))
514+ if (llvm::binary_search (EnabledChecks, CheckName))
516515 FilteredOptions[OptionName] = Value;
517516 }
518517 Options.CheckOptions = std::move (FilteredOptions);
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ getCheckOptions(const ClangTidyOptions &Options,
7777 bool AllowEnablingAnalyzerAlphaCheckers);
7878
7979// / Filters CheckOptions in \p Options to only include options specified in
80- // / the \p EnabledChecks.
80+ // / the \p EnabledChecks which is a sorted vector .
8181void filterCheckOptions (ClangTidyOptions &Options,
8282 const std::vector<std::string> &EnabledChecks);
8383
You can’t perform that action at this time.
0 commit comments