================ @@ -348,6 +348,12 @@ bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) { if (D->isConstexpr()) return true; + if (const auto *VD = dyn_cast_if_present<VarDecl>(S.EvaluatingDecl); + VD && VD->isConstexpr() && S.getLangOpts().C23) { + S.FFDiag(S.Current->getExpr(OpPC)); ---------------- yronglin wrote:
Fixed. https://github.com/llvm/llvm-project/pull/112211 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits