[llvm] d8d793f - Fix compatibility with retroactive C++23 change [NFC]

Corentin Jabot via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 13:58:06 PDT 2022


Author: Corentin Jabot
Date: 2022-04-13T22:57:39+02:00
New Revision: d8d793f29b40767925578f721b35fba352d8296c

URL: https://github.com/llvm/llvm-project/commit/d8d793f29b40767925578f721b35fba352d8296c
DIFF: https://github.com/llvm/llvm-project/commit/d8d793f29b40767925578f721b35fba352d8296c.diff

LOG: 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

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/LiveInterval.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index 51ffe28074345..5a3c488aa338d 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)


        


More information about the llvm-commits mailing list