<div dir="ltr">In the AST, structs and classes are represented by CXXRecordDecl, while typedefs by TypedefDecl (<a href="http://clang.llvm.org/doxygen/classclang_1_1TypedefNameDecl.html">http://clang.llvm.org/doxygen/classclang_1_1TypedefNameDecl.html</a>). The latter should give you all the information you need.<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/23 huc1985 <span dir="ltr"><<a href="mailto:huc1985@163.com" target="_blank">huc1985@163.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi all!<br>
I'm using RecursiveASTVisitor VisitRecordDecl() method to get all struct<br>
name (include typedef name).<br>
    e.g.<br>
    typedef struct XXX<br>
    {<br>
       ...<br>
    }ZZZ;<br>
  I want get struct name XXX and ZZZ. I just can get name XXX.<br>
  RecordDecl::getTypedefNameForAnonDecl() get a empty point.<br>
  So how to get the typedef name?<br>
  Thanks all!<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/get-typedef-struct-name-tp4031640.html" target="_blank">http://clang-developers.42468.n3.nabble.com/get-typedef-struct-name-tp4031640.html</a><br>


Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>