[PATCH] D130282: [llvm][FileCheck] Fix unit tests failures with EXPENSIVE_CHECKS
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 01:19:46 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3a35bcef2228: [llvm][FileCheck] Fix unit tests failures with EXPENSIVE_CHECKS (authored by DavidSpickett).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130282/new/
https://reviews.llvm.org/D130282
Files:
llvm/lib/FileCheck/FileCheck.cpp
Index: llvm/lib/FileCheck/FileCheck.cpp
===================================================================
--- llvm/lib/FileCheck/FileCheck.cpp
+++ llvm/lib/FileCheck/FileCheck.cpp
@@ -1424,6 +1424,8 @@
// Sort variable captures by the order in which they matched the input.
// Ranges shouldn't be overlapping, so we can just compare the start.
llvm::sort(VarCaptures, [](const VarCapture &A, const VarCapture &B) {
+ if (&A == &B)
+ return false;
assert(A.Range.Start != B.Range.Start &&
"unexpected overlapping variable captures");
return A.Range.Start.getPointer() < B.Range.Start.getPointer();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130282.447215.patch
Type: text/x-patch
Size: 638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220725/aeb300c9/attachment.bin>
More information about the llvm-commits
mailing list