clang  19.0.0git
Functions
SemaTemplateInstantiateDecl.cpp File Reference
#include "TreeTransform.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/Mangle.h"
#include "clang/AST/PrettyDeclStackTrace.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Sema/EnterExpressionEvaluationContext.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaCUDA.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/SemaOpenMP.h"
#include "clang/Sema/Template.h"
#include "clang/Sema/TemplateInstCallback.h"
#include "llvm/Support/TimeProfiler.h"
#include <optional>
#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 void instantiateDependentAnnotationAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AnnotateAttr *Attr, Decl *New)
 
static ExprinstantiateDependentFunctionAttrCondition (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 void instantiateOMPDeclareVariantAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const OMPDeclareVariantAttr &Attr, Decl *New)
 Instantiation of 'declare variant' attribute and its arguments. More...
 
static void instantiateDependentAMDGPUFlatWorkGroupSizeAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AMDGPUFlatWorkGroupSizeAttr &Attr, Decl *New)
 
static void instantiateDependentAMDGPUWavesPerEUAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AMDGPUWavesPerEUAttr &Attr, Decl *New)
 
static void instantiateDependentAMDGPUMaxNumWorkGroupsAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const AMDGPUMaxNumWorkGroupsAttr &Attr, Decl *New)
 
static void instantiateSYCLIntelForcePow2DepthAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelForcePow2DepthAttr *Attr, Decl *New)
 
static void instantiateSYCLIntelBankWidthAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelBankWidthAttr *Attr, Decl *New)
 
static void instantiateSYCLIntelNumBanksAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelNumBanksAttr *Attr, Decl *New)
 
static void instantiateSYCLIntelBankBitsAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelBankBitsAttr *Attr, Decl *New)
 
static void instantiateSYCLDeviceHasAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLDeviceHasAttr *Attr, Decl *New)
 
static void instantiateSYCLUsesAspectsAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLUsesAspectsAttr *Attr, Decl *New)
 
static void instantiateSYCLIntelPipeIOAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelPipeIOAttr *Attr, Decl *New)
 
static void instantiateSYCLIntelLoopFuseAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelLoopFuseAttr *Attr, Decl *New)
 
static void instantiateIntelReqdSubGroupSize (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const IntelReqdSubGroupSizeAttr *A, Decl *New)
 
static void instantiateSYCLIntelNumSimdWorkItemsAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelNumSimdWorkItemsAttr *A, Decl *New)
 
static void instantiateSYCLIntelSchedulerTargetFmaxMhzAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelSchedulerTargetFmaxMhzAttr *A, Decl *New)
 
static void instantiateSYCLIntelNoGlobalWorkOffsetAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelNoGlobalWorkOffsetAttr *A, Decl *New)
 
static void instantiateSYCLIntelMaxGlobalWorkDimAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelMaxGlobalWorkDimAttr *A, Decl *New)
 
static void instantiateSYCLIntelMinWorkGroupsPerComputeUnitAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelMinWorkGroupsPerComputeUnitAttr *A, Decl *New)
 
static void instantiateSYCLIntelMaxWorkGroupsPerMultiprocessorAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelMaxWorkGroupsPerMultiprocessorAttr *A, Decl *New)
 
static void instantiateSYCLIntelMaxConcurrencyAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelMaxConcurrencyAttr *A, Decl *New)
 
static void instantiateSYCLIntelPrivateCopiesAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelPrivateCopiesAttr *A, Decl *New)
 
static void instantiateSYCLIntelMaxReplicatesAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelMaxReplicatesAttr *A, Decl *New)
 
static void instantiateSYCLIntelInitiationIntervalAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelInitiationIntervalAttr *A, Decl *New)
 
static void instantiateSYCLIntelESimdVectorizeAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelESimdVectorizeAttr *A, Decl *New)
 
static void instantiateSYCLAddIRAttributesFunctionAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLAddIRAttributesFunctionAttr *A, Decl *New)
 
static void instantiateSYCLAddIRAttributesKernelParameterAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLAddIRAttributesKernelParameterAttr *A, Decl *New)
 
