[cfe-dev] printing name of owning anonymous structure in RecursiveASTVisitor::VisitFieldDecl?

Eli Friedman eli.friedman at gmail.com
Tue Dec 11 13:34:28 PST 2012


On Tue, Dec 11, 2012 at 12:20 PM, Peeter Joot <peeter.joot at gmail.com> wrote:
> Thanks Yang,
>
> That works nicely.
>
> However, any idea why this test attempt doesn't correctly identify the
> anonymous nature of the type:
>
>       string s ;
>       if ( r->isAnonymousStructOrUnion() )

Your testcase does not contain an "anonymous union" as defined by C++
[class.union].

-Eli



More information about the cfe-dev mailing list