<div dir="rtl"><div dir="ltr">Use RecursiveASTVisitor.h, put your code in Visit<span style="font-family:arial,sans-serif;font-size:12.727272033691406px">FunctionDecl() and test for !isa<</span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">CXXMethodDecl>(FunctionDecl *FD).</span></div>
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Yaron</span></div><div dir="ltr">
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2014-07-04 1:16 GMT+03:00 James Dennett <span dir="ltr"><<a href="mailto:james.dennett@gmail.com" target="_blank">james.dennett@gmail.com</a>></span>:</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Jul 3, 2014 at 10:11 PM, Greenwalker <<a href="mailto:panagos13@hotmail.com">panagos13@hotmail.com</a>> wrote:<br>
> Hi all!<br>
><br>
> Is there a way to identify if a FunctionDecl is a declaration of a function<br>
> that belongs (or not) to a class ?<br>
><br>
> I am trying to build a visitor which should only visit function declarations<br>
> that are not members of any class.<br>
<br>
</div>Check whether it's a clang::CXXMethodDecl?<br>
<span class="HOEnZb"><font color="#888888"><br>
-- James<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>