[cfe-dev] Visiting anonymous unions

John McCall rjmccall at apple.com
Fri Aug 17 12:52:49 PDT 2012


On Aug 17, 2012, at 6:23 AM, Sergejs Belajevs wrote:
> I am writing a source-to-source transformation tool and I need a way
> to check if function contains at least one anonymous union inside.

You should see a DeclStmt that declares a single VarDecl whose type
is a RecordType whose RecordDecl has the isAnonymousStructOrUnion()
bit set.

John.



More information about the cfe-dev mailing list