clang API Documentation
#include <Template.h>


Definition at line 354 of file Template.h.
| typedef SmallVectorImpl<std::pair<ClassTemplateDecl *, ClassTemplatePartialSpecializationDecl *> >::iterator clang::TemplateDeclInstantiator::delayed_partial_spec_iterator |
Definition at line 450 of file Template.h.
| clang::TemplateDeclInstantiator::TemplateDeclInstantiator | ( | Sema & | SemaRef, |
| DeclContext * | Owner, | ||
| const MultiLevelTemplateArgumentList & | TemplateArgs | ||
| ) | [inline] |
Definition at line 372 of file Template.h.
| 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 456 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 464 of file Template.h.
Referenced by clang::Sema::InstantiateClass().
| void clang::TemplateDeclInstantiator::disableLateAttributeInstantiation | ( | ) | [inline] |
Definition at line 439 of file Template.h.
Referenced by clang::Sema::InstantiateClass().
| void clang::TemplateDeclInstantiator::enableLateAttributeInstantiation | ( | Sema::LateInstantiatedAttrVec * | LA | ) | [inline] |
Definition at line 433 of file Template.h.
References clang::Sema::CurrentInstantiationScope.
Referenced by clang::Sema::InstantiateClass().
| LocalInstantiationScope* clang::TemplateDeclInstantiator::getStartingScope | ( | ) | const [inline] |
Definition at line 444 of file Template.h.
Referenced by clang::Sema::InstantiateClass().
| bool TemplateDeclInstantiator::InitFunctionInstantiation | ( | FunctionDecl * | New, |
| FunctionDecl * | Tmpl | ||
| ) |
Initializes the common fields of an instantiation function declaration (New) from the corresponding fields of its template (Tmpl).
Definition at line 2414 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::FunctionProtoType::arg_type_begin(), clang::Sema::Context, clang::EST_BasicNoexcept, clang::EST_DynamicNone, clang::EST_None, clang::EST_Uninstantiated, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpecDecl, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpecTemplate, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpecType, clang::FunctionProtoType::getExtProtoInfo(), clang::ASTContext::getFunctionType(), clang::Sema::getLangOpts(), clang::FunctionType::getNoReturnAttr(), clang::FunctionProtoType::getNumArgs(), clang::FunctionType::getResultType(), clang::ValueDecl::getType(), clang::FunctionProtoType::hasExceptionSpec(), clang::Sema::InstantiateAttrs(), InstantiateExceptionSpec(), clang::FunctionDecl::isDefined(), clang::FunctionDecl::isDeletedAsWritten(), clang::Sema::NonInstantiationEntries, clang::FunctionDecl::setDeletedAsWritten(), and clang::ValueDecl::setType().
Referenced by InitMethodInstantiation(), and VisitFunctionDecl().
| bool TemplateDeclInstantiator::InitMethodInstantiation | ( | CXXMethodDecl * | New, |
| CXXMethodDecl * | Tmpl | ||
| ) |
Initializes common fields of an instantiated method declaration (New) from the corresponding fields of its template (Tmpl).
Definition at line 2491 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.
| ClassTemplate | the (instantiated) class template that is partially |
| PartialSpec | the (uninstantiated) class template partial specialization that we are instantiating. |
Definition at line 2026 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::ClassTemplatePartialSpecializationDecl::getNumTemplateArgsAsWritten(), clang::TagDecl::getTagKind(), clang::ClassTemplatePartialSpecializationDecl::getTemplateArgsAsWritten(), clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters(), clang::ASTContext::getTemplateSpecializationType(), clang::ASTContext::getTemplateSpecializationTypeInfo(), clang::TypeSourceInfo::getType(), clang::ASTContext::getTypeDeclType(), clang::ClassTemplatePartialSpecializationDecl::setInstantiatedFromMember(), clang::ClassTemplateSpecializationDecl::setTypeAsWritten(), clang::Sema::Subst(), SubstQualifier(), and SubstTemplateParams().
Referenced by clang::Sema::InstantiateClass(), and VisitClassTemplatePartialSpecializationDecl().
Definition at line 633 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::ActOnEnumBody(), clang::DeclContext::addDecl(), clang::Sema::CheckEnumConstant(), clang::Sema::ConstantEvaluated, clang::Sema::CurrentInstantiationScope, clang::EnumDecl::enumerator_begin(), clang::EnumDecl::enumerator_end(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::TagDecl::getRBraceLoc(), clang::Sema::InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::DeclContext::isFunctionOrMethod(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), isInvalid(), clang::EnumDecl::isScoped(), clang::Sema::Owned(), clang::Decl::setAccess(), clang::Decl::setInvalidDecl(), clang::Decl::setLocation(), clang::TagDecl::startDefinition(), and clang::Sema::SubstExpr().
Referenced by clang::Sema::InstantiateEnum(), and VisitEnumDecl().
| Decl * TemplateDeclInstantiator::InstantiateTypedefNameDecl | ( | TypedefNameDecl * | D, |
| bool | IsTypeAlias | ||
| ) |
Definition at line 143 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::Context, clang::TypedefDecl::Create(), clang::TypeAliasDecl::Create(), clang::Sema::FindInstantiatedDecl(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::TagDecl::getTypedefNameForAnonDecl(), clang::TypedefNameDecl::getTypeSourceInfo(), clang::TypedefNameDecl::getUnderlyingType(), clang::Sema::InstantiateAttrs(), clang::ASTContext::IntTy, clang::Sema::isIncompatibleTypedef(), clang::Sema::MarkDeclarationsReferencedInType(), clang::Decl::setInvalidDecl(), clang::TagDecl::setTypedefNameForAnonDecl(), and clang::Sema::SubstType().
Referenced by VisitTypeAliasDecl(), VisitTypeAliasTemplateDecl(), and VisitTypedefDecl().
| TypeSourceInfo * TemplateDeclInstantiator::SubstFunctionType | ( | FunctionDecl * | D, |
| SmallVectorImpl< ParmVarDecl * > & | Params | ||
| ) |
Definition at line 2140 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::CurrentInstantiationScope, clang::FunctionTypeLoc::getArg(), clang::NamedDecl::getDeclName(), clang::FunctionTypeLoc::getNumArgs(), clang::Sema::getNumArgumentsInExpansion(), clang::DeclContext::getParent(), clang::ValueDecl::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::TypeLoc::IgnoreParens(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::LocalInstantiationScope::InstantiatedLocalPackArg(), clang::ParmVarDecl::isParameterPack(), clang::LocalInstantiationScope::MakeInstantiatedLocalArgPack(), clang::Sema::SubstFunctionDeclType(), and VisitParmVarDecl().
Referenced by VisitCXXMethodDecl(), and VisitFunctionDecl().
| bool TemplateDeclInstantiator::SubstQualifier | ( | const DeclaratorDecl * | OldDecl, |
| DeclaratorDecl * | NewDecl | ||
| ) |
Definition at line 28 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclaratorDecl::getQualifierLoc(), clang::DeclaratorDecl::setQualifierInfo(), and clang::Sema::SubstNestedNameSpecifierLoc().
Referenced by InstantiateClassTemplatePartialSpecialization(), VisitCXXRecordDecl(), VisitEnumDecl(), and VisitVarDecl().
Definition at line 44 of file SemaTemplateInstantiateDecl.cpp.
References clang::TagDecl::getQualifierLoc(), clang::TagDecl::setQualifierInfo(), and clang::Sema::SubstNestedNameSpecifierLoc().
| TemplateParameterList * TemplateDeclInstantiator::SubstTemplateParams | ( | TemplateParameterList * | L | ) |
Instantiates a nested template parameter list in the current instantiation context.
| L | The parameter list to instantiate |
Definition at line 1988 of file SemaTemplateInstantiateDecl.cpp.
References clang::TemplateParameterList::begin(), clang::Sema::Context, clang::TemplateParameterList::Create(), clang::TemplateParameterList::end(), clang::TemplateParameterList::getLAngleLoc(), clang::TemplateParameterList::getRAngleLoc(), clang::TemplateParameterList::getTemplateLoc(), clang::Decl::isInvalidDecl(), NULL, clang::TemplateParameterList::size(), and clang::DeclVisitor< TemplateDeclInstantiator, Decl * >::Visit().
Referenced by InstantiateClassTemplatePartialSpecialization(), VisitClassTemplateDecl(), VisitCXXMethodDecl(), VisitFunctionTemplateDecl(), VisitTemplateTemplateParmDecl(), and VisitTypeAliasTemplateDecl().
| Decl * TemplateDeclInstantiator::VisitAccessSpecDecl | ( | AccessSpecDecl * | D | ) |
| Decl * TemplateDeclInstantiator::VisitClassScopeFunctionSpecializationDecl | ( | ClassScopeFunctionSpecializationDecl * | D | ) |
Definition at line 1950 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::Context, clang::Sema::CurContext, clang::Sema::ForRedeclaration, clang::FunctionDecl::getNameInfo(), clang::ClassScopeFunctionSpecializationDecl::getSpecialization(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::ASTContext::setClassScopeSpecializationPattern(), clang::Decl::setInvalidDecl(), and VisitCXXMethodDecl().
| Decl * TemplateDeclInstantiator::VisitClassTemplateDecl | ( | ClassTemplateDecl * | D | ) |
Definition at line 702 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::CXXScopeSpec::Adopt(), clang::Sema::CheckTemplateParameterList(), clang::Sema::computeDeclContext(), clang::Sema::Context, clang::CXXRecordDecl::Create(), clang::ClassTemplateDecl::Create(), clang::Sema::Diag(), clang::Sema::FindInstantiatedContext(), clang::Decl::FOK_None, clang::Sema::ForRedeclaration, clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::Decl::getFriendObjectKind(), clang::NamedDecl::getIdentifier(), clang::ClassTemplateDecl::getInjectedClassNameSpecialization(), clang::ASTContext::getInjectedClassNameType(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::DeclContext::getParent(), clang::ClassTemplateDecl::getPartialSpecializations(), clang::CXXRecordDecl::getPreviousDecl(), clang::TagDecl::getQualifierLoc(), clang::NestedNameSpecifierLoc::getSourceRange(), clang::TagDecl::getTagKind(), clang::ClassTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::DeclContext::isNamespace(), clang::Decl::isOutOfLine(), clang::IdentifierInfo::isStr(), clang::DeclContext::isTranslationUnit(), clang::DeclContext::lookup(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), NULL, clang::Decl::setAccess(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), clang::Decl::setLexicalDeclContext(), clang::Decl::setObjectOfFriendDecl(), clang::TagDecl::setQualifierInfo(), clang::Sema::SubstNestedNameSpecifierLoc(), SubstTemplateParams(), clang::Sema::TemplateParameterListsAreEqual(), clang::Sema::TPC_ClassTemplate, and clang::Sema::TPL_TemplateMatch.
| Decl * TemplateDeclInstantiator::VisitClassTemplatePartialSpecializationDecl | ( | ClassTemplatePartialSpecializationDecl * | D | ) |
Definition at line 889 of file SemaTemplateInstantiateDecl.cpp.
References clang::ClassTemplateDecl::findPartialSpecInstantiatedFromMember(), clang::NamedDecl::getDeclName(), clang::ClassTemplateSpecializationDecl::getSpecializedTemplate(), InstantiateClassTemplatePartialSpecialization(), and clang::DeclContext::lookup().
| Decl * TemplateDeclInstantiator::VisitCXXConstructorDecl | ( | CXXConstructorDecl * | D | ) |
Definition at line 1562 of file SemaTemplateInstantiateDecl.cpp.
References VisitCXXMethodDecl().
| Decl * TemplateDeclInstantiator::VisitCXXConversionDecl | ( | CXXConversionDecl * | D | ) |
Definition at line 1570 of file SemaTemplateInstantiateDecl.cpp.
References VisitCXXMethodDecl().
| Decl * TemplateDeclInstantiator::VisitCXXDestructorDecl | ( | CXXDestructorDecl * | D | ) |
Definition at line 1566 of file SemaTemplateInstantiateDecl.cpp.
References VisitCXXMethodDecl().
| Decl * TemplateDeclInstantiator::VisitCXXMethodDecl | ( | CXXMethodDecl * | D, |
| TemplateParameterList * | TemplateParams = 0, |
||
| bool | IsClassScopeSpecialization = false |
||
| ) |
Definition at line 1316 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::CXXScopeSpec::Adopt(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckPureMethod(), clang::LookupResult::clear(), clang::Sema::computeDeclContext(), clang::Sema::Context, clang::FunctionTemplateDecl::Create(), clang::CXXMethodDecl::Create(), clang::CXXConstructorDecl::Create(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), clang::TemplateArgumentList::CreateCopy(), clang::LookupResult::empty(), clang::Sema::FindInstantiatedContext(), clang::FunctionTemplateDecl::findSpecialization(), clang::Decl::FOK_None, clang::Sema::ForRedeclaration, clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Decl::getFriendObjectKind(), clang::DeclaratorDecl::getInnerLocStart(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::FunctionDecl::getNameInfo(), clang::FunctionDecl::getNumParams(), clang::DeclaratorDecl::getNumTemplateParameterLists(), clang::DeclaratorDecl::getQualifierLoc(), clang::FunctionDecl::getStorageClassAsWritten(), clang::DeclaratorDecl::getTemplateParameterList(), clang::TypeSourceInfo::getType(), clang::QualType::IgnoreParens(), InitMethodInstantiation(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDeletedAsWritten(), clang::FunctionDecl::isExplicitlyDefaulted(), clang::FunctionDecl::isInlineSpecified(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isPure(), clang::LookupResult::isSingleTagDecl(), clang::CXXMethodDecl::isStatic(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), NULL, P, clang::FunctionDecl::param_begin(), clang::Sema::RequireCompleteDeclContext(), clang::Sema::SetDeclDefaulted(), clang::Decl::setLexicalDeclContext(), clang::Decl::setObjectOfFriendDecl(), clang::DeclaratorDecl::setQualifierInfo(), clang::Sema::SubstDeclarationNameInfo(), SubstFunctionType(), clang::Sema::SubstNestedNameSpecifierLoc(), clang::Sema::SubstParmTypes(), SubstTemplateParams(), and clang::TSK_ImplicitInstantiation.
Referenced by VisitClassScopeFunctionSpecializationDecl(), VisitCXXConstructorDecl(), VisitCXXConversionDecl(), VisitCXXDestructorDecl(), and VisitFunctionTemplateDecl().
| Decl * TemplateDeclInstantiator::VisitCXXRecordDecl | ( | CXXRecordDecl * | D | ) |
Definition at line 962 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::AS_none, clang::Sema::Context, clang::CXXRecordDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::Sema::FindInstantiatedDecl(), clang::Decl::FOK_Declared, clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::Decl::getFriendObjectKind(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::CXXRecordDecl::getPreviousDecl(), clang::DeclContext::getRedeclContext(), clang::TagDecl::getTagKind(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isImplicit(), clang::RecordDecl::isInjectedClassName(), clang::Decl::setAccess(), clang::RecordDecl::setAnonymousStructOrUnion(), clang::Decl::setImplicit(), clang::CXXRecordDecl::setInstantiationOfMemberClass(), clang::Decl::setObjectOfFriendDecl(), SubstQualifier(), and clang::TSK_ImplicitInstantiation.
Referenced by VisitVarDecl().
Reimplemented from clang::DeclVisitor< TemplateDeclInstantiator, Decl * >.
Definition at line 421 of file Template.h.
References clang::Sema::Diag(), clang::DiagnosticsEngine::Error, clang::DiagnosticsEngine::getCustomDiagID(), clang::Decl::getDeclKindName(), clang::Sema::getDiagnostics(), and clang::Decl::getLocation().
| Decl * TemplateDeclInstantiator::VisitEnumConstantDecl | ( | EnumConstantDecl * | D | ) |
Definition at line 698 of file SemaTemplateInstantiateDecl.cpp.
Definition at line 561 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::Context, clang::EnumDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::Sema::FindInstantiatedDecl(), clang::Decl::getAccess(), clang::Decl::getDeclContext(), clang::EnumDecl::getDefinition(), clang::NamedDecl::getIdentifier(), clang::EnumDecl::getIntegerType(), clang::EnumDecl::getIntegerTypeSourceInfo(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::EnumDecl::getPreviousDecl(), clang::Sema::InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), InstantiateEnumDefinition(), clang::ASTContext::IntTy, clang::TagDecl::isCompleteDefinition(), clang::EnumDecl::isFixed(), clang::DeclContext::isFunctionOrMethod(), clang::EnumDecl::isScoped(), clang::EnumDecl::isScopedUsingClassTag(), clang::Decl::setAccess(), clang::EnumDecl::setIntegerType(), clang::EnumDecl::setIntegerTypeSourceInfo(), SubstQualifier(), clang::Sema::SubstType(), and clang::TSK_ImplicitInstantiation.
Definition at line 385 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Sema::CheckFieldDecl(), clang::Sema::ConstantEvaluated, clang::Sema::Context, clang::Sema::CurrentInstantiationScope, clang::Sema::Diag(), clang::Decl::getAccess(), clang::FieldDecl::getBitWidth(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::TypeSourceInfo::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::FieldDecl::hasInClassInitializer(), clang::Sema::InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::Decl::isImplicit(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::FieldDecl::isMutable(), clang::Sema::MarkDeclarationsReferencedInType(), clang::Decl::setAccess(), clang::Decl::setImplicit(), clang::ASTContext::setInstantiatedFromUnnamedFieldDecl(), clang::Decl::setInvalidDecl(), clang::Sema::SubstExpr(), clang::Sema::SubstType(), and clang::ActionResult< PtrTy, CompressInvalid >::takeAs().
| Decl * TemplateDeclInstantiator::VisitFriendDecl | ( | FriendDecl * | D | ) |
Definition at line 493 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::AS_public, clang::Sema::CheckFriendTypeDecl(), clang::Sema::Context, clang::FriendDecl::Create(), clang::FriendDecl::getFriendDecl(), clang::FriendDecl::getFriendLoc(), clang::FriendDecl::getFriendType(), clang::Decl::getLocation(), clang::FriendDecl::isUnsupportedFriend(), clang::Decl::setAccess(), clang::FriendDecl::setUnsupportedFriend(), clang::Sema::SubstType(), and clang::DeclVisitor< TemplateDeclInstantiator, Decl * >::Visit().
| Decl * TemplateDeclInstantiator::VisitFunctionDecl | ( | FunctionDecl * | D, |
| TemplateParameterList * | TemplateParams = 0 |
||
| ) |
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 FIXME: preserve function definitions in case #2
Definition at line 1013 of file SemaTemplateInstantiateDecl.cpp.
References clang::CXXScopeSpec::Adopt(), clang::FunctionProtoType::arg_type_begin(), clang::FunctionProtoType::arg_type_end(), clang::Sema::BuildParmVarDeclForTypedef(), 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::Diags, clang::Sema::FindInstantiatedContext(), clang::Sema::FindInstantiatedDecl(), clang::FunctionTemplateDecl::findSpecialization(), clang::Decl::FOK_None, clang::Sema::ForRedeclaration, clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getDependentSpecializationInfo(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::DiagnosticsEngine::getDiagnosticLevel(), clang::Decl::getFriendObjectKind(), clang::DeclaratorDecl::getInnerLocStart(), clang::MultiLevelTemplateArgumentList::getInnermost(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getMemberSpecializationInfo(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionTemplateDecl::getPreviousDecl(), clang::DeclaratorDecl::getQualifierLoc(), clang::FunctionDecl::getStorageClass(), clang::FunctionDecl::getStorageClassAsWritten(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::getTemplateSpecializationKind(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::FunctionDecl::hasWrittenPrototype(), clang::Decl::IDNS_Ordinary, clang::DiagnosticsEngine::Ignored, clang::QualType::IgnoreParens(), InitFunctionInstantiation(), clang::FunctionDecl::isConstexpr(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isDefined(), clang::DeclContext::isFileContext(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInIdentifierNamespace(), clang::FunctionDecl::isInlineSpecified(), clang::FunctionDecl::isOutOfLine(), clang::FunctionDecl::isOverloadedOperator(), clang::DeclContext::isRecord(), clang::FunctionDecl::isThisDeclarationADefinition(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), P, Param, clang::Sema::PendingLocalImplicitInstantiations, clang::Redeclarable< decl_type >::redecls_begin(), clang::Redeclarable< decl_type >::redecls_end(), clang::FunctionDecl::setDescribedFunctionTemplate(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::Decl::setNonMemberOperator(), clang::Decl::setObjectOfFriendDecl(), clang::DeclaratorDecl::setQualifierInfo(), clang::ParmVarDecl::setScopeInfo(), clang::Sema::Subst(), SubstFunctionType(), clang::Sema::SubstNestedNameSpecifierLoc(), clang::TSK_ImplicitInstantiation, and clang::TSK_Undeclared.
Referenced by VisitFunctionTemplateDecl().
| Decl * TemplateDeclInstantiator::VisitFunctionTemplateDecl | ( | FunctionTemplateDecl * | D | ) |
Definition at line 913 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Decl::FOK_None, clang::Decl::getAccess(), clang::Decl::getFriendObjectKind(), clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), clang::FunctionDecl::isThisDeclarationADefinition(), NULL, clang::Decl::setAccess(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), SubstTemplateParams(), VisitCXXMethodDecl(), and VisitFunctionDecl().
| Decl * TemplateDeclInstantiator::VisitIndirectFieldDecl | ( | IndirectFieldDecl * | D | ) |
Definition at line 464 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::IndirectFieldDecl::chain_begin(), clang::IndirectFieldDecl::chain_end(), clang::Sema::Context, clang::IndirectFieldDecl::Create(), clang::Sema::FindInstantiatedDecl(), clang::Decl::getAccess(), clang::IndirectFieldDecl::getChainingSize(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::Decl::isImplicit(), clang::Decl::setAccess(), and clang::Decl::setImplicit().
Definition at line 117 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Sema::Context, clang::LabelDecl::Create(), clang::NamedDecl::getIdentifier(), and clang::Decl::getLocation().
| Decl * TemplateDeclInstantiator::VisitNamespaceAliasDecl | ( | NamespaceAliasDecl * | D | ) |
Definition at line 130 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Sema::Context, clang::NamespaceAliasDecl::Create(), clang::NamespaceAliasDecl::getAliasLoc(), clang::NamedDecl::getIdentifier(), clang::NamespaceAliasDecl::getNamespace(), clang::NamespaceAliasDecl::getNamespaceLoc(), clang::NamespaceAliasDecl::getQualifierLoc(), and clang::NamespaceAliasDecl::getTargetNameLoc().
| Decl * TemplateDeclInstantiator::VisitNamespaceDecl | ( | NamespaceDecl * | D | ) |
Definition at line 125 of file SemaTemplateInstantiateDecl.cpp.
| Decl * TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl | ( | NonTypeTemplateParmDecl * | D | ) |
Definition at line 1604 of file SemaTemplateInstantiateDecl.cpp.
References clang::AS_public, clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckParameterPacksForExpansion(), clang::Sema::collectUnexpandedParameterPacks(), clang::Sema::Context, clang::NonTypeTemplateParmDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::NamedDecl::getDeclName(), clang::NonTypeTemplateParmDecl::getDefaultArgument(), clang::TemplateParmPosition::getDepth(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::NonTypeTemplateParmDecl::getExpansionTypeSourceInfo(), clang::NamedDecl::getIdentifier(), clang::DeclaratorDecl::getInnerLocStart(), clang::Decl::getLocation(), clang::PackExpansionType::getNumExpansions(), clang::NonTypeTemplateParmDecl::getNumExpansionTypes(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::PackExpansionTypeLoc::getPatternLoc(), clang::TemplateParmPosition::getPosition(), clang::TypeSourceInfo::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::ASTContext::IntTy, clang::NonTypeTemplateParmDecl::isExpandedParameterPack(), clang::QualType::isNull(), clang::NonTypeTemplateParmDecl::isParameterPack(), Param, clang::Decl::setAccess(), and clang::Sema::SubstType().
| ParmVarDecl * TemplateDeclInstantiator::VisitParmVarDecl | ( | ParmVarDecl * | D | ) |
Definition at line 1574 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::SubstParmVarDecl().
Referenced by SubstFunctionType().
| Decl * TemplateDeclInstantiator::VisitStaticAssertDecl | ( | StaticAssertDecl * | D | ) |
Definition at line 541 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::ActOnStaticAssertDeclaration(), clang::Sema::ConstantEvaluated, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::StaticAssertDecl::getAssertExpr(), clang::Decl::getLocation(), clang::StaticAssertDecl::getMessage(), clang::StaticAssertDecl::getRParenLoc(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Sema::SubstExpr().
| Decl * TemplateDeclInstantiator::VisitTemplateTemplateParmDecl | ( | TemplateTemplateParmDecl * | D | ) |
Definition at line 1754 of file SemaTemplateInstantiateDecl.cpp.
References clang::AS_public, clang::Sema::Context, clang::TemplateTemplateParmDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::TemplateTemplateParmDecl::getDefaultArgument(), clang::TemplateParmPosition::getDepth(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::TemplateParmPosition::getPosition(), clang::TemplateDecl::getTemplateParameters(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::TemplateTemplateParmDecl::isParameterPack(), NULL, Param, clang::Decl::setAccess(), clang::TemplateTemplateParmDecl::setDefaultArgument(), and SubstTemplateParams().
| Decl * TemplateDeclInstantiator::VisitTemplateTypeParmDecl | ( | TemplateTypeParmDecl * | D | ) |
Definition at line 1580 of file SemaTemplateInstantiateDecl.cpp.
References clang::AS_public, clang::Sema::Context, clang::TemplateTypeParmDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::TemplateTypeParmDecl::getDefaultArgumentInfo(), clang::TemplateTypeParmDecl::getDepth(), clang::NamedDecl::getIdentifier(), clang::TemplateTypeParmDecl::getIndex(), clang::Decl::getLocation(), clang::TypeDecl::getLocStart(), clang::MultiLevelTemplateArgumentList::getNumLevels(), clang::TypeDecl::getTypeForDecl(), clang::TemplateTypeParmDecl::hasDefaultArgument(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::TemplateTypeParmDecl::isParameterPack(), clang::Type::isTemplateTypeParmType(), clang::Decl::setAccess(), and clang::TemplateTypeParmDecl::wasDeclaredWithTypename().
| Decl * TemplateDeclInstantiator::VisitTranslationUnitDecl | ( | TranslationUnitDecl * | D | ) |
Definition at line 112 of file SemaTemplateInstantiateDecl.cpp.
| Decl * TemplateDeclInstantiator::VisitTypeAliasDecl | ( | TypeAliasDecl * | D | ) |
Definition at line 208 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), and InstantiateTypedefNameDecl().
| Decl * TemplateDeclInstantiator::VisitTypeAliasTemplateDecl | ( | TypeAliasTemplateDecl * | D | ) |
Definition at line 215 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Sema::Context, clang::TypeAliasTemplateDecl::Create(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::TypeAliasTemplateDecl::getTemplatedDecl(), clang::TemplateDecl::getTemplateParameters(), InstantiateTypedefNameDecl(), clang::DeclContext::lookup(), clang::Decl::setAccess(), clang::RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(), clang::Redeclarable< decl_type >::setPreviousDeclaration(), and SubstTemplateParams().
| Decl * TemplateDeclInstantiator::VisitTypedefDecl | ( | TypedefDecl * | D | ) |
Definition at line 202 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), and InstantiateTypedefNameDecl().
| Decl * TemplateDeclInstantiator::VisitUnresolvedUsingTypenameDecl | ( | UnresolvedUsingTypenameDecl * | D | ) |
Definition at line 1901 of file SemaTemplateInstantiateDecl.cpp.
References clang::CXXScopeSpec::Adopt(), clang::Decl::getAccess(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::UnresolvedUsingTypenameDecl::getQualifierLoc(), clang::UnresolvedUsingTypenameDecl::getTypenameLoc(), and clang::UnresolvedUsingTypenameDecl::getUsingLoc().
| Decl * TemplateDeclInstantiator::VisitUnresolvedUsingValueDecl | ( | UnresolvedUsingValueDecl * | D | ) |
Definition at line 1799 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::CXXScopeSpec::Adopt(), clang::Sema::BuildUsingShadowDecl(), clang::Sema::CheckInheritingConstructorUsingDecl(), clang::Sema::CheckUsingDeclQualifier(), clang::Sema::CheckUsingDeclRedeclaration(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::Context, clang::UsingDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::DeclarationName::CXXConstructorName, clang::Sema::FindInstantiatedDecl(), clang::Sema::ForRedeclaration, clang::Decl::getAccess(), clang::Decl::getLocation(), clang::UsingDecl::getNameInfo(), clang::UsingDecl::getQualifierLoc(), clang::UsingShadowDecl::getTargetDecl(), clang::UsingDecl::getUsingLocation(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isInvalidDecl(), clang::DeclContext::isRecord(), clang::UsingDecl::isTypeName(), clang::Sema::LookupQualifiedName(), clang::Sema::LookupUsingDeclName, clang::Decl::setAccess(), clang::LookupResult::setHideTags(), clang::ASTContext::setInstantiatedFromUsingDecl(), clang::ASTContext::setInstantiatedFromUsingShadowDecl(), clang::Decl::setInvalidDecl(), clang::UsingDecl::shadow_begin(), clang::UsingDecl::shadow_end(), and clang::Sema::SubstNestedNameSpecifierLoc().
| Decl * TemplateDeclInstantiator::VisitUsingDirectiveDecl | ( | UsingDirectiveDecl * | D | ) |
Definition at line 1784 of file SemaTemplateInstantiateDecl.cpp.
References clang::DeclContext::addDecl(), clang::Sema::Context, clang::UsingDirectiveDecl::Create(), clang::UsingDirectiveDecl::getCommonAncestor(), clang::UsingDirectiveDecl::getIdentLocation(), clang::Decl::getLocation(), clang::UsingDirectiveDecl::getNamespaceKeyLocation(), clang::UsingDirectiveDecl::getNominatedNamespace(), and clang::UsingDirectiveDecl::getQualifierLoc().
| Decl * TemplateDeclInstantiator::VisitUsingShadowDecl | ( | UsingShadowDecl * | D | ) |
Definition at line 1895 of file SemaTemplateInstantiateDecl.cpp.
Definition at line 256 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::ActOnUninitializedDecl(), clang::DeclContext::addDecl(), clang::Sema::AddInitializerToDecl(), clang::VarDecl::CallInit, clang::Sema::CheckVariableDeclaration(), clang::Sema::ConstantEvaluated, clang::Sema::Context, clang::VarDecl::Create(), clang::Sema::CurrentInstantiationScope, clang::Sema::Diag(), clang::Sema::DiagnoseUnusedDecl(), clang::Sema::ForRedeclaration, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::Decl::getAccess(), clang::VarDecl::getAnyInitializer(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::VarDecl::getInit(), clang::VarDecl::getInitStyle(), clang::DeclaratorDecl::getInnerLocStart(), clang::Sema::getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::Decl::getLocation(), clang::VarDecl::getStorageClass(), clang::VarDecl::getStorageClassAsWritten(), clang::TypeSourceInfo::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Sema::inferObjCARCLifetime(), clang::Sema::InstantiateAttrs(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::VarDecl::isConstexpr(), clang::VarDecl::isCXXForRangeDecl(), clang::VarDecl::isDirectInit(), clang::DeclContext::isFunctionOrMethod(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Decl::isInvalidDecl(), clang::VarDecl::isOutOfLine(), clang::Decl::isReferenced(), clang::VarDecl::isStaticDataMember(), clang::VarDecl::isThreadSpecified(), clang::Decl::isUsed(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::DeclContext::makeDeclVisibleInContext(), clang::Sema::PopExpressionEvaluationContext(), clang::Sema::PotentiallyEvaluated, clang::Sema::PushExpressionEvaluationContext(), clang::Decl::setAccess(), clang::VarDecl::setConstexpr(), clang::VarDecl::setCXXForRangeDecl(), clang::VarDecl::setInitStyle(), clang::ASTContext::setInstantiatedFromStaticDataMember(), clang::Decl::setInvalidDecl(), clang::Decl::setLexicalDeclContext(), clang::Decl::setReferenced(), clang::VarDecl::setThreadSpecified(), clang::Decl::setUsed(), clang::Sema::SubstInitializer(), SubstQualifier(), clang::Sema::SubstType(), clang::ActionResult< PtrTy, CompressInvalid >::take(), clang::TSK_ImplicitInstantiation, and VisitCXXRecordDecl().