static void instantiateSYCLAddIRAttributesGlobalVariableAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLAddIRAttributesGlobalVariableAttr *A, Decl *New)
 
static void instantiateSYCLAddIRAnnotationsMemberAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLAddIRAnnotationsMemberAttr *A, Decl *New)
 
static void instantiateSYCLWorkGroupSizeHintAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLWorkGroupSizeHintAttr *A, Decl *New)
 
static void instantiateSYCLIntelMaxWorkGroupSizeAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLIntelMaxWorkGroupSizeAttr *A, Decl *New)
 
static void instantiateSYCLReqdWorkGroupSizeAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLReqdWorkGroupSizeAttr *A, Decl *New)
 
static void instantiateDependentSYCLKernelAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const SYCLKernelAttr &Attr, Decl *New)
 
static bool isRelevantAttr (Sema &S, const Decl *D, const Attr *A)
 Determine whether the attribute A might be relevant to the declaration D. More...
 
static void instantiateDependentHLSLParamModifierAttr (Sema &S, const MultiLevelTemplateArgumentList &TemplateArgs, const HLSLParamModifierAttr *Attr, Decl *New)
 
static Sema::RetainOwnershipKind attrToRetainOwnershipKind (const Attr *A)
 
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 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 NamedDeclfindInstantiationOf (ASTContext &Ctx, NamedDecl *D, ForwardIterator first, ForwardIterator last)
 
static bool isDependentContextAtLevel (DeclContext *DC, unsigned Level)
 Determine whether the given context is dependent on template parameters at level Level or below. More...
 
static void processFunctionInstantiation (Sema &S, SourceLocation PointOfInstantiation, FunctionDecl *FD, bool DefinitionRequired, MangleContext &MC)
 

Function Documentation

◆ adjustFunctionTypeForInstantiation()

static QualType adjustFunctionTypeForInstantiation ( ASTContext Context,
FunctionDecl D,
TypeSourceInfo TInfo 
)
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.

Parameters
DThe declaration we're instantiating.
TInfoThe already-instantiated type.

Definition at line 2592 of file SemaTemplateInstantiateDecl.cpp.

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::TemplateDeclInstantiator::VisitFunctionDecl().

◆ attrToRetainOwnershipKind()

static Sema::RetainOwnershipKind attrToRetainOwnershipKind ( const Attr A)
static

◆ collectUnexpandedParameterPacks()

static void collectUnexpandedParameterPacks ( Sema S,
TemplateParameterList Params,
SmallVectorImpl< UnexpandedParameterPack > &  Unexpanded 
)
static

Definition at line 3656 of file SemaTemplateInstantiateDecl.cpp.

◆ findInstantiationOf()

template<typename ForwardIterator >
static NamedDecl* findInstantiationOf ( ASTContext Ctx,
NamedDecl D,
ForwardIterator  first,
ForwardIterator  last 
)
static

Definition at line 6608 of file SemaTemplateInstantiateDecl.cpp.

References isInstantiationOf().

◆ getPreviousDeclForInstantiation()

template<typename DeclT >
static DeclT* getPreviousDeclForInstantiation ( DeclT *  D)
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 1404 of file SemaTemplateInstantiateDecl.cpp.

References clang::Decl::getLexicalDeclContext(), and clang::Decl::getPreviousDecl().

Referenced by clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), and clang::TemplateDeclInstantiator::VisitBaseUsingDecls().

◆ instantiateDependentAlignedAttr() [1/2]

static void instantiateDependentAlignedAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AlignedAttr *  Aligned,
Decl New 
)
static

Definition at line 113 of file SemaTemplateInstantiateDecl.cpp.

◆ instantiateDependentAlignedAttr() [2/2]

static void instantiateDependentAlignedAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AlignedAttr *  Aligned,
Decl New,
bool  IsPackExpansion 
)
static

Definition at line 91 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAlignValueAttr()

static void instantiateDependentAlignValueAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AlignValueAttr *  Aligned,
Decl New 
)
static

Definition at line 174 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAllocAlignAttr()

static void instantiateDependentAllocAlignAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AllocAlignAttr *  Align,
Decl New 
)
static

Definition at line 185 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAMDGPUFlatWorkGroupSizeAttr()

