================ @@ -3420,6 +3441,15 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, } Result = VD->getEvaluatedValue(); + + // P2280R4 If we don't have a value because this is a reference that was not + // initialized or whose lifetime began within E then create a value with as + // a ConstexprUnknown status. + if (AllowConstexprUnknown) { + if (!Result) { + Result = new APValue(Base, APValue::ConstexprUnknown{}, CharUnits::One()); + } + } ---------------- Fznamznon wrote:
```suggestion if (AllowConstexprUnknown && !Result) Result = new APValue(Base, APValue::ConstexprUnknown{}, CharUnits::One()); ``` https://github.com/llvm/llvm-project/pull/95474 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits