[clang] [clang-tools-extra] Reapply "[clang] Limit lifetimes of temporaries to the full expression (#170517)" (PR #175816)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 6 13:20:15 PDT 2026
================
@@ -2664,6 +2664,10 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal,
}
}
+ if (OperatorDelete && !OperatorDelete->isReservedGlobalPlacementOperator() &&
+ Initializer && (getLangOpts().Exceptions || getLangOpts().CXXExceptions))
----------------
efriedma-quic wrote:
This seems roughly right... but the side-effects seem significant enough that we should land it separately.
Do we really need the check for whether exceptions are enabled here? I'd prefer to keep the AST as similar as possible in different modes.
https://github.com/llvm/llvm-project/pull/175816
More information about the cfe-commits
mailing list