[cfe-dev] Access the definition of a class friend

Nikola Smiljanic popizdeh at gmail.com
Sun Jul 13 16:37:20 PDT 2014


Comment for getFriendType says: "If this friend declaration names an
(untemplated but possibly dependent) type, return the type; otherwise
return null.  This is used for elaborated-type-specifiers and, in C++0x,
for arbitrary friend type declarations."

Elaborated type would be 'friend struct A', C++0x case is the one I gave in
previous email. So yes that's the correct way to differentiate them.


On Mon, Jul 14, 2014 at 1:33 AM, Greenwalker <panagos13 at hotmail.com> wrote:

> Thank you Nikola,
>
> I have noticed that FriendDecl::getFriendDecl returns NULL when friend is a
> struct / class while FriendDecl::getFriendType returns NULL when friend is
> a
> function. Is this a correct way to identify the kind of the friend
> (struct/class or function) ?
>
>
>
>
>
> --
> View this message in context:
> http://clang-developers.42468.n3.nabble.com/Access-the-definition-of-a-class-friend-tp4040510p4040519.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140714/0042ad57/attachment.html>


More information about the cfe-dev mailing list