llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Qinkun Bao (qinkunbao)

<details>
<summary>Changes</summary>



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


1 Files Affected:

- (modified) llvm/lib/Support/SpecialCaseList.cpp (+5) 


``````````diff
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();
 }

``````````

</details>


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

Reply via email to