================ @@ -1073,7 +1075,7 @@ void CodeGenFunction::EmitNewArrayInitializer( return; } - InitListElements = ILE->getNumInits(); + InitListElements = ILE ? ILE->getNumInits() : CPLIE->getInitExprs().size(); ---------------- cor3ntin wrote:
This is not great, but I think it will do for now. Maybe we want to have both CXXParenListInitExpr and InitListExpr inherit from some abstract base class that implement some of the shared functionality with CRTP. We'd avoid all these if. I don't think we need to do that in this patch though https://github.com/llvm/llvm-project/pull/76976 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits