clang  3.9.0
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::FriendTemplateDecl Class Reference

Declaration of a friend template. More...

#include <DeclTemplate.h>

Inheritance diagram for clang::FriendTemplateDecl:
[legend]
Collaboration diagram for clang::FriendTemplateDecl:
[legend]

Public Types

typedef llvm::PointerUnion
< NamedDecl *, TypeSourceInfo * > 
FriendUnion
 

Public Member Functions

TypeSourceInfogetFriendType () const
 If this friend declaration names a templated type (or a dependent member type of a templated type), return that type; otherwise return null. More...
 
NamedDeclgetFriendDecl () const
 If this friend declaration names a templated function (or a member function of a templated type), return that type; otherwise return null. More...
 
SourceLocation getFriendLoc () const
 Retrieves the location of the 'friend' keyword. More...
 
TemplateParameterListgetTemplateParameterList (unsigned i) const
 
unsigned getNumTemplateParameters () const
 

Static Public Member Functions

static FriendTemplateDeclCreate (ASTContext &Context, DeclContext *DC, SourceLocation Loc, MutableArrayRef< TemplateParameterList * > Params, FriendUnion Friend, SourceLocation FriendLoc)
 
static FriendTemplateDeclCreateDeserialized (ASTContext &C, unsigned ID)
 
static bool classof (const Decl *D)
 
static bool classofKind (Kind K)
 

Friends

class ASTDeclReader
 

Detailed Description

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
};
Note
This class is not currently in use. All of the above will yield a FriendDecl, not a FriendTemplateDecl.

Definition at line 2144 of file DeclTemplate.h.

Member Typedef Documentation

Definition at line 2147 of file DeclTemplate.h.

Member Function Documentation

static bool clang::FriendTemplateDecl::classof ( const Decl D)
inlinestatic

Definition at line 2211 of file DeclTemplate.h.

static bool clang::FriendTemplateDecl::classofKind ( Kind  K)
inlinestatic

Definition at line 2212 of file DeclTemplate.h.

FriendTemplateDecl * FriendTemplateDecl::Create ( ASTContext Context,
DeclContext DC,
SourceLocation  Loc,
MutableArrayRef< TemplateParameterList * >  Params,
FriendUnion  Friend,
SourceLocation  FriendLoc 
)
static

Definition at line 875 of file DeclTemplate.cpp.

References Context.

Referenced by clang::Sema::ActOnFriendTypeDecl().

FriendTemplateDecl * FriendTemplateDecl::CreateDeserialized ( ASTContext C,
unsigned  ID 
)
static

Definition at line 882 of file DeclTemplate.cpp.

References ID.

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 2192 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 2197 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 2185 of file DeclTemplate.h.

Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().

unsigned clang::FriendTemplateDecl::getNumTemplateParameters ( ) const
inline

Definition at line 2206 of file DeclTemplate.h.

Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().

TemplateParameterList* clang::FriendTemplateDecl::getTemplateParameterList ( unsigned  i) const
inline

Definition at line 2201 of file DeclTemplate.h.

Referenced by clang::ASTDeclWriter::VisitFriendTemplateDecl().

Friends And Related Function Documentation

friend class ASTDeclReader
friend

Definition at line 2214 of file DeclTemplate.h.


The documentation for this class was generated from the following files: