This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix Wnested-anon-types in ABIArgInfo
ClosedPublic

Authored by teemperor on May 21 2021, 12:49 AM.

Details

Summary

D98794 added the DirectAttr/IndirectAttr struct fields to that union, but declaring anonymous structs in an anonymous union
triggers -Wnested-anon-types warnings. We can't just give them a name as they are in an anonymous union, so this just
declares the type outside.

clang/include/clang/CodeGen/CGFunctionInfo.h:97:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
    struct {
    ^
clang/include/clang/CodeGen/CGFunctionInfo.h:101:5: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
    struct {
    ^

Diff Detail

Event Timeline

teemperor requested review of this revision.May 21 2021, 12:49 AM
teemperor created this revision.
chill accepted this revision.May 21 2021, 1:49 AM

LGTM, cheers!

This revision is now accepted and ready to land.May 21 2021, 1:49 AM
This revision was landed with ongoing or failed builds.May 21 2021, 2:19 AM
This revision was automatically updated to reflect the committed changes.