[clang] Resolve FIXME: Look at E, not M (PR #85541)

via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 17 17:04:40 PDT 2024


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

>From c0f8be4fcfb725d53841d4b17a68685e33332a79 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at 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 | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 59a7fe8925001c..0d17aa5863315f 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -316,13 +316,12 @@ pushTemporaryCleanup(CodeGenFunction &CGF, const MaterializeTemporaryExpr *M,
           Destroy = &CodeGenFunction::destroyARCWeak;
         }
         if (Duration == SD_FullExpression)
-          CGF.pushDestroy(CleanupKind, ReferenceTemporary,
-                          M->getType(), *Destroy,
-                          CleanupKind & EHCleanup);
+          CGF.pushDestroy(CleanupKind, ReferenceTemporary, E->getType(),
+                          *Destroy, CleanupKind & EHCleanup);
         else
           CGF.pushLifetimeExtendedDestroy(CleanupKind, ReferenceTemporary,
-                                          M->getType(),
-                                          *Destroy, CleanupKind & EHCleanup);
+                                          E->getType(), *Destroy,
+                                          CleanupKind & EHCleanup);
         return;
 
       case SD_Dynamic:



More information about the cfe-commits mailing list