https://github.com/AtariDreams updated 
https://github.com/llvm/llvm-project/pull/85541

>From e4af1febaa05e2749947b7cd406d65df5a1a7539 Mon Sep 17 00:00:00 2001
From: Rose <gfunni...@gmail.com>
Date: Sat, 16 Mar 2024 12:07:21 -0400
Subject: [PATCH] Resolve FIXME: Look at E, not M.

---
 clang/lib/CodeGen/CGExpr.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 59a7fe8925001c..0b8f43dab8a8f0 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -317,11 +317,11 @@ pushTemporaryCleanup(CodeGenFunction &CGF, const 
MaterializeTemporaryExpr *M,
         }
         if (Duration == SD_FullExpression)
           CGF.pushDestroy(CleanupKind, ReferenceTemporary,
-                          M->getType(), *Destroy,
+                          E->getType(), *Destroy,
                           CleanupKind & EHCleanup);
         else
           CGF.pushLifetimeExtendedDestroy(CleanupKind, ReferenceTemporary,
-                                          M->getType(),
+                                          E->getType(),
                                           *Destroy, CleanupKind & EHCleanup);
         return;
 
@@ -445,7 +445,7 @@ EmitMaterializeTemporaryExpr(const MaterializeTemporaryExpr 
*M) {
 
   // FIXME: ideally this would use EmitAnyExprToMem, however, we cannot do so
   // as that will cause the lifetime adjustment to be lost for ARC
-  auto ownership = M->getType().getObjCLifetime();
+  auto ownership = E->getType().getObjCLifetime();
   if (ownership != Qualifiers::OCL_None &&
       ownership != Qualifiers::OCL_ExplicitNone) {
     Address Object = createReferenceTemporary(*this, M, E);

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to