================
@@ -3696,9 +3696,25 @@ bool Compiler<Emitter>::VisitCXXBindTemporaryExpr(
   return true;
 }
 
+static bool canFoldCompoundLiteralInitializer(const CompoundLiteralExpr *E,
+                                              const ASTContext &Ctx,
+                                              bool IsConstantFolding,
+                                              Expr::EvalResult &Result) {
+  if (!Ctx.getLangOpts().C23 || E->isConstexpr() || IsConstantFolding)
+    return false;
+  if (!E->getInitializer()->EvaluateAsRValue(Result, Ctx))
+    return false;
----------------
tbaederr wrote:

What do I have to do to make gcc accept that? https://godbolt.org/z/cMf84vodf

https://github.com/llvm/llvm-project/pull/212559
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to