================ @@ -11919,6 +11924,11 @@ bool ArrayExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E, if (const ConstantArrayType *CAT = Info.Ctx.getAsConstantArrayType(Type)) { unsigned FinalSize = CAT->getZExtSize(); + if (!Info.CheckArraySize(E->getExprLoc(), + CAT->getNumAddressingBits(Info.Ctx), FinalSize, + /*Diag=*/true)) ---------------- Sirraide wrote:
I think there’s also a helper that takes the CAT and calls `getZExtSize` and `getNumAddressingBits` for you. https://github.com/llvm/llvm-project/pull/138673 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits