I'm using RecursiveASTVisitor VisitRecordDecl() method to get all struct
name (include typedef name).
typedef struct XXX
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?
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.