Skip to content

Conversation

@vitalybuka
Copy link
Collaborator

Added in #164524. Fails when using libc++ in a mode that prunes
transitive headers.

Created using spr 1.3.7
@llvmbot
Copy link
Member

llvmbot commented Oct 25, 2025

@llvm/pr-subscribers-llvm-support

@llvm/pr-subscribers-llvm-adt

Author: Vitaly Buka (vitalybuka)

Changes

Added in #164524. Fails when using libc++ in a mode that prunes
transitive headers.


Full diff: https://github.com/llvm/llvm-project/pull/165074.diff

2 Files Affected:

  • (modified) llvm/include/llvm/ADT/RadixTree.h (+1)
  • (modified) llvm/lib/Support/SpecialCaseList.cpp (+5-5)
diff --git a/llvm/include/llvm/ADT/RadixTree.h b/llvm/include/llvm/ADT/RadixTree.h
index d3c44e4e6345c..a65acddf186b7 100644
--- a/llvm/include/llvm/ADT/RadixTree.h
+++ b/llvm/include/llvm/ADT/RadixTree.h
@@ -22,6 +22,7 @@
 #include <limits>
 #include <list>
 #include <utility>
+#include <vector>
 
 namespace llvm {
 
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index 944f59f245be3..1e303ebbfd3f2 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -121,13 +121,13 @@ void SpecialCaseList::GlobMatcher::match(
          SuffixPrefixToGlob.find_prefixes(reverse(Query))) {
       for (const auto &[_, V] : PToGlob.find_prefixes(Query)) {
         for (const auto *G : V) {
-          // Each value of the map is a vector of globs sorted as from best to
-          // worst.
+          // Each value of the map is a vector of globs ordered from the best to
+          // the worst.
           if (G->Pattern.match(Query)) {
             Cb(G->Name, G->LineNo);
-            // As soon as we find a match in the vector we can break for the vector,
-            // vector, but we still need to continue for other values in the
-            // map, as they may contain a better match.
+            // As soon as we find a match in the vector we can break for the
+            // vector, still we can't return, and need to continue for others
+            // values in the map, as they may contain a better match.
             break;
           }
         }

@vitalybuka vitalybuka closed this Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants