blob: 729c4a0127b4c8b208b79866f5acbdb331685da8 [file] [log] [blame]
commit d8d793f29b40767925578f721b35fba352d8296c
Author: Corentin Jabot <corentinjabot@gmail.com>
Date: Wed Apr 13 22:47:44 2022 +0200
Fix compatibility with retroactive C++23 change [NFC]
Referring to capture in parameter list is now ill-formed.
This change is made to prepare for https://reviews.llvm.org/D119136
diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index 51ffe2807434..5a3c488aa338 100644
--- a/llvm/include/llvm/CodeGen/LiveInterval.h
+++ b/llvm/include/llvm/CodeGen/LiveInterval.h
@@ -625,10 +625,8 @@ namespace llvm {
// if the Seg is lower find first segment that is above Idx using binary
// search
if (Seg->end <= *Idx) {
- Seg = std::upper_bound(
- ++Seg, EndSeg, *Idx,
- [=](std::remove_reference_t<decltype(*Idx)> V,
- const std::remove_reference_t<decltype(*Seg)> &S) {
+ Seg =
+ std::upper_bound(++Seg, EndSeg, *Idx, [=](auto V, const auto &S) {
return V < S.end;
});
if (Seg == EndSeg)