[cfe-dev] Visiting anonymous unions

Manuel Klimek klimek at google.com
Fri Aug 17 13:28:24 PDT 2012


On Fri, Aug 17, 2012 at 9:52 PM, John McCall <rjmccall at apple.com> wrote:
> 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.

I have played around with that a bit - I have not found a RecordDecl
within the FunctionDecl (but I have found a VarDecl) - if you say that
should be there, that might be a problem with RAV...

Cheers,
/Manuel

>
> John.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list