static void instantiateDependentAMDGPUFlatWorkGroupSizeAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AMDGPUFlatWorkGroupSizeAttr &  Attr,
Decl New 
)
static

Definition at line 550 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAMDGPUMaxNumWorkGroupsAttr()

static void instantiateDependentAMDGPUMaxNumWorkGroupsAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AMDGPUMaxNumWorkGroupsAttr &  Attr,
Decl New 
)
static

Definition at line 614 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAMDGPUWavesPerEUAttr()

static void instantiateDependentAMDGPUWavesPerEUAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AMDGPUWavesPerEUAttr &  Attr,
Decl New 
)
static

Definition at line 591 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAnnotationAttr()

static void instantiateDependentAnnotationAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AnnotateAttr *  Attr,
Decl New 
)
static

Definition at line 195 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentAssumeAlignedAttr()

static void instantiateDependentAssumeAlignedAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const AssumeAlignedAttr *  Aligned,
Decl New 
)
static

Definition at line 151 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentCUDALaunchBoundsAttr()

static void instantiateDependentCUDALaunchBoundsAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const CUDALaunchBoundsAttr &  Attr,
Decl New 
)
static

Definition at line 289 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentDiagnoseIfAttr()

static void instantiateDependentDiagnoseIfAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const DiagnoseIfAttr *  DIA,
const Decl Tmpl,
FunctionDecl New 
)
static

Definition at line 275 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentEnableIfAttr()

static void instantiateDependentEnableIfAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const EnableIfAttr *  EIA,
const Decl Tmpl,
FunctionDecl New 
)
static

Definition at line 264 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentFunctionAttrCondition()

static Expr* instantiateDependentFunctionAttrCondition ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const Attr A,
Expr OldCond,
const Decl Tmpl,
FunctionDecl New 
)
static

Definition at line 233 of file SemaTemplateInstantiateDecl.cpp.

◆ instantiateDependentHLSLParamModifierAttr()

static void instantiateDependentHLSLParamModifierAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const HLSLParamModifierAttr *  Attr,
Decl New 
)
static

Definition at line 1014 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentModeAttr()

static void instantiateDependentModeAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const ModeAttr &  Attr,
Decl New 
)
static

Definition at line 321 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateDependentSYCLKernelAttr()

static void instantiateDependentSYCLKernelAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLKernelAttr &  Attr,
Decl New 
)
static

Definition at line 961 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateIntelReqdSubGroupSize()

static void instantiateIntelReqdSubGroupSize ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const IntelReqdSubGroupSizeAttr *  A,
Decl New 
)
static

Definition at line 731 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateOMPDeclareSimdDeclAttr()

static void instantiateOMPDeclareSimdDeclAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const OMPDeclareSimdDeclAttr &  Attr,
Decl New 
)
static

Instantiation of 'declare simd' attribute and its arguments.

Definition at line 329 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateOMPDeclareVariantAttr()

static void instantiateOMPDeclareVariantAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const OMPDeclareVariantAttr &  Attr,
Decl New 
)
static

Instantiation of 'declare variant' attribute and its arguments.

Definition at line 412 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLAddIRAnnotationsMemberAttr()

static void instantiateSYCLAddIRAnnotationsMemberAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLAddIRAnnotationsMemberAttr *  A,
Decl New 
)
static

Definition at line 889 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLAddIRAttributesFunctionAttr()

static void instantiateSYCLAddIRAttributesFunctionAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLAddIRAttributesFunctionAttr *  A,
Decl New 
)
static

Definition at line 853 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLAddIRAttributesGlobalVariableAttr()

static void instantiateSYCLAddIRAttributesGlobalVariableAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLAddIRAttributesGlobalVariableAttr *  A,
Decl New 
)
static

Definition at line 877 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLAddIRAttributesKernelParameterAttr()

static void instantiateSYCLAddIRAttributesKernelParameterAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLAddIRAttributesKernelParameterAttr *  A,
Decl New 
)
static

Definition at line 865 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLDeviceHasAttr()

static void instantiateSYCLDeviceHasAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLDeviceHasAttr *  Attr,
Decl New 
)
static

