================
@@ -503,6 +503,21 @@ getCheckNames(const ClangTidyOptions &Options,
   return Factory.getCheckNames();
 }
 
+void filterCheckOptions(ClangTidyOptions &Options,
+                        const std::vector<std::string> &EnabledChecks) {
+  StringSet<> EnabledChecksSet(llvm::from_range, EnabledChecks);
----------------
vbvictor wrote:

We can not return `StringSet` from the start because it is a hashtable, and we 
need ordering for future use. The only option I see is to use `std::set` (which 
is not a good data structure IMO). [LLVM guide 
suggests](https://llvm.org/docs/ProgrammersManual.html#a-sorted-vector) sorted 
vector is a good thing, so I removed dependency on `StringSet` and used 
`llvm::binary_seach` instead.

https://github.com/llvm/llvm-project/pull/147142
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to