[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #97308)

via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 7 23:01:04 PDT 2024


================
@@ -5479,6 +5479,7 @@ void Sema::InstantiateVariableInitializer(
         *this, Sema::ExpressionEvaluationContext::PotentiallyEvaluated, Var);
 
     keepInLifetimeExtendingContext();
+    keepInRebuildDefaultArgOrInitContext();
----------------
yronglin wrote:

I removed these 2 help functions, and doing it directly. It looks more clear.

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


More information about the cfe-commits mailing list