Definition at line 683 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelBankBitsAttr()

static void instantiateSYCLIntelBankBitsAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelBankBitsAttr *  Attr,
Decl New 
)
static

Definition at line 667 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelBankWidthAttr()

static void instantiateSYCLIntelBankWidthAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelBankWidthAttr *  Attr,
Decl New 
)
static

Definition at line 647 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelESimdVectorizeAttr()

static void instantiateSYCLIntelESimdVectorizeAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelESimdVectorizeAttr *  A,
Decl New 
)
static

Definition at line 843 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelForcePow2DepthAttr()

static void instantiateSYCLIntelForcePow2DepthAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelForcePow2DepthAttr *  Attr,
Decl New 
)
static

Definition at line 637 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelInitiationIntervalAttr()

static void instantiateSYCLIntelInitiationIntervalAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelInitiationIntervalAttr *  A,
Decl New 
)
static

Definition at line 833 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelLoopFuseAttr()

static void instantiateSYCLIntelLoopFuseAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelLoopFuseAttr *  Attr,
Decl New 
)
static

Definition at line 721 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelMaxConcurrencyAttr()

static void instantiateSYCLIntelMaxConcurrencyAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelMaxConcurrencyAttr *  A,
Decl New 
)
static

Definition at line 803 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelMaxGlobalWorkDimAttr()

static void instantiateSYCLIntelMaxGlobalWorkDimAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelMaxGlobalWorkDimAttr *  A,
Decl New 
)
static

Definition at line 771 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelMaxReplicatesAttr()

static void instantiateSYCLIntelMaxReplicatesAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelMaxReplicatesAttr *  A,
Decl New 
)
static

Definition at line 823 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelMaxWorkGroupSizeAttr()

static void instantiateSYCLIntelMaxWorkGroupSizeAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelMaxWorkGroupSizeAttr *  A,
Decl New 
)
static

Definition at line 920 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelMaxWorkGroupsPerMultiprocessorAttr()

static void instantiateSYCLIntelMaxWorkGroupsPerMultiprocessorAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelMaxWorkGroupsPerMultiprocessorAttr *  A,
Decl New 
)
static

Definition at line 792 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelMinWorkGroupsPerComputeUnitAttr()

static void instantiateSYCLIntelMinWorkGroupsPerComputeUnitAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelMinWorkGroupsPerComputeUnitAttr *  A,
Decl New 
)
static

Definition at line 781 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelNoGlobalWorkOffsetAttr()

static void instantiateSYCLIntelNoGlobalWorkOffsetAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelNoGlobalWorkOffsetAttr *  A,
Decl New 
)
static

Definition at line 761 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelNumBanksAttr()

static void instantiateSYCLIntelNumBanksAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelNumBanksAttr *  Attr,
Decl New 
)
static

Definition at line 657 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelNumSimdWorkItemsAttr()

static void instantiateSYCLIntelNumSimdWorkItemsAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelNumSimdWorkItemsAttr *  A,
Decl New 
)
static

Definition at line 741 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelPipeIOAttr()

static void instantiateSYCLIntelPipeIOAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelPipeIOAttr *  Attr,
Decl New 
)
static

Definition at line 710 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelPrivateCopiesAttr()

static void instantiateSYCLIntelPrivateCopiesAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelPrivateCopiesAttr *  A,
Decl New 
)
static

Definition at line 813 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLIntelSchedulerTargetFmaxMhzAttr()

static void instantiateSYCLIntelSchedulerTargetFmaxMhzAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLIntelSchedulerTargetFmaxMhzAttr *  A,
Decl New 
)
static

Definition at line 751 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLReqdWorkGroupSizeAttr()

static void instantiateSYCLReqdWorkGroupSizeAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLReqdWorkGroupSizeAttr *  A,
Decl New 
)
static

Definition at line 939 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLUsesAspectsAttr()

static void instantiateSYCLUsesAspectsAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLUsesAspectsAttr *  Attr,
Decl New 
)
static

Definition at line 695 of file SemaTemplateInstantiateDecl.cpp.

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

◆ instantiateSYCLWorkGroupSizeHintAttr()

