================
@@ -4515,6 +4515,8 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr 
*Conv, QualType Type,
       }
 
       APValue Lit;
+      // Make sure we clean up the temporary created below.
+      FullExpressionRAII CleanupTemps(Info);
----------------
ilya-biryukov wrote:

Could we get a reduced test case?

I don't think it's correct to do the cleanups here, we could probably construct 
some examples that break after this change.

There are `ExprWithCleanups` and various other mechanisms that ensure we do all 
the cleanups correctly. This delayed evaluation of compound literals might not 
play well with those cases today, but it's hard to know for sure without 
understanding the full picture. Having an example would help better understand 
if there's a fix needed in a different place.

https://github.com/llvm/llvm-project/pull/118480
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to