[PATCH] D139261: [Clang] Modify sanity check assert in AggExprEmitter::VisitInitListExpr to cover anonymous struct in a union GNU extension
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 11:54:34 PST 2022
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM with a formatting nit fixed, but you should add a release note for the fix when landing.
================
Comment at: clang/lib/CodeGen/CGExprAgg.cpp:1688
for (const auto *Field : record->fields())
- assert(Field->isUnnamedBitfield() && "Only unnamed bitfields allowed");
+ assert((Field->isUnnamedBitfield() || Field->isAnonymousStructOrUnion()) && "Only unnamed bitfields or ananymous class allowed");
#endif
----------------
Guessing at the way to solve the 80-col limit issue, but do whatever clang-format says.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139261/new/
https://reviews.llvm.org/D139261
More information about the cfe-commits
mailing list