[Clang] Modify sanity check assert in AggExprEmitter::VisitInitListExpr to cover...
authorShafik Yaghmour <shafik.yaghmour@intel.com>
Wed, 21 Dec 2022 18:47:52 +0000 (10:47 -0800)
committerShafik Yaghmour <shafik.yaghmour@intel.com>
Wed, 21 Dec 2022 18:50:05 +0000 (10:50 -0800)
commit475cc44a2cba45c5449a323c6b331ddc593bd8de
tree9215b8ab0a281f0af445d08a2104cfaae69ce36d
parent5bcd980137822fe0d564062656f96dd0795358da
[Clang] Modify sanity check assert in AggExprEmitter::VisitInitListExpr to cover anonymous struct in a union GNU extension

AggExprEmitter::VisitInitListExpr sanity checks that an empty union is really
empty and not a semantic analysis failure. The assert is missing that we allow
anonymous structs as a GNU extension. I have updated the assert to take that into account.

This fixes: https://github.com/llvm/llvm-project/issues/58800

Differential Revision: https://reviews.llvm.org/D139261
clang/docs/ReleaseNotes.rst
clang/lib/CodeGen/CGExprAgg.cpp
clang/test/SemaCXX/anonymous-struct.cpp