clang API Documentation
Declaration of a friend template. More...
#include <DeclTemplate.h>
Public Types | |
typedef llvm::PointerUnion < NamedDecl *, TypeSourceInfo * > | FriendUnion |
Public Member Functions | |
TypeSourceInfo * | getFriendType () const |
NamedDecl * | getFriendDecl () const |
SourceLocation | getFriendLoc () const |
Retrieves the location of the 'friend' keyword. | |
TemplateParameterList * | getTemplateParameterList (unsigned i) const |
unsigned | getNumTemplateParameters () const |
Static Public Member Functions | |
static FriendTemplateDecl * | Create (ASTContext &Context, DeclContext *DC, SourceLocation Loc, unsigned NParams, TemplateParameterList **Params, FriendUnion Friend, SourceLocation FriendLoc) |
static FriendTemplateDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | ASTDeclReader |
Declaration of a friend template.
For example:
template \<typename T> class A { friend class MyVector<T>; // not a friend template template \<typename U> friend class B; // not a friend template template \<typename U> friend class Foo<T>::Nested; // friend template };
Definition at line 2010 of file DeclTemplate.h.
typedef llvm::PointerUnion<NamedDecl*,TypeSourceInfo*> clang::FriendTemplateDecl::FriendUnion |
Definition at line 2013 of file DeclTemplate.h.
static bool clang::FriendTemplateDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Definition at line 2086 of file DeclTemplate.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::FriendTemplateDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::Decl.
Definition at line 2087 of file DeclTemplate.h.
Referenced by classof().
FriendTemplateDecl * FriendTemplateDecl::Create | ( | ASTContext & | Context, |
DeclContext * | DC, | ||
SourceLocation | Loc, | ||
unsigned | NParams, | ||
TemplateParameterList ** | Params, | ||
FriendUnion | Friend, | ||
SourceLocation | FriendLoc | ||
) | [static] |
Definition at line 863 of file DeclTemplate.cpp.
References Context.
Referenced by clang::Sema::ActOnFriendTypeDecl().
FriendTemplateDecl * FriendTemplateDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Definition at line 874 of file DeclTemplate.cpp.
References AttributeLangSupport::C.
NamedDecl* clang::FriendTemplateDecl::getFriendDecl | ( | ) | const [inline] |
If this friend declaration names a templated function (or a member function of a templated type), return that type; otherwise return null.
Definition at line 2067 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().
SourceLocation clang::FriendTemplateDecl::getFriendLoc | ( | ) | const [inline] |
Retrieves the location of the 'friend' keyword.
Definition at line 2072 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().
TypeSourceInfo* clang::FriendTemplateDecl::getFriendType | ( | ) | const [inline] |
If this friend declaration names a templated type (or a dependent member type of a templated type), return that type; otherwise return null.
Definition at line 2060 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().
unsigned clang::FriendTemplateDecl::getNumTemplateParameters | ( | ) | const [inline] |
Definition at line 2081 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().
TemplateParameterList* clang::FriendTemplateDecl::getTemplateParameterList | ( | unsigned | i | ) | const [inline] |
Definition at line 2076 of file DeclTemplate.h.
Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().
friend class ASTDeclReader [friend] |
Reimplemented from clang::Decl.
Definition at line 2089 of file DeclTemplate.h.