Skip to content

Anonymous struct construct causes a Clang front-end assertion. #86855

@dgilmore83

Description

@dgilmore83

A ToT "asserts" build of Clang in the following test case that uses the anonymous struct construct. I attached the test case per the "HowToSubmitABug" instructions:
anon-6e7926.cpp.txt
anon-6e7926.sh.txt

The assertion message is:
clang++: /tmp/dgilmore/tt/clang/lib/CodeGen/CGExprAgg.cpp:1751: void {anonymous}::AggExprEmitter::VisitCXXParenListOrInitListExpr(clang::Expr*, llvm::ArrayRefclang::Expr*, clang::FieldDecl*, clang::Expr*): Assertion `(Field->isUnnamedBitfield() || Field->isAnonymousStructOrUnion()) && "Only unnamed bitfields or ananymous class allowed"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:codegenIR generation bugs: mangling, exceptions, etc.crashPrefer [crash-on-valid] or [crash-on-invalid]

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions