[cfe-dev] get typedef struct name

Gábor Kozár kozargabor at gmail.com
Sun Apr 28 07:08:54 PDT 2013


In the AST, structs and classes are represented by CXXRecordDecl, while
typedefs by TypedefDecl (
http://clang.llvm.org/doxygen/classclang_1_1TypedefNameDecl.html). The
latter should give you all the information you need.


2013/4/23 huc1985 <huc1985 at 163.com>

> Hi all!
> I'm using RecursiveASTVisitor VisitRecordDecl() method to get all struct
> name (include typedef name).
>     e.g.
>     typedef struct XXX
>     {
>        ...
>     }ZZZ;
>   I want get struct name XXX and ZZZ. I just can get name XXX.
>   RecordDecl::getTypedefNameForAnonDecl() get a empty point.
>   So how to get the typedef name?
>   Thanks all!
>
>
>
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/get-typedef-struct-name-tp4031640.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130428/12e61a70/attachment.html>


More information about the cfe-dev mailing list