================ @@ -15604,10 +15604,13 @@ bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, LValue LVal; LVal.set(VD); - if (!EvaluateInPlace(Value, Info, LVal, this, - /*AllowNonLiteralTypes=*/true) || - EStatus.HasSideEffects) - return false; + { + FullExpressionRAII Scope(Info); ---------------- shafik wrote:
I think we need to add a comment here similar to the one in `EvaluateAsConstexpr(...)` in this case it would be `A full-expression is ... an init-declarator ([dcl.decl]) or a mem-initializer` see https://eel.is/c++draft/intro.execution#5.4 CC @cor3ntin for second look https://github.com/llvm/llvm-project/pull/69076 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits