rsmith added inline comments.
================ Comment at: clang/lib/CodeGen/CGExprConstant.cpp:2148 + CommonElementType == nullptr && !NumInitElts) { const ArrayType *AT = CGM.getContext().getAsArrayType(DestType); CommonElementType = CGM.getTypes().ConvertType(AT->getElementType()); ---------------- rjmccall wrote: > `AT` is now just `ArrayTy`, and I think you can just check `!Filler && > !NumInitElts`. `Filler` is null if and only if `NumElements == NumInitElts`, and `NumInitElts <= NumElements`, so this condition reduces to `if (!NumElements)`. `EmitArrayConstant` responds to that case by creating a `ConstantAggregateZero` of its destination type. So it seems to me that we probably don't need this special case at all. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88236/new/ https://reviews.llvm.org/D88236 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits