[clang] [llvm] [NFCI][Sanitizer] Convert Matcher::Globs from StringMap to vector. (PR #140964)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Fri May 23 12:48:03 PDT 2025


================
@@ -553,7 +553,10 @@ void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) {
     // Each section has a matcher with that section's name, attached to that
     // line.
     const auto &DiagSectionMatcher = Entry.SectionMatcher;
-    unsigned DiagLine = DiagSectionMatcher->Globs.at(DiagName).second;
+    unsigned DiagLine = 0;
+    for (const auto &[Pattern, Pair] : DiagSectionMatcher->Globs)
+      if (Pattern == DiagName)
+        DiagLine = Pair.second;
----------------
vitalybuka wrote:

break?

https://github.com/llvm/llvm-project/pull/140964


More information about the cfe-commits mailing list