Hello.
In the documentation of AST class FriendTemplateDecl it is said:
01221 /// Declaration of a friend template. For example:
01222 ///
01223 /// template <typename T> class A {
01224 /// friend class MyVector<T>; // not a friend template
01225 /// template <typename U> friend class B; // friend template
01226 /// template <typename U> friend class Foo<T>::Nested; // friend template
I tried the examples above and, as far as I can see, clang generates no FriendTemplateDecl node at all.
For the first friend template declaration
template <typename U> friend class B;
it seems that a "normal" FriendDecl node is produced, containing a NamedDecl node (shouldn't we get a Type node?), which is a ClassTemplateDecl.
For the second frined template declaration
template <typename U> friend class Foo<T>::Nested;
we still obtain a "normal" FriendDecl node, but this time the node contains a Type node (an ElaborateType). In this case there is no list of template parameters.
Is this a known issue or should we file a bug?
Are there other examples where clang actually generates a FriendTemplateDecl node?
Regards,
Enea Zaffanella.