clang  3.9.0svn
Public Types | Public Member Functions | List of all members
clang::TemplateDeclInstantiator Class Reference

#include <Template.h>

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

Public Types

typedef SmallVectorImpl< std::pair< ClassTemplateDecl *, ClassTemplatePartialSpecializationDecl * > >::iterator delayed_partial_spec_iterator
 
typedef SmallVectorImpl< std::pair< VarTemplateDecl *, VarTemplatePartialSpecializationDecl * > >::iterator delayed_var_partial_spec_iterator
 

Public Member Functions

 TemplateDeclInstantiator (Sema &SemaRef, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
 
DeclVisitCXXMethodDecl (CXXMethodDecl *D, TemplateParameterList *TemplateParams, bool IsClassScopeSpecialization=false)
 
DeclVisitFunctionDecl (FunctionDecl *D, TemplateParameterList *TemplateParams)
 Normal class members are of more specific types and therefore don't make it here. More...
 
DeclVisitDecl (Decl *D)
 
DeclVisitVarDecl (VarDecl *D, bool InstantiatingVarTemplate)
 
void enableLateAttributeInstantiation (Sema::LateInstantiatedAttrVec *LA)
 
void disableLateAttributeInstantiation ()
 
LocalInstantiationScopegetStartingScope () const
 
delayed_partial_spec_iterator delayed_partial_spec_begin ()
 Return an iterator to the beginning of the set of "delayed" partial specializations, which must be passed to InstantiateClassTemplatePartialSpecialization once the class definition has been completed. More...
 
delayed_var_partial_spec_iterator delayed_var_partial_spec_begin ()
 
delayed_partial_spec_iterator delayed_partial_spec_end ()
 Return an iterator to the end of the set of "delayed" partial specializations, which must be passed to InstantiateClassTemplatePartialSpecialization once the class definition has been completed. More...
 
delayed_var_partial_spec_iterator delayed_var_partial_spec_end ()
 
TypeSourceInfoSubstFunctionType (FunctionDecl *D, SmallVectorImpl< ParmVarDecl * > &Params)
 
bool InitFunctionInstantiation (FunctionDecl *New, FunctionDecl *Tmpl)
 Initializes the common fields of an instantiation function declaration (New) from the corresponding fields of its template (Tmpl). More...
 
bool InitMethodInstantiation (CXXMethodDecl *New, CXXMethodDecl *Tmpl)
 Initializes common fields of an instantiated method declaration (New) from the corresponding fields of its template (Tmpl). More...
 
TemplateParameterListSubstTemplateParams (TemplateParameterList *List)
 Instantiates a nested template parameter list in the current instantiation context. More...
 
bool SubstQualifier (const DeclaratorDecl *OldDecl, DeclaratorDecl *NewDecl)
 
bool SubstQualifier (const TagDecl *OldDecl, TagDecl *NewDecl)
 
DeclVisitVarTemplateSpecializationDecl (VarTemplateDecl *VarTemplate, VarDecl *FromVar, void *InsertPos, const TemplateArgumentListInfo &TemplateArgsInfo, ArrayRef< TemplateArgument > Converted)
 
DeclInstantiateTypedefNameDecl (TypedefNameDecl *D, bool IsTypeAlias)
 
ClassTemplatePartialSpecializationDeclInstantiateClassTemplatePartialSpecialization (ClassTemplateDecl *ClassTemplate, ClassTemplatePartialSpecializationDecl *PartialSpec)
 Instantiate the declaration of a class template partial specialization. More...
 
VarTemplatePartialSpecializationDeclInstantiateVarTemplatePartialSpecialization (VarTemplateDecl *VarTemplate, VarTemplatePartialSpecializationDecl *PartialSpec)
 Instantiate the declaration of a variable template partial specialization. More...
 
void InstantiateEnumDefinition (EnumDecl *Enum, EnumDecl *Pattern)
 
- Public Member Functions inherited from clang::declvisitor::Base< declvisitor::make_ptr, TemplateDeclInstantiator, Decl * >
DeclVisit (PTR(Decl) D)
 
DeclVisitDecl (PTR(Decl) D)
 

Detailed Description

Definition at line 371 of file Template.h.

Member Typedef Documentation

Definition at line 457 of file Template.h.

Definition at line 461 of file Template.h.

Constructor & Destructor Documentation

clang::TemplateDeclInstantiator::TemplateDeclInstantiator ( Sema SemaRef,
DeclContext Owner,
const MultiLevelTemplateArgumentList TemplateArgs 
)
inline

Definition at line 397 of file Template.h.

Member Function Documentation

delayed_partial_spec_iterator clang::TemplateDeclInstantiator::delayed_partial_spec_begin ( )
inline

Return an iterator to the beginning of the set of "delayed" partial specializations, which must be passed to InstantiateClassTemplatePartialSpecialization once the class definition has been completed.

Definition at line 467 of file Template.h.

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

delayed_partial_spec_iterator clang::TemplateDeclInstantiator::delayed_partial_spec_end ( )
inline

Return an iterator to the end of the set of "delayed" partial specializations, which must be passed to InstantiateClassTemplatePartialSpecialization once the class definition has been completed.

Definition at line 479 of file Template.h.

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

delayed_var_partial_spec_iterator clang::TemplateDeclInstantiator::delayed_var_partial_spec_begin ( )
inline

Definition at line 471 of file Template.h.

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

delayed_var_partial_spec_iterator clang::TemplateDeclInstantiator::delayed_var_partial_spec_end ( )
inline

Definition at line 483 of file Template.h.

References SubstQualifier().

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

void clang::TemplateDeclInstantiator::disableLateAttributeInstantiation ( )
inline

Definition at line 446 of file Template.h.

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

void clang::TemplateDeclInstantiator::enableLateAttributeInstantiation ( Sema::LateInstantiatedAttrVec LA)
inline

Definition at line 440 of file Template.h.

References clang::Sema::CurrentInstantiationScope.

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

LocalInstantiationScope* clang::TemplateDeclInstantiator::getStartingScope ( ) const
inline

Definition at line 451 of file Template.h.

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

bool TemplateDeclInstantiator::InitFunctionInstantiation ( FunctionDecl New,
FunctionDecl Tmpl 
)
bool TemplateDeclInstantiator::InitMethodInstantiation ( CXXMethodDecl New,
CXXMethodDecl Tmpl 
)

Initializes common fields of an instantiated method declaration (New) from the corresponding fields of its template (Tmpl).

Returns
true if there was an error

Definition at line 3500 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::getAccess(), InitFunctionInstantiation(), clang::FunctionDecl::isVirtualAsWritten(), clang::Decl::setAccess(), and clang::FunctionDecl::setVirtualAsWritten().

Referenced by VisitCXXMethodDecl().

ClassTemplatePartialSpecializationDecl * TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization ( ClassTemplateDecl ClassTemplate,
ClassTemplatePartialSpecializationDecl PartialSpec 
)

Instantiate the declaration of a class template partial specialization.

Parameters
ClassTemplatethe (instantiated) class template that is partially
PartialSpecthe (uninstantiated) class template partial specialization that we are instantiating.
Returns
The instantiated partial specialization, if successful; otherwise, NULL to indicate an error.

Definition at line 2969 of file SemaTemplateInstantiateDecl.cpp.

References clang::Sema::CheckTemplateArgumentList(), clang::Sema::Context, clang::ClassTemplatePartialSpecializationDecl::Create(), clang::Sema::Diag(), clang::ClassTemplateDecl::findPartialSpecialization(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::TagDecl::getTagKind(), clang::ASTTemplateArgumentListInfo::getTemplateArgs(), clang::ClassTemplatePartialSpecializationDecl::getTemplateArgsAsWritten(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTTemplateArgumentListInfo::LAngleLoc, clang::ASTTemplateArgumentListInfo::NumTemplateArgs, clang::ASTTemplateArgumentListInfo::RAngleLoc, clang::ClassTemplatePartialSpecializationDecl::setInstantiatedFromMember(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::Sema::Subst(), SubstQualifier(), and SubstTemplateParams().

Referenced by clang::Sema::InstantiateClass(), and InstantiateEnumDefinition().

void TemplateDeclInstantiator::InstantiateEnumDefinition ( EnumDecl Enum,
EnumDecl Pattern 
)

Definition at line 965 of file SemaTemplateInstantiateDecl.cpp.

References clang::Sema::ActOnEnumBody(), clang::DeclContext::addDecl(), clang::ASTContext::addDeclaratorForUnnamedTagDecl(), clang::ASTContext::addTypedefNameForUnnamedTagDecl(), clang::CXXScopeSpec::Adopt(), clang::AS_none, clang::Sema::CheckEnumConstant(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckTemplateParameterList(), clang::Sema::computeDeclContext(), clang::Sema::ConstantEvaluated, clang::Sema::Context, clang::CXXRecordDecl::Create(), clang::ClassTemplateDecl::Create(), clang::VarTemplateDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::Sema::Diag(), clang::Sema::DiagnoseUnusedNestedTypedefs(), clang::DeclContextLookupResult::empty(), clang::EnumDecl::enumerators(), clang::Sema::FindInstantiatedContext(), clang::Sema::FindInstantiatedDecl(), clang::ClassTemplateDecl::findPartialSpecInstantiatedFromMember(), clang::Decl::FOK_None, clang::Sema::ForRedeclaration, clang::DeclContextLookupResult::front(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::ASTContext::getDeclaratorForUnnamedTagDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getFriendObjectKind(), clang::NamedDecl::getIdentifier(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInjectedClassNameType(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::ASTContext::getManglingNumber(), clang::DeclContext::getParent(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::VarTemplateDecl::getPartialSpecializations(), getPreviousDeclForInstantiation(), clang::TagDecl::getQualifierLoc(), clang::TagDecl::getRBraceLoc(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), clang::VarTemplateSpecializationDecl::getSpecializedTemplate(), clang::TagDecl::getTagKind(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::VarTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTypedefNameForUnnamedTagDecl(), clang::Sema::InstantiateAttrs(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateClassMembers(), InstantiateClassTemplatePartialSpecialization(), clang::LocalInstantiationScope::InstantiatedLocal(), InstantiateVarTemplatePartialSpecialization(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::TagDecl::isCompleteDefinition(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isImplicit(), clang::RecordDecl::isInjectedClassName(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isInvalid(), clang::CXXRecordDecl::isLocalClass(), clang::DeclContext::isNamespace(), clang::Decl::isOutOfLine(), clang::DeclContext::isRecord(), clang::EnumDecl::isScoped(), clang::VarDecl::isStaticDataMember(), clang::IdentifierInfo::isStr(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::DeclContext::lookup(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), clang::Sema::PerformPendingInstantiations(), clang::Result, clang::Decl::setAccess(), clang::VarDecl::setDescribedVarTemplate(), clang::Decl::setImplicit(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocation(), clang::ASTContext::setManglingNumber(), clang::Decl::setObjectOfFriendDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TagDecl::setQualifierInfo(), clang::TagDecl::startDefinition(), clang::Sema::SubstExpr(), clang::Sema::SubstNestedNameSpecifierLoc(), SubstQualifier(), SubstTemplateParams(), clang::Sema::TemplateParameterListsAreEqual(), clang::Sema::TPC_ClassTemplate, clang::Sema::TPL_TemplateMatch, clang::TSK_ImplicitInstantiation, VisitCXXMethodDecl(), VisitFunctionDecl(), and VisitVarDecl().

Referenced by clang::Sema::InstantiateEnum(), and VisitVarDecl().

Decl * TemplateDeclInstantiator::InstantiateTypedefNameDecl ( TypedefNameDecl D,
bool  IsTypeAlias 
)

Definition at line 469 of file SemaTemplateInstantiateDecl.cpp.

References clang::DeclContext::addDecl(), clang::Type::castAs(), clang::Sema::Context, clang::TypeAliasTemplateDecl::Create(), clang::TypedefDecl::Create(), clang::TypeAliasDecl::Create(), clang::DeclContextLookupResult::empty(), clang::Sema::FindInstantiatedDecl(), clang::DeclContextLookupResult::front(), clang::Decl::getAccess(), clang::Type::getAs(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::QualType::getNonReferenceType(), getPreviousDeclForInstantiation(), clang::Sema::getSourceManager(), clang::Sema::getStdNamespace(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::TagDecl::getTypedefNameForAnonDecl(), clang::TypedefNameDecl::getTypeSourceInfo(), clang::DecltypeType::getUnderlyingExpr(), clang::TypedefNameDecl::getUnderlyingType(), clang::TagDecl::hasNameForLinkage(), clang::Sema::InstantiateAttrs(), clang::ASTContext::IntTy, clang::Sema::isIncompatibleTypedef(), clang::Type::isInstantiationDependentType(), clang::SourceManager::isInSystemHeader(), clang::Type::isReferenceType(), clang::IdentifierInfo::isStr(), clang::Type::isVariablyModifiedType(), clang::DeclContext::lookup(), clang::Sema::MarkDeclarationsReferencedInType(), clang::Decl::setAccess(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), clang::Decl::setInvalidDecl(), clang::Redeclarable< decl_type >::setPreviousDecl(), clang::TagDecl::setTypedefNameForAnonDecl(), SubstTemplateParams(), and clang::Sema::SubstType().

VarTemplatePartialSpecializationDecl * TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization ( VarTemplateDecl VarTemplate,
VarTemplatePartialSpecializationDecl PartialSpec 
)

Instantiate the declaration of a variable template partial specialization.

Parameters
VarTemplatethe (instantiated) variable template that is partially specialized by the instantiation of PartialSpec.
PartialSpecthe (uninstantiated) variable template partial specialization that we are instantiating.
Returns
The instantiated partial specialization, if successful; otherwise, NULL to indicate an error.

Definition at line 3096 of file SemaTemplateInstantiateDecl.cpp.

References clang::Sema::BuildVariableInstantiation(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::Context, clang::VarTemplatePartialSpecializationDecl::Create(), clang::Sema::Diag(), clang::VarTemplateDecl::findPartialSpecialization(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::VarDecl::getStorageClass(), clang::ASTTemplateArgumentListInfo::getTemplateArgs(), clang::VarTemplatePartialSpecializationDecl::getTemplateArgsAsWritten(), clang::VarTemplatePartialSpecializationDecl::getTemplateParameters(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Type::isFunctionType(), clang::VarDecl::isStaticDataMember(), clang::ASTTemplateArgumentListInfo::LAngleLoc, clang::ASTTemplateArgumentListInfo::NumTemplateArgs, clang::ASTTemplateArgumentListInfo::RAngleLoc, clang::VarTemplatePartialSpecializationDecl::setInstantiatedFromMember(), clang::VarTemplateSpecializationDecl::setTypeAsWritten(), clang::Sema::Subst(), SubstQualifier(), SubstTemplateParams(), and clang::Sema::SubstType().

Referenced by clang::Sema::InstantiateClass(), and InstantiateEnumDefinition().

TypeSourceInfo * TemplateDeclInstantiator::SubstFunctionType ( FunctionDecl D,
SmallVectorImpl< ParmVarDecl * > &  Params 
)
bool TemplateDeclInstantiator::SubstQualifier ( const DeclaratorDecl OldDecl,
DeclaratorDecl NewDecl 
)
bool TemplateDeclInstantiator::SubstQualifier ( const TagDecl OldDecl,
TagDecl NewDecl 
)

Definition at line 70 of file SemaTemplateInstantiateDecl.cpp.

References SubstQualifier().

TemplateParameterList * TemplateDeclInstantiator::SubstTemplateParams ( TemplateParameterList L)
Decl * TemplateDeclInstantiator::VisitCXXMethodDecl ( CXXMethodDecl D,
TemplateParameterList TemplateParams,
bool  IsClassScopeSpecialization = false 
)

Definition at line 1758 of file SemaTemplateInstantiateDecl.cpp.

References clang::DeclContext::addDecl(), clang::MultiLevelTemplateArgumentList::addOuterTemplateArguments(), adjustFunctionTypeForInstantiation(), clang::CXXScopeSpec::Adopt(), clang::AS_public, clang::TypeLoc::castAs(), clang::Sema::CheckFriendAccess(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckParameterPacksForExpansion(), clang::Sema::CheckPureMethod(), clang::LookupResult::clear(), clang::Sema::collectUnexpandedParameterPacks(), clang::Sema::computeDeclContext(), clang::Sema::ConstantEvaluated, clang::Sema::Context, clang::FunctionTemplateDecl::Create(), clang::TemplateTypeParmDecl::Create(), clang::NonTypeTemplateParmDecl::Create(), clang::CXXMethodDecl::Create(), clang::CXXConstructorDecl::Create(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), clang::TemplateArgumentList::CreateCopy(), clang::Sema::CurrentInstantiationScope, clang::TemplateTypeParmDecl::defaultArgumentWasInherited(), clang::NonTypeTemplateParmDecl::defaultArgumentWasInherited(), clang::LookupResult::empty(), clang::Sema::FindInstantiatedContext(), clang::FunctionTemplateDecl::findSpecialization(), clang::Decl::FOK_None, clang::Sema::ForRedeclaration, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::NonTypeTemplateParmDecl::getDefaultArgument(), clang::TemplateTypeParmDecl::getDefaultArgumentInfo(), clang::TemplateTypeParmDecl::getDefaultArgumentLoc(), clang::TemplateParmPosition::getDepth(), clang::TemplateTypeParmDecl::getDepth(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::NonTypeTemplateParmDecl::getExpansionTypeSourceInfo(), clang::Decl::getFriendObjectKind(), clang::NamedDecl::getIdentifier(), clang::TemplateTypeParmDecl::getIndex(), clang::DeclaratorDecl::getInnerLocStart(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::TypeDecl::getLocStart(), clang::FunctionDecl::getNameInfo(), clang::PackExpansionType::getNumExpansions(), clang::NonTypeTemplateParmDecl::getNumExpansionTypes(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::TemplateParmPosition::getPosition(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::DeclaratorDecl::getQualifierLoc(), clang::DeclaratorDecl::getTemplateParameterList(), clang::TypeSourceInfo::getType(), clang::TypeDecl::getTypeForDecl(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::NonTypeTemplateParmDecl::hasDefaultArgument(), InitMethodInstantiation(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::ASTContext::IntTy, clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDeletedAsWritten(), clang::NonTypeTemplateParmDecl::isExpandedParameterPack(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::FunctionDecl::isInlined(), clang::FunctionDecl::isInlineSpecified(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::QualType::isNull(), clang::FunctionDecl::isOutOfLine(), clang::NonTypeTemplateParmDecl::isPackExpansion(), clang::TemplateTypeParmDecl::isParameterPack(), clang::NonTypeTemplateParmDecl::isParameterPack(), clang::FunctionDecl::isPure(), clang::LookupResult::isSingleTagDecl(), clang::CXXMethodDecl::isStatic(), clang::Type::isTemplateTypeParmType(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), clang::None, P, Previous, clang::Sema::RequireCompleteDeclContext(), clang::SC_None, clang::SC_Static, clang::Decl::setAccess(), clang::Sema::SetDeclDefaulted(), clang::Sema::SetDeclDeleted(), clang::FunctionDecl::setImplicitlyInline(), clang::Decl::setLexicalDeclContext(), clang::Decl::setObjectOfFriendDecl(), clang::Sema::SubstDecl(), clang::Sema::SubstDeclarationNameInfo(), clang::Sema::SubstExpr(), SubstFunctionType(), clang::Sema::SubstNestedNameSpecifierLoc(), clang::Sema::SubstParmVarDecl(), SubstTemplateParams(), clang::Sema::SubstType(), clang::TSK_ImplicitInstantiation, and clang::TemplateTypeParmDecl::wasDeclaredWithTypename().

Referenced by collectUnexpandedParameterPacks(), and InstantiateEnumDefinition().

Decl * TemplateDeclInstantiator::VisitDecl ( Decl D)

Definition at line 2912 of file SemaTemplateInstantiateDecl.cpp.

Decl * TemplateDeclInstantiator::VisitFunctionDecl ( FunctionDecl D,
TemplateParameterList TemplateParams 
)

Normal class members are of more specific types and therefore don't make it here.

This function serves two purposes: 1) instantiating function templates 2) substituting friend declarations

Definition at line 1483 of file SemaTemplateInstantiateDecl.cpp.

References clang::Sema::adjustContextForLocalExternDecl(), adjustFunctionTypeForInstantiation(), clang::CXXScopeSpec::Adopt(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::computeDeclContext(), clang::Sema::Context, clang::FunctionTemplateDecl::Create(), clang::FunctionDecl::Create(), clang::TemplateArgumentList::CreateCopy(), clang::Sema::Diag(), clang::Sema::FindInstantiatedContext(), clang::Sema::FindInstantiatedDecl(), clang::FunctionTemplateDecl::findSpecialization(), clang::Decl::FOK_None, clang::Sema::ForRedeclaration, clang::FunctionDecl::getCanonicalDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDependentSpecializationInfo(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::SourceRange::getEnd(), clang::Decl::getFriendObjectKind(), clang::DeclaratorDecl::getInnerLocStart(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Decl::getLocation(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::FunctionDecl::getNameInfo(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::DeclaratorDecl::getQualifierLoc(), clang::FunctionDecl::getSourceRange(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::FunctionDecl::hasWrittenPrototype(), clang::Decl::IDNS_Ordinary, InitFunctionInstantiation(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInIdentifierNamespace(), clang::FunctionDecl::isInlined(), clang::FunctionDecl::isInlineSpecified(), clang::Decl::isLocalExternDecl(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isOverloadedOperator(), clang::DeclContext::isRecord(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::LookupRedeclarationWithLinkage, clang::DeclContext::makeDeclVisibleInContext(), P, clang::Sema::PendingLocalImplicitInstantiations, Previous, clang::Redeclarable< decl_type >::redecls(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::FunctionDecl::setImplicitlyInline(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::Decl::setLocalExternDecl(), clang::Decl::setNonMemberOperator(), clang::Decl::setObjectOfFriendDecl(), clang::DeclaratorDecl::setQualifierInfo(), clang::FunctionDecl::setRangeEnd(), clang::Sema::Subst(), SubstFunctionType(), clang::Sema::SubstNestedNameSpecifierLoc(), clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.

Referenced by collectUnexpandedParameterPacks(), and InstantiateEnumDefinition().

Decl * TemplateDeclInstantiator::VisitVarDecl ( VarDecl D,
bool  InstantiatingVarTemplate 
)

Definition at line 601 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::addAttr(), clang::DeclContext::addDecl(), clang::ASTContext::addDeclaratorForUnnamedTagDecl(), clang::DeclContext::addHiddenDecl(), clang::ASTContext::addTypedefNameForUnnamedTagDecl(), clang::Sema::adjustContextForLocalExternDecl(), clang::AS_public, clang::Decl::attrs(), clang::Sema::BuildStaticAssertDeclaration(), clang::Sema::BuildVariableInstantiation(), clang::IndirectFieldDecl::chain(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFriendTypeDecl(), clang::Attr::clone(), clang::Sema::ConstantEvaluated, clang::Sema::Context, clang::FriendDecl::Create(), clang::AccessSpecDecl::Create(), clang::VarDecl::Create(), clang::IndirectFieldDecl::Create(), clang::EnumDecl::Create(), clang::MSPropertyDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::Sema::Diag(), clang::Sema::FindInstantiatedDecl(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::AccessSpecDecl::getAccessSpecifierLoc(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::StaticAssertDecl::getAssertExpr(), clang::FieldDecl::getBitWidth(), clang::IndirectFieldDecl::getChainingSize(), clang::AccessSpecDecl::getColonLoc(), clang::ASTContext::getDeclaratorForUnnamedTagDecl(), clang::NamedDecl::getDeclName(), clang::EnumDecl::getDefinition(), clang::FriendDecl::getFriendDecl(), clang::FriendDecl::getFriendLoc(), clang::FriendDecl::getFriendType(), clang::MSPropertyDecl::getGetterId(), clang::NamedDecl::getIdentifier(), clang::FieldDecl::getInClassInitStyle(), clang::DeclaratorDecl::getInnerLocStart(), clang::EnumDecl::getIntegerType(), clang::EnumDecl::getIntegerTypeSourceInfo(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::Decl::getLocStart(), clang::DeclaratorDecl::getLocStart(), clang::TypeDecl::getLocStart(), clang::ASTContext::getManglingNumber(), clang::StaticAssertDecl::getMessage(), getPreviousDeclForInstantiation(), clang::StaticAssertDecl::getRParenLoc(), clang::MSPropertyDecl::getSetterId(), clang::VarDecl::getStorageClass(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypedefNameForUnnamedTagDecl(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Sema::inferObjCARCLifetime(), clang::Sema::InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), InstantiateEnumDefinition(), clang::ASTContext::IntTy, clang::Sema::isCopyElisionCandidate(), isDeclWithinFunction(), clang::Type::isDependentType(), clang::StaticAssertDecl::isFailed(), clang::EnumDecl::isFixed(), clang::Type::isFunctionType(), clang::Decl::isImplicit(), clang::Type::isInstantiationDependentType(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isLocalExternDecl(), clang::FieldDecl::isMutable(), clang::VarDecl::isNRVOVariable(), clang::EnumDecl::isScoped(), clang::EnumDecl::isScopedUsingClassTag(), clang::VarDecl::isStaticDataMember(), clang::FriendDecl::isUnsupportedFriend(), clang::Type::isVariablyModifiedType(), clang::Sema::MarkDeclarationsReferencedInType(), clang::Property, clang::Decl::setAccess(), clang::Decl::setImplicit(), clang::ASTContext::setInstantiatedFromUnnamedFieldDecl(), clang::Decl::setInvalidDecl(), clang::ASTContext::setManglingNumber(), clang::VarDecl::setNRVOVariable(), clang::FriendDecl::setUnsupportedFriend(), clang::Sema::SubstExpr(), SubstQualifier(), clang::Sema::SubstType(), clang::TSK_ImplicitInstantiation, and clang::declvisitor::Base< declvisitor::make_ptr, TemplateDeclInstantiator, Decl * >::Visit().

Referenced by InstantiateEnumDefinition().

Decl * TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl ( VarTemplateDecl VarTemplate,
VarDecl FromVar,
void *  InsertPos,
const TemplateArgumentListInfo TemplateArgsInfo,
ArrayRef< TemplateArgument Converted 
)

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