[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6796053723a6: [CodeGen] Fix the type of the constant that is used to zero-initialize a (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151172/new/ https://reviews.llvm.org/D151172

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. LGTM, but I'll leave it to @efriedma to do the final sign-off. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151172/new/ https://reviews.llvm.org/D151172 ___ cfe-commits

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 524746. ahatanak added a comment. Fix the desired type of incomplete arrays that is passed to `EmitArrayConstant`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151172/new/ https://reviews.llvm.org/D151172

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:964 + if (NonzeroLength == 0 && + (DesiredType->getNumElements() != 0 || Elements.empty())) return llvm::ConstantAggregateZero::get(DesiredType); Not sure I like this

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: efriedma, aaron.ballman, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. `EmitArrayConstant` was incorrectly returning a zeroinitializer of zero-element array type when