Skip to content

Conversation

@qinkunbao
Copy link
Member

No description provided.

Created using spr 1.3.6
@llvmbot
Copy link
Member

llvmbot commented May 20, 2025

@llvm/pr-subscribers-llvm-support

Author: Qinkun Bao (qinkunbao)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Support/SpecialCaseList.cpp (+5)
diff --git a/llvm/lib/Support/SpecialCaseList.cpp b/llvm/lib/Support/SpecialCaseList.cpp
index dddf84cbb1ced..5145cccc91e3b 100644
--- a/llvm/lib/Support/SpecialCaseList.cpp
+++ b/llvm/lib/Support/SpecialCaseList.cpp
@@ -63,6 +63,11 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber,
                        .moveInto(Pair.first))
       return Err;
     Pair.second = LineNumber;
+  } else {
+    // We should update the new line number if an entry with the same pattern
+    // repeats.
+    auto &Pair = It->getValue();
+    Pair.second = LineNumber;
   }
   return Error::success();
 }

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.

3 participants