static void instantiateSYCLWorkGroupSizeHintAttr ( Sema S,
const MultiLevelTemplateArgumentList TemplateArgs,
const SYCLWorkGroupSizeHintAttr *  A,
Decl New 
)
static

Definition at line 901 of file SemaTemplateInstantiateDecl.cpp.

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

◆ isDeclWithinFunction()

static bool isDeclWithinFunction ( const Decl D)
static

◆ isDependentContextAtLevel()

static bool isDependentContextAtLevel ( DeclContext DC,
unsigned  Level 
)
static

Determine whether the given context is dependent on template parameters at level Level or below.

Sometimes we only substitute an inner set of template arguments and leave the outer templates alone. In such cases, contexts dependent only on the outer levels are not effectively dependent.

Definition at line 6637 of file SemaTemplateInstantiateDecl.cpp.

References clang::DeclContext::isDependentContext().

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

◆ isInstantiationOf() [1/9]

static bool isInstantiationOf ( ASTContext Ctx,
NamedDecl D,
Decl Other 
)
static

◆ isInstantiationOf() [2/9]

static bool isInstantiationOf ( ClassTemplateDecl Pattern,
ClassTemplateDecl Instance 
)
static

◆ isInstantiationOf() [3/9]

static bool isInstantiationOf ( ClassTemplatePartialSpecializationDecl Pattern,
ClassTemplatePartialSpecializationDecl Instance 
)
static

◆ isInstantiationOf() [4/9]

static bool isInstantiationOf ( CXXRecordDecl Pattern,
CXXRecordDecl Instance 
)
static

◆ isInstantiationOf() [5/9]

static bool isInstantiationOf ( EnumDecl Pattern,
EnumDecl Instance 
)
static

◆ isInstantiationOf() [6/9]

static bool isInstantiationOf ( FunctionDecl Pattern,
FunctionDecl Instance 
)
static

◆ isInstantiationOf() [7/9]

static bool isInstantiationOf ( FunctionTemplateDecl Pattern,
FunctionTemplateDecl Instance 
)
static

◆ isInstantiationOf() [8/9]

static bool isInstantiationOf ( UsingDecl Pattern,
UsingDecl Instance,
ASTContext C 
)
static

Definition at line 6506 of file SemaTemplateInstantiateDecl.cpp.

References clang::declaresSameEntity().

◆ isInstantiationOf() [9/9]

static bool isInstantiationOf ( UsingShadowDecl Pattern,
UsingShadowDecl Instance,
ASTContext C 
)
static

Definition at line 6499 of file SemaTemplateInstantiateDecl.cpp.

References clang::declaresSameEntity().

◆ isInstantiationOfStaticDataMember()

static bool isInstantiationOfStaticDataMember ( VarDecl Pattern,
VarDecl Instance 
)
static

Definition at line 6538 of file SemaTemplateInstantiateDecl.cpp.

References clang::VarDecl::getCanonicalDecl().

Referenced by isInstantiationOf().

◆ isInstantiationOfUnresolvedUsingDecl()

template<typename T >
static bool isInstantiationOfUnresolvedUsingDecl ( T *  Pattern,
Decl Other,
ASTContext Ctx 
)
static

◆ isRelevantAttr()

static bool isRelevantAttr ( Sema S,
const Decl D,
const Attr A 
)
static

Determine whether the attribute A might be relevant to the declaration D.

If not, we can skip instantiating it. The attribute may or may not have been instantiated yet.

Definition at line 970 of file SemaTemplateInstantiateDecl.cpp.

Referenced by clang::Sema::InstantiateAttrs(), and clang::Sema::InstantiateAttrsForDecl().

◆ processFunctionInstantiation()

static void processFunctionInstantiation ( Sema S,
SourceLocation  PointOfInstantiation,
FunctionDecl FD,
bool  DefinitionRequired,
MangleContext MC 
)
static

◆ SubstQualifier()

template<typename DeclT >
static bool SubstQualifier ( Sema SemaRef,
const DeclT *  OldDecl,
DeclT *  NewDecl,
const MultiLevelTemplateArgumentList TemplateArgs 
)
static