[clang] [Clang] Extend lifetime of temporaries in mem-default-init for P2718R0 (PR #86960)

via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 7 07:09:17 PDT 2024


================
@@ -311,9 +311,9 @@ pushTemporaryCleanup(CodeGenFunction &CGF, const MaterializeTemporaryExpr *M,
         CleanupKind CleanupKind;
         if (Lifetime == Qualifiers::OCL_Strong) {
           const ValueDecl *VD = M->getExtendingDecl();
-          bool Precise =
-              VD && isa<VarDecl>(VD) && VD->hasAttr<ObjCPreciseLifetimeAttr>();
-          CleanupKind = CGF.getARCCleanupKind();
+          bool Precise = isa_and_nonnull<VarDecl>(VD) &&
----------------
yronglin wrote:

I've revert this change.

https://github.com/llvm/llvm-project/pull/86960


More information about the cfe-commits mailing list