[PATCH] D88236: [PR47636] Fix tryEmitPrivate to handle non-constantarraytypes

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 24 11:04:08 PDT 2020


rjmccall 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());
----------------
`AT` is now just `ArrayTy`, and I think you can just check `!Filler && !NumInitElts`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88236/new/

https://reviews.llvm.org/D88236



More information about the cfe-commits mailing list