clang  6.0.0svn
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::DependentFunctionTemplateSpecializationInfo Class Referencefinal

Provides information about a dependent function-template specialization declaration. More...

#include "clang/AST/DeclTemplate.h"

Inheritance diagram for clang::DependentFunctionTemplateSpecializationInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::DependentFunctionTemplateSpecializationInfo:
Collaboration graph
[legend]

Public Member Functions

unsigned getNumTemplates () const
 Returns the number of function templates that this might be a specialization of. More...
 
FunctionTemplateDeclgetTemplate (unsigned I) const
 Returns the i'th template candidate. More...
 
const TemplateArgumentLocgetTemplateArgs () const
 Returns the explicit template arguments that were given. More...
 
unsigned getNumTemplateArgs () const
 Returns the number of explicit template arguments that were given. More...
 
const TemplateArgumentLocgetTemplateArg (unsigned I) const
 Returns the nth template argument. More...
 
SourceLocation getLAngleLoc () const
 
SourceLocation getRAngleLoc () const
 

Static Public Member Functions

static DependentFunctionTemplateSpecializationInfoCreate (ASTContext &Context, const UnresolvedSetImpl &Templates, const TemplateArgumentListInfo &TemplateArgs)
 

Public Attributes

friend TrailingObjects
 

Detailed Description

Provides information about a dependent function-template specialization declaration.

Since explicit function template specialization and instantiation declarations can only appear in namespace scope, and you can only specialize a member of a fully-specialized class, the only way to get one of these is in a friend declaration like the following:

template \<class T> void foo(T);
template \<class T> class A {
friend void foo<>(T);
};

Definition at line 659 of file DeclTemplate.h.

Member Function Documentation

◆ Create()

DependentFunctionTemplateSpecializationInfo * DependentFunctionTemplateSpecializationInfo::Create ( ASTContext Context,
const UnresolvedSetImpl Templates,
const TemplateArgumentListInfo TemplateArgs 
)
static

Definition at line 3394 of file Decl.cpp.

◆ getLAngleLoc()

SourceLocation clang::DependentFunctionTemplateSpecializationInfo::getLAngleLoc ( ) const
inline

Definition at line 712 of file DeclTemplate.h.

References clang::SourceRange::getBegin().

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

◆ getNumTemplateArgs()

unsigned clang::DependentFunctionTemplateSpecializationInfo::getNumTemplateArgs ( ) const
inline

Returns the number of explicit template arguments that were given.

Definition at line 704 of file DeclTemplate.h.

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

◆ getNumTemplates()

unsigned clang::DependentFunctionTemplateSpecializationInfo::getNumTemplates ( ) const
inline

Returns the number of function templates that this might be a specialization of.

Definition at line 690 of file DeclTemplate.h.

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

◆ getRAngleLoc()

SourceLocation clang::DependentFunctionTemplateSpecializationInfo::getRAngleLoc ( ) const
inline

Definition at line 716 of file DeclTemplate.h.

References clang::SourceRange::getEnd().

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

◆ getTemplate()

FunctionTemplateDecl* clang::DependentFunctionTemplateSpecializationInfo::getTemplate ( unsigned  I) const
inline

Returns the i'th template candidate.

Definition at line 693 of file DeclTemplate.h.

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

◆ getTemplateArg()

const TemplateArgumentLoc& clang::DependentFunctionTemplateSpecializationInfo::getTemplateArg ( unsigned  I) const
inline

Returns the nth template argument.

Definition at line 707 of file DeclTemplate.h.

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

◆ getTemplateArgs()

const TemplateArgumentLoc* clang::DependentFunctionTemplateSpecializationInfo::getTemplateArgs ( ) const
inline

Returns the explicit template arguments that were given.

Definition at line 699 of file DeclTemplate.h.

Member Data Documentation

◆ TrailingObjects

friend clang::DependentFunctionTemplateSpecializationInfo::TrailingObjects

Definition at line 720 of file DeclTemplate.h.


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