|
clang
5.0.0
|
#include "clang/Sema/SemaInternal.h"#include "clang/AST/ASTConsumer.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTMutationListener.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/DeclVisitor.h"#include "clang/AST/DependentDiagnostic.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/TypeLoc.h"#include "clang/Sema/Initialization.h"#include "clang/Sema/Lookup.h"#include "clang/Sema/PrettyDeclStackTrace.h"#include "clang/Sema/Template.h"#include "clang/Sema/AttrTemplateInstantiate.inc"Go to the source code of this file.
Functions | |
| static bool | isDeclWithinFunction (const Decl *D) |
| template<typename DeclT > | |
| static bool | SubstQualifier (Sema &SemaRef, const DeclT *OldDecl, DeclT *NewDecl, const MultiLevelTemplateArgumentList &TemplateArgs) |
| static void | instantiateDependentAlignedAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AlignedAttr *Aligned, Decl *New, bool IsPackExpansion) |
| static void | instantiateDependentAlignedAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AlignedAttr *Aligned, Decl *New) |
| static void | instantiateDependentAssumeAlignedAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AssumeAlignedAttr *Aligned, Decl *New) |
| static void | instantiateDependentAlignValueAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AlignValueAttr *Aligned, Decl *New) |
| static void | instantiateDependentAllocAlignAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AllocAlignAttr *Align, Decl *New) |
| static Expr * | instantiateDependentFunctionAttrCondition (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const Attr *A, Expr *OldCond, const Decl *Tmpl, FunctionDecl *New) |
| static void | instantiateDependentEnableIfAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const EnableIfAttr *EIA, const Decl *Tmpl, FunctionDecl *New) |
| static void | instantiateDependentDiagnoseIfAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const DiagnoseIfAttr *DIA, const Decl *Tmpl, FunctionDecl *New) |
| static void | instantiateDependentCUDALaunchBoundsAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const CUDALaunchBoundsAttr &Attr, Decl *New) |
| static void | instantiateDependentModeAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const ModeAttr &Attr, Decl *New) |
| static void | instantiateOMPDeclareSimdDeclAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const OMPDeclareSimdDeclAttr &Attr, Decl *New) |
| Instantiation of 'declare simd' attribute and its arguments. More... | |
| static bool | DeclContainsAttr (const Decl *D, const Attr *NewAttr) |
| template<typename DeclT > | |
| static DeclT * | getPreviousDeclForInstantiation (DeclT *D) |
| Get the previous declaration of a declaration for the purposes of template instantiation. More... | |
| static QualType | adjustFunctionTypeForInstantiation (ASTContext &Context, FunctionDecl *D, TypeSourceInfo *TInfo) |
| Adjust the given function type for an instantiation of the given declaration, to cope with modifications to the function's type that aren't reflected in the type-source information. More... | |
| static void | collectUnexpandedParameterPacks (Sema &S, TemplateParameterList *Params, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded) |
| static bool | addInstantiatedParametersToScope (Sema &S, FunctionDecl *Function, const FunctionDecl *PatternDecl, LocalInstantiationScope &Scope, const MultiLevelTemplateArgumentList &TemplateArgs) |
| Introduce the instantiated function parameters into the local instantiation scope, and set the parameter names to those used in the template. More... | |
| static void | InstantiateDefaultCtorDefaultArgs (Sema &S, CXXConstructorDecl *Ctor) |
| In the MS ABI, we need to instantiate default arguments of dllexported default constructors along with the constructor definition. More... | |
| static bool | isInstantiationOf (ClassTemplateDecl *Pattern, ClassTemplateDecl *Instance) |
| static bool | isInstantiationOf (FunctionTemplateDecl *Pattern, FunctionTemplateDecl *Instance) |
| static bool | isInstantiationOf (ClassTemplatePartialSpecializationDecl *Pattern, ClassTemplatePartialSpecializationDecl *Instance) |
| static bool | isInstantiationOf (CXXRecordDecl *Pattern, CXXRecordDecl *Instance) |
| static bool | isInstantiationOf (FunctionDecl *Pattern, FunctionDecl *Instance) |
| static bool | isInstantiationOf (EnumDecl *Pattern, EnumDecl *Instance) |
| static bool | isInstantiationOf (UsingShadowDecl *Pattern, UsingShadowDecl *Instance, ASTContext &C) |
| static bool | isInstantiationOf (UsingDecl *Pattern, UsingDecl *Instance, ASTContext &C) |
| template<typename T > | |
| static bool | isInstantiationOfUnresolvedUsingDecl (T *Pattern, Decl *Other, ASTContext &Ctx) |
| static bool | isInstantiationOfStaticDataMember (VarDecl *Pattern, VarDecl *Instance) |
| static bool | isInstantiationOf (ASTContext &Ctx, NamedDecl *D, Decl *Other) |
| template<typename ForwardIterator > | |
| static NamedDecl * | findInstantiationOf (ASTContext &Ctx, NamedDecl *D, ForwardIterator first, ForwardIterator last) |
|
static |
Introduce the instantiated function parameters into the local instantiation scope, and set the parameter names to those used in the template.
Definition at line 3505 of file SemaTemplateInstantiateDecl.cpp.
References clang::Type::castAs(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), clang::Sema::getNumArgumentsInExpansion(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), I, clang::LocalInstantiationScope::InstantiatedLocal(), clang::LocalInstantiationScope::InstantiatedLocalPackArg(), clang::Type::isDependentType(), clang::QualType::isNull(), clang::ParmVarDecl::isParameterPack(), clang::LocalInstantiationScope::MakeInstantiatedLocalArgPack(), clang::NamedDecl::setDeclName(), clang::ValueDecl::setType(), and clang::Sema::SubstType().
Referenced by clang::Sema::InstantiateExceptionSpec(), and clang::Sema::InstantiateFunctionDefinition().
|
static |
Adjust the given function type for an instantiation of the given declaration, to cope with modifications to the function's type that aren't reflected in the type-source information.
| D | The declaration we're instantiating. |
| TInfo | The already-instantiated type. |
Definition at line 1571 of file SemaTemplateInstantiateDecl.cpp.
References clang::Type::castAs(), clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), clang::ASTContext::getFunctionType(), clang::TypeSourceInfo::getType(), and clang::ValueDecl::getType().
Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().
|
static |
Definition at line 2310 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::collectUnexpandedParameterPacks(), and P.
Referenced by clang::Sema::InstantiateMemInitializers().
Definition at line 346 of file SemaTemplateInstantiateDecl.cpp.
References clang::Attr::duplicatesAllowed(), clang::Decl::getAttrs(), clang::Attr::getKind(), and clang::Decl::hasAttrs().
Referenced by clang::Sema::InstantiateAttrs(), and clang::Sema::InstantiateAttrsForDecl().
|
static |
Definition at line 4795 of file SemaTemplateInstantiateDecl.cpp.
References isInstantiationOf().
Referenced by clang::Sema::FindInstantiatedDecl().
|
static |
Get the previous declaration of a declaration for the purposes of template instantiation.
If this finds a previous declaration, then the previous declaration of the instantiation of D should be an instantiation of the result of this function.
Definition at line 485 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::getPreviousDecl(), and Result.
Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl().
|
static |
In the MS ABI, we need to instantiate default arguments of dllexported default constructors along with the constructor definition.
This allows IR gen to emit a constructor closure which calls the default constructor with its default arguments.
Definition at line 3716 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::CheckCXXDefaultArgExpr(), clang::Sema::Context, clang::Sema::DiscardCleanupsInEvaluationContext(), clang::Decl::getAttr(), clang::TargetInfo::getCXXABI(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getTargetInfo(), I, clang::CXXConstructorDecl::isDefaultConstructor(), and clang::TargetCXXABI::isMicrosoft().
Referenced by clang::Sema::InstantiateFunctionDefinition().
|
static |
Definition at line 79 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::AddAlignedAttr(), clang::Sema::ConstantEvaluated, clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), Result, clang::Sema::SubstExpr(), and clang::Sema::SubstType().
Referenced by clang::Sema::InstantiateAttrs(), and instantiateDependentAlignedAttr().
|
static |
Definition at line 100 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::CheckParameterPacksForExpansion(), clang::Sema::collectUnexpandedParameterPacks(), I, and instantiateDependentAlignedAttr().
|
static |
Definition at line 162 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::AddAlignValueAttr(), clang::Sema::ConstantEvaluated, clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), Result, and clang::Sema::SubstExpr().
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Definition at line 174 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::AddAllocAlignAttr(), clang::IntegerLiteral::Create(), clang::Sema::getASTContext(), and clang::ASTContext::UnsignedLongLongTy.
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Definition at line 138 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::Sema::ConstantEvaluated, E, clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), Result, and clang::Sema::SubstExpr().
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Definition at line 242 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::AddLaunchBoundsAttr(), clang::Sema::ConstantEvaluated, clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), Result, and clang::Sema::SubstExpr().
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Definition at line 227 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::addAttr(), clang::Sema::getASTContext(), and instantiateDependentFunctionAttrCondition().
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Definition at line 215 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::addAttr(), clang::Sema::getASTContext(), and instantiateDependentFunctionAttrCondition().
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Definition at line 184 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::ConstantEvaluated, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::Attr::getLocation(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), P, clang::Sema::PerformContextuallyConvertToBool(), Result, and clang::Sema::SubstExpr().
Referenced by instantiateDependentDiagnoseIfAttr(), and instantiateDependentEnableIfAttr().
|
static |
Definition at line 267 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::AddModeAttr().
Referenced by clang::Sema::InstantiateAttrs().
|
static |
Instantiation of 'declare simd' attribute and its arguments.
Definition at line 275 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ConvertDeclToDeclGroup(), E, clang::ExprEmpty(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::LocalInstantiationScope::InstantiatedLocal(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), and clang::Sema::SubstExpr().
Referenced by clang::Sema::InstantiateAttrs().
Definition at line 29 of file SemaTemplateInstantiateDecl.cpp.
References clang::Decl::getDeclContext(), clang::DeclContext::isFunctionOrMethod(), and clang::DeclContext::isRecord().
|
static |
Definition at line 4605 of file SemaTemplateInstantiateDecl.cpp.
References clang::ClassTemplateDecl::getCanonicalDecl(), and clang::ClassTemplateDecl::getInstantiatedFromMemberTemplate().
Referenced by clang::Sema::FindInstantiatedDecl(), findInstantiationOf(), and isInstantiationOf().
|
static |
Definition at line 4618 of file SemaTemplateInstantiateDecl.cpp.
References clang::FunctionTemplateDecl::getCanonicalDecl(), and clang::FunctionTemplateDecl::getInstantiatedFromMemberTemplate().
|
static |
Definition at line 4632 of file SemaTemplateInstantiateDecl.cpp.
References clang::CXXRecordDecl::getCanonicalDecl(), and clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember().
|
static |
Definition at line 4647 of file SemaTemplateInstantiateDecl.cpp.
References clang::CXXRecordDecl::getCanonicalDecl(), and clang::CXXRecordDecl::getInstantiatedFromMemberClass().
|
static |
Definition at line 4660 of file SemaTemplateInstantiateDecl.cpp.
References clang::FunctionDecl::getCanonicalDecl(), and clang::FunctionDecl::getInstantiatedFromMemberFunction().
Definition at line 4673 of file SemaTemplateInstantiateDecl.cpp.
References clang::EnumDecl::getCanonicalDecl(), and clang::EnumDecl::getInstantiatedFromMemberEnum().
|
static |
Definition at line 4686 of file SemaTemplateInstantiateDecl.cpp.
References clang::declaresSameEntity(), and clang::ASTContext::getInstantiatedFromUsingShadowDecl().
|
static |
Definition at line 4693 of file SemaTemplateInstantiateDecl.cpp.
References clang::declaresSameEntity(), and clang::ASTContext::getInstantiatedFromUsingDecl().
|
static |
Definition at line 4742 of file SemaTemplateInstantiateDecl.cpp.
References clang::declaresSameEntity(), clang::NamedDecl::getDeclName(), clang::ASTContext::getInstantiatedFromUnnamedFieldDecl(), clang::Decl::getKind(), isInstantiationOf(), isInstantiationOfStaticDataMember(), isInstantiationOfUnresolvedUsingDecl(), and clang::VarDecl::isStaticDataMember().
Definition at line 4725 of file SemaTemplateInstantiateDecl.cpp.
References clang::VarDecl::getCanonicalDecl(), clang::VarDecl::getInstantiatedFromStaticDataMember(), and clang::VarDecl::isStaticDataMember().
Referenced by isInstantiationOf().
|
static |
Definition at line 4699 of file SemaTemplateInstantiateDecl.cpp.
References clang::declaresSameEntity(), and clang::ASTContext::getInstantiatedFromUsingDecl().
Referenced by isInstantiationOf().
|
static |
Definition at line 41 of file SemaTemplateInstantiateDecl.cpp.
References clang::Sema::SubstNestedNameSpecifierLoc().
Referenced by clang::TemplateDeclInstantiator::SubstQualifier().
1.8.6