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

via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 16 09:50:52 PDT 2024


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

None

>From cc61f38116b2b9143dbc96d45a35efc065d258f5 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 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 59a7fe8925001c..c826663955fecf 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -273,9 +273,7 @@ pushTemporaryCleanup(CodeGenFunction &CGF, const MaterializeTemporaryExpr *M,
   // Objective-C++ ARC:
   //   If we are binding a reference to a temporary that has ownership, we
   //   need to perform retain/release operations on the temporary.
-  //
-  // FIXME: This should be looking at E, not M.
-  if (auto Lifetime = M->getType().getObjCLifetime()) {
+  if (auto Lifetime = E->getType().getObjCLifetime()) {
     switch (Lifetime) {
     case Qualifiers::OCL_None:
     case Qualifiers::OCL_ExplicitNone:



More information about the cfe-commits mailing list