The solution is to set <br>_langOpts.CPlusPlus = 1;<br><br><br><div class="gmail_quote">On Thu, Jul 7, 2011 at 4:57 PM, Konstantin Weitz <span dir="ltr"><<a href="mailto:konstantin.weitz@googlemail.com">konstantin.weitz@googlemail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">       Greetings,<br>I posted the same question earlier today on the IRC channel but nobody was able to answer it.<br>

My goal is to find all member functions in a translation unit.<br>I was advised, that I can use CXXRecordDecl to iterate over the members of one class.<br>
<br>In order to get the CXXRecordDecl object for each class in a translation unit, I'm overriding RecursiveASTVisitor's <br>VisitCXXRecordDecl member function. I would expect to get called for each class. What actually happens is that <br>


the VisitVarDecl member is called instead. <br><br>Any idea why this is happening and how I can fix it?<br><br>If you would like to reproduce my results, here is my code<br><br><a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">http://pastebin.com/eFhBfDzb</a><br>


<br>Thanks in advance<br><font color="#888888">Konstantin Weitz<br>
</font></blockquote></div><br>