<div dir="ltr">FriendDecl::getFriendDecl returns a NamedDecl that you can cast to appropriate subclass. You'll have to use FriendDecl::getFriendType if you're interested in friend declaratons that were introduced in c++11<div>

<br></div><div><div style="font-family:arial,sans-serif;font-size:13px">struct A;</div><div style="font-family:arial,sans-serif;font-size:13px">struct B {</div><div style="font-family:arial,sans-serif;font-size:13px">  friend A; // this doesn't forward declare A as opposed to 'friend struct A'</div>

<div style="font-family:arial,sans-serif;font-size:13px">};</div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 13, 2014 at 2:07 AM, Greenwalker <span dir="ltr"><<a href="mailto:panagos13@hotmail.com" target="_blank">panagos13@hotmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all!<br>
<br>
I am iterating through the friends of a CXXRecordDecl (via friend_iterator)<br>
but I cannot find a way to access the actual definitions of these friends if<br>
they exist (CXXRecordDecl if friend is a class or FunctionDecl if friend is<br>
a function).<br>
<br>
Any suggestions ?<br>
<br>
Thanks! :)<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Access-the-definition-of-a-class-friend-tp4040510.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Access-the-definition-of-a-class-friend-tp4040510.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>