[llvm-branch-commits] [clang] [clang] Use tighter lifetime bounds for C temporary arguments (PR #170518)

Eli Friedman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 3 13:26:22 PST 2025


================
@@ -6291,6 +6296,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
   for (CallLifetimeEnd &LifetimeEnd : CallLifetimeEndAfterCall)
     LifetimeEnd.Emit(*this, /*Flags=*/{});
 
+  if (!CGM.getCodeGenOpts().NoLifetimeMarkersForTemporaries)
----------------
efriedma-quic wrote:

NoLifetimeMarkersForTemporaries check is unnecessary: if it's disabled, getLifetimeCleanups() will be empty.

How do you handle inserting a lifetime marker on the exception path of an `invoke`?

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


More information about the llvm-branch-commits mailing list