27#include "llvm/ADT/ArrayRef.h"
28#include "llvm/ADT/FoldingSet.h"
29#include "llvm/ADT/PointerUnion.h"
30#include "llvm/ADT/STLExtras.h"
31#include "llvm/ADT/SmallVector.h"
32#include "llvm/Support/Casting.h"
33#include "llvm/Support/ErrorHandling.h"
48TemplateParameterList::TemplateParameterList(
const ASTContext&
C,
54 : TemplateLoc(TemplateLoc), LAngleLoc(LAngleLoc), RAngleLoc(RAngleLoc),
55 NumParams(Params.size()), ContainsUnexpandedParameterPack(
false),
56 HasRequiresClause(RequiresClause != nullptr),
57 HasConstrainedParameters(
false) {
58 for (
unsigned Idx = 0; Idx < NumParams; ++Idx) {
62 bool IsPack =
P->isTemplateParameterPack();
63 if (
const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(
P)) {
64 if (!IsPack && NTTP->getType()->containsUnexpandedParameterPack())
65 ContainsUnexpandedParameterPack =
true;
66 if (NTTP->hasPlaceholderTypeConstraint())
67 HasConstrainedParameters =
true;
68 }
else if (
const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(
P)) {
70 TTP->getTemplateParameters()->containsUnexpandedParameterPack())
71 ContainsUnexpandedParameterPack =
true;
72 }
else if (
const auto *TTP = dyn_cast<TemplateTypeParmDecl>(
P)) {
74 if (TC->getImmediatelyDeclaredConstraint()
75 ->containsUnexpandedParameterPack())
76 ContainsUnexpandedParameterPack =
true;
78 if (TTP->hasTypeConstraint())
79 HasConstrainedParameters =
true;
81 llvm_unreachable(
"unexpected template parameter type");
87 if (HasRequiresClause) {
89 ContainsUnexpandedParameterPack =
true;
90 *getTrailingObjects<Expr *>() = RequiresClause;
94bool TemplateParameterList::containsUnexpandedParameterPack()
const {
95 if (ContainsUnexpandedParameterPack)
97 if (!HasConstrainedParameters)
104 if (!Param->isImplicit())
107 if (
const auto *TTP = dyn_cast<TemplateTypeParmDecl>(Param)) {
108 const auto *TC = TTP->getTypeConstraint();
109 if (TC && TC->getImmediatelyDeclaredConstraint()
110 ->containsUnexpandedParameterPack())
123 void *Mem =
C.Allocate(totalSizeToAlloc<NamedDecl *, Expr *>(
124 Params.size(), RequiresClause ? 1u : 0u),
127 RAngleLoc, RequiresClause);
133 ID.AddBoolean(RC !=
nullptr);
138 if (
const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(D)) {
140 ID.AddBoolean(NTTP->isParameterPack());
141 NTTP->getType().getCanonicalType().Profile(ID);
142 ID.AddBoolean(NTTP->hasPlaceholderTypeConstraint());
143 if (
const Expr *E = NTTP->getPlaceholderTypeConstraint())
144 E->Profile(ID,
C,
true);
147 if (
const auto *TTP = dyn_cast<TemplateTypeParmDecl>(D)) {
149 ID.AddBoolean(TTP->isParameterPack());
150 ID.AddBoolean(TTP->hasTypeConstraint());
152 TC->getImmediatelyDeclaredConstraint()->Profile(ID,
C,
156 const auto *TTP = cast<TemplateTemplateParmDecl>(D);
158 ID.AddBoolean(TTP->isParameterPack());
159 TTP->getTemplateParameters()->Profile(ID,
C);
164 unsigned NumRequiredArgs = 0;
166 if (
P->isTemplateParameterPack()) {
168 NumRequiredArgs += *Expansions;
174 if (
const auto *TTP = dyn_cast<TemplateTypeParmDecl>(
P)) {
175 if (TTP->hasDefaultArgument())
177 }
else if (
const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(
P)) {
178 if (NTTP->hasDefaultArgument())
180 }
else if (cast<TemplateTemplateParmDecl>(
P)->hasDefaultArgument())
186 return NumRequiredArgs;
194 if (
const auto *TTP = dyn_cast<TemplateTypeParmDecl>(FirstParm))
195 return TTP->getDepth();
196 else if (
const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(FirstParm))
197 return NTTP->getDepth();
199 return cast<TemplateTemplateParmDecl>(FirstParm)->getDepth();
206 P->setDeclContext(Owner);
208 if (
const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(
P))
212 if (
P->isInvalidDecl())
220 if (HasConstrainedParameters)
222 if (
const auto *TTP = dyn_cast<TemplateTypeParmDecl>(Param)) {
223 if (
const auto *TC = TTP->getTypeConstraint())
224 AC.push_back(TC->getImmediatelyDeclaredConstraint());
225 }
else if (
const auto *NTTP = dyn_cast<NonTypeTemplateParmDecl>(Param)) {
226 if (
const Expr *E = NTTP->getPlaceholderTypeConstraint())
230 if (HasRequiresClause)
235 return HasRequiresClause || HasConstrainedParameters;
244 if (
const auto *ParamValueDecl =
245 dyn_cast<NonTypeTemplateParmDecl>(TemplParam))
246 if (ParamValueDecl->getType()->getContainedDeducedType())
254 return new (
C)
char[
sizeof(
void*) * 2];
266 :
NamedDecl(DK, DC, L, Name), TemplatedDecl(
Decl), TemplateParams(Params) {}
268void TemplateDecl::anchor() {}
274 if (
const Expr *TRC = FD->getTrailingRequiresClause())
282 return FD->getTrailingRequiresClause();
288 case TemplateDecl::TypeAliasTemplate:
289 case TemplateDecl::BuiltinTemplate:
300void RedeclarableTemplateDecl::anchor() {}
316 PrevDecls.push_back(Prev);
342 for (uint32_t I = 0, N = *Specs++; I != N; ++I)
347template<
class EntryType,
typename... ProfileArguments>
350 llvm::FoldingSetVector<EntryType> &Specs,
void *&InsertPos,
351 ProfileArguments&&... ProfileArgs) {
354 llvm::FoldingSetNodeID ID;
355 EntryType::Profile(ID, std::forward<ProfileArguments>(ProfileArgs)...,
357 EntryType *Entry = Specs.FindNodeOrInsertPos(ID, InsertPos);
358 return Entry ? SETraits::getDecl(Entry)->getMostRecentDecl() :
nullptr;
361template<
class Derived,
class EntryType>
363 llvm::FoldingSetVector<EntryType> &Specializations, EntryType *Entry,
369 void *CorrectInsertPos;
372 SETraits::getTemplateArgs(Entry)) &&
373 InsertPos == CorrectInsertPos &&
374 "given incorrect InsertPos for specialization");
376 Specializations.InsertNode(Entry, InsertPos);
378 EntryType *Existing = Specializations.GetOrInsertNode(Entry);
381 "non-canonical specialization?");
385 L->AddedCXXTemplateSpecialization(cast<Derived>(
this),
386 SETraits::getDecl(Entry));
392 if (!CommonPtr->InjectedArgs) {
396 CommonPtr->InjectedArgs =
398 std::copy(TemplateArgs.begin(), TemplateArgs.end(),
399 CommonPtr->InjectedArgs);
428 auto *CommonPtr =
new (
C)
Common;
429 C.addDestruction(CommonPtr);
437llvm::FoldingSetVector<FunctionTemplateSpecializationInfo> &
463 Common *ThisCommon =
static_cast<Common *
>(Base::Common);
464 Common *PrevCommon =
nullptr;
467 if (Prev->Base::Common) {
468 PrevCommon =
static_cast<Common *
>(Prev->Base::Common);
471 PreviousDecls.push_back(Prev);
477 for (
auto *D : PreviousDecls)
478 D->Base::Common = ThisCommon;
484 "Can't merge incompatible declarations!");
486 Base::Common = PrevCommon;
515llvm::FoldingSetVector<ClassTemplateSpecializationDecl> &
521llvm::FoldingSetVector<ClassTemplatePartialSpecializationDecl> &
529 auto *CommonPtr =
new (
C)
Common;
530 C.addDestruction(CommonPtr);
556 ID.AddInteger(TemplateArgs.size());
571 assert(Existing->
isCanonicalDecl() &&
"Non-canonical specialization?");
575 L->AddedCXXTemplateSpecialization(
this, D);
580 llvm::FoldingSetVector<ClassTemplatePartialSpecializationDecl> &PartialSpecs
583 PS.reserve(PartialSpecs.size());
585 PS.push_back(
P.getMostRecentDecl());
593 if (Context.
hasSameType(
P.getInjectedSpecializationType(),
T))
594 return P.getMostRecentDecl();
605 if (
P.getInstantiatedFromMember()->getCanonicalDecl() == DCanon)
606 return P.getMostRecentDecl();
642 bool Typename,
bool ParameterPack,
bool HasTypeConstraint,
643 std::optional<unsigned> NumExpanded) {
646 additionalSizeToAlloc<TypeConstraint>(HasTypeConstraint ? 1 : 0))
648 HasTypeConstraint, NumExpanded);
649 QualType TTPType =
C.getTemplateTypeParmType(D,
P, ParameterPack, TTPDecl);
650 TTPDecl->setTypeForDecl(TTPType.
getTypePtr());
658 false,
false, std::nullopt);
663 bool HasTypeConstraint) {
665 additionalSizeToAlloc<TypeConstraint>(HasTypeConstraint ? 1 : 0))
667 false, HasTypeConstraint, std::nullopt);
702 assert(HasTypeConstraint &&
703 "HasTypeConstraint=true must be passed at construction in order to "
704 "call setTypeConstraint");
705 assert(!TypeConstraintInitialized &&
706 "TypeConstraint was already initialized!");
707 new (getTrailingObjects<TypeConstraint>())
709 TypeConstraintInitialized =
true;
716NonTypeTemplateParmDecl::NonTypeTemplateParmDecl(
722 ExpandedParameterPack(
true), NumExpandedTypes(ExpandedTypes.size()) {
723 if (!ExpandedTypes.empty() && !ExpandedTInfos.empty()) {
725 getTrailingObjects<std::pair<QualType, TypeSourceInfo *>>();
726 for (
unsigned I = 0; I != NumExpandedTypes; ++I) {
727 new (&TypesAndInfos[I].first)
QualType(ExpandedTypes[I]);
728 TypesAndInfos[I].second = ExpandedTInfos[I];
740 additionalSizeToAlloc<std::pair<QualType, TypeSourceInfo *>,
754 additionalSizeToAlloc<std::pair<QualType, TypeSourceInfo *>,
758 ExpandedTypes, ExpandedTInfos);
763 bool HasTypeConstraint) {
764 return new (
C, ID, additionalSizeToAlloc<std::pair<
QualType,
767 HasTypeConstraint ? 1 : 0))
769 0, 0,
nullptr,
QualType(),
false,
nullptr);
774 unsigned NumExpandedTypes,
775 bool HasTypeConstraint) {
778 additionalSizeToAlloc<std::pair<QualType, TypeSourceInfo *>,
Expr *>(
779 NumExpandedTypes, HasTypeConstraint ? 1 : 0))
782 std::nullopt, std::nullopt);
783 NTTP->NumExpandedTypes = NumExpandedTypes;
804void TemplateTemplateParmDecl::anchor() {}
806TemplateTemplateParmDecl::TemplateTemplateParmDecl(
812 ExpandedParameterPack(
true), NumExpandedParams(Expansions.size()) {
813 if (!Expansions.empty())
814 std::uninitialized_copy(Expansions.begin(), Expansions.end(),
815 getTrailingObjects<TemplateParameterList *>());
834 additionalSizeToAlloc<TemplateParameterList *>(Expansions.size()))
841 false,
nullptr,
false,
nullptr);
846 unsigned NumExpansions) {
848 new (
C, ID, additionalSizeToAlloc<TemplateParameterList *>(NumExpansions))
850 false,
nullptr, std::nullopt);
851 TTP->NumExpandedParams = NumExpansions;
863 DefaultArgument.
set(
nullptr);
872 : NumArguments(Args.size()) {
873 std::uninitialized_copy(Args.begin(), Args.end(),
874 getTrailingObjects<TemplateArgument>());
880 void *Mem = Context.
Allocate(totalSizeToAlloc<TemplateArgument>(Args.size()));
890 if (TemplateArgsAsWritten)
892 *TemplateArgsAsWritten);
895 C.Allocate(totalSizeToAlloc<MemberSpecializationInfo *>(MSInfo ? 1 : 0));
897 FD, Template, TSK, TemplateArgs, ArgsAsWritten, POI, MSInfo);
913 SpecializedTemplate(SpecializedTemplate),
934 Context, ClassTemplateSpecialization, TK, DC, StartLoc, IdLoc,
935 SpecializedTemplate, Args, PrevDecl);
936 Result->setMayHaveOutOfDateDef(
false);
943 Result->setHasExternalLexicalStorage(
955 Result->setMayHaveOutOfDateDef(
false);
963 const auto *PS = dyn_cast<ClassTemplatePartialSpecializationDecl>(
this);
965 PS ? PS->getTemplateArgsAsWritten() :
nullptr) {
967 OS, ArgsAsWritten->arguments(), Policy,
972 OS, TemplateArgs.
asArray(), Policy,
979 if (
const auto *PartialSpec =
980 SpecializedTemplate.dyn_cast<SpecializedPartialSpecialization*>())
981 return PartialSpec->PartialSpecialization->getSpecializedTemplate();
1005 auto *ctpsd =
const_cast<CTPSDecl *
>(cast<CTPSDecl>(
this));
1007 assert(inst_from !=
nullptr);
1008 return inst_from->getSourceRange();
1015 if (inst_from.isNull())
1018 return ctd->getSourceRange();
1030 Expr *ConstraintExpr) {
1050ImplicitConceptSpecializationDecl::ImplicitConceptSpecializationDecl(
1053 :
Decl(ImplicitConceptSpecialization, DC, SL),
1054 NumTemplateArgs(ConvertedArgs.size()) {
1055 setTemplateArguments(ConvertedArgs);
1058ImplicitConceptSpecializationDecl::ImplicitConceptSpecializationDecl(
1059 EmptyShell Empty,
unsigned NumTemplateArgs)
1060 :
Decl(ImplicitConceptSpecialization, Empty),
1061 NumTemplateArgs(NumTemplateArgs) {}
1067 additionalSizeToAlloc<TemplateArgument>(ConvertedArgs.size()))
1073 const ASTContext &
C,
unsigned ID,
unsigned NumTemplateArgs) {
1074 return new (
C, ID, additionalSizeToAlloc<TemplateArgument>(NumTemplateArgs))
1080 assert(Converted.size() == NumTemplateArgs);
1081 std::uninitialized_copy(Converted.begin(), Converted.end(),
1082 getTrailingObjects<TemplateArgument>());
1088void ClassTemplatePartialSpecializationDecl::anchor() {}
1090ClassTemplatePartialSpecializationDecl::
1091ClassTemplatePartialSpecializationDecl(
ASTContext &Context, TagKind TK,
1101 ClassTemplatePartialSpecialization,
1102 TK, DC, StartLoc, IdLoc,
1103 SpecializedTemplate, Args, PrevDecl),
1104 TemplateParams(Params), ArgsAsWritten(ArgInfos),
1105 InstantiatedFromMember(nullptr,
false) {
1123 auto *
Result =
new (Context, DC)
1125 Params, SpecializedTemplate, Args,
1126 ASTArgInfos, PrevDecl);
1128 Result->setMayHaveOutOfDateDef(
false);
1138 Result->setMayHaveOutOfDateDef(
false);
1146void FriendTemplateDecl::anchor() {}
1154 if (!Params.empty()) {
1156 llvm::copy(Params, TPL);
1158 return new (Context, DC)
1190 auto *CommonPtr =
new (
C)
Common;
1191 C.addDestruction(CommonPtr);
1230llvm::FoldingSetVector<VarTemplateSpecializationDecl> &
1236llvm::FoldingSetVector<VarTemplatePartialSpecializationDecl> &
1244 auto *CommonPtr =
new (
C)
Common;
1245 C.addDestruction(CommonPtr);
1270 ID.AddInteger(TemplateArgs.size());
1284 assert(Existing->
isCanonicalDecl() &&
"Non-canonical specialization?");
1288 L->AddedCXXTemplateSpecialization(
this, D);
1293 llvm::FoldingSetVector<VarTemplatePartialSpecializationDecl> &PartialSpecs =
1296 PS.reserve(PartialSpecs.size());
1298 PS.push_back(
P.getMostRecentDecl());
1306 if (
P.getInstantiatedFromMember()->getCanonicalDecl() == DCanon)
1307 return P.getMostRecentDecl();
1321 :
VarDecl(DK, Context, DC, StartLoc, IdLoc,
1323 SpecializedTemplate(SpecializedTemplate),
1338 VarTemplateSpecialization, Context, DC, StartLoc, IdLoc,
1339 SpecializedTemplate,
T, TInfo, S, Args);
1352 const auto *PS = dyn_cast<VarTemplatePartialSpecializationDecl>(
this);
1354 PS ? PS->getTemplateArgsAsWritten() :
nullptr) {
1356 OS, ArgsAsWritten->arguments(), Policy,
1361 OS, TemplateArgs.
asArray(), Policy,
1367 if (
const auto *PartialSpec =
1368 SpecializedTemplate.dyn_cast<SpecializedPartialSpecialization *>())
1369 return PartialSpec->PartialSpecialization->getSpecializedTemplate();
1398void VarTemplatePartialSpecializationDecl::anchor() {}
1400VarTemplatePartialSpecializationDecl::VarTemplatePartialSpecializationDecl(
1407 DC, StartLoc, IdLoc, SpecializedTemplate,
T,
1409 TemplateParams(Params), ArgsAsWritten(ArgInfos),
1410 InstantiatedFromMember(nullptr,
false) {
1427 Context, DC, StartLoc, IdLoc, Params, SpecializedTemplate,
T, TInfo,
1428 S, Args, ASTArgInfos);
1452 nullptr,
true,
false,
1454 T->setImplicit(
true);
1458 C.getTrivialTypeSourceInfo(
QualType(
T->getTypeForDecl(), 0));
1461 nullptr, TI->
getType(),
true, TI);
1462 N->setImplicit(
true);
1472 false,
nullptr,
false, TPL);
1473 TemplateTemplateParm->setImplicit(
true);
1478 nullptr,
true,
false,
1480 TemplateTypeParm->setImplicit(
true);
1484 QualType(TemplateTypeParm->getTypeForDecl(), 0));
1487 nullptr, TInfo->
getType(),
false, TInfo);
1488 NamedDecl *Params[] = {TemplateTemplateParm, TemplateTypeParm,
1489 NonTypeTemplateParm};
1502 nullptr, TInfo->
getType(),
false, TInfo);
1507 nullptr,
true,
true,
1509 Ts->setImplicit(
true);
1527 llvm_unreachable(
"unhandled BuiltinTemplateKind!");
1530void BuiltinTemplateDecl::anchor() {}
1544 C.addDestruction(&TPOD->Value);
1549TemplateParamObjectDecl::CreateDeserialized(
ASTContext &
C,
unsigned ID) {
1551 C.addDestruction(&TPOD->Value);
1557 OS <<
"<template param ";
1583 case Decl::Kind::CXXRecord:
1584 return cast<CXXRecordDecl>(D)
1585 ->getDescribedTemplate()
1586 ->getTemplateParameters();
1587 case Decl::Kind::ClassTemplate:
1588 return cast<ClassTemplateDecl>(D)->getTemplateParameters();
1589 case Decl::Kind::ClassTemplateSpecialization: {
1590 const auto *CTSD = cast<ClassTemplateSpecializationDecl>(D);
1591 auto P = CTSD->getSpecializedTemplateOrPartial();
1592 if (
const auto *CTPSD =
1594 return CTPSD->getTemplateParameters();
1595 return cast<ClassTemplateDecl *>(
P)->getTemplateParameters();
1597 case Decl::Kind::ClassTemplatePartialSpecialization:
1598 return cast<ClassTemplatePartialSpecializationDecl>(D)
1599 ->getTemplateParameters();
1600 case Decl::Kind::TypeAliasTemplate:
1601 return cast<TypeAliasTemplateDecl>(D)->getTemplateParameters();
1602 case Decl::Kind::BuiltinTemplate:
1603 return cast<BuiltinTemplateDecl>(D)->getTemplateParameters();
1604 case Decl::Kind::CXXDeductionGuide:
1605 case Decl::Kind::CXXConversion:
1606 case Decl::Kind::CXXConstructor:
1607 case Decl::Kind::CXXDestructor:
1608 case Decl::Kind::CXXMethod:
1609 case Decl::Kind::Function:
1610 return cast<FunctionDecl>(D)
1611 ->getTemplateSpecializationInfo()
1613 ->getTemplateParameters();
1614 case Decl::Kind::FunctionTemplate:
1615 return cast<FunctionTemplateDecl>(D)->getTemplateParameters();
1616 case Decl::Kind::VarTemplate:
1617 return cast<VarTemplateDecl>(D)->getTemplateParameters();
1618 case Decl::Kind::VarTemplateSpecialization: {
1619 const auto *VTSD = cast<VarTemplateSpecializationDecl>(D);
1620 auto P = VTSD->getSpecializedTemplateOrPartial();
1621 if (
const auto *VTPSD =
1623 return VTPSD->getTemplateParameters();
1624 return cast<VarTemplateDecl *>(
P)->getTemplateParameters();
1626 case Decl::Kind::VarTemplatePartialSpecialization:
1627 return cast<VarTemplatePartialSpecializationDecl>(D)
1628 ->getTemplateParameters();
1629 case Decl::Kind::TemplateTemplateParm:
1630 return cast<TemplateTemplateParmDecl>(D)->getTemplateParameters();
1631 case Decl::Kind::Concept:
1632 return cast<ConceptDecl>(D)->getTemplateParameters();
1634 llvm_unreachable(
"Unhandled templated declaration kind");
Defines the clang::ASTContext interface.
Defines enum values for all the target-independent builtin functions.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
static TemplateParameterList * createTypePackElementParameterList(const ASTContext &C, DeclContext *DC)
static TemplateParameterList * createMakeIntegerSeqParameterList(const ASTContext &C, DeclContext *DC)
static bool AdoptTemplateParameterList(TemplateParameterList *Params, DeclContext *Owner)
static TemplateParameterList * createBuiltinTemplateParameterList(const ASTContext &C, DeclContext *DC, BuiltinTemplateKind BTK)
Defines the C++ template declaration subclasses.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
static StringRef getIdentifier(const Token &Tok)
Defines the clang::SourceLocation class and associated facilities.
Defines the clang::TypeLoc interface and its subclasses.
C Language Family Type Representation.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
void printPretty(raw_ostream &OS, const ASTContext &Ctx, QualType Ty) const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
QualType getTemplateSpecializationType(TemplateName T, ArrayRef< TemplateArgument > Args, QualType Canon=QualType()) const
QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST) const
getInjectedClassNameType - Return the unique reference to the injected class name type for the specif...
bool hasSameType(QualType T1, QualType T2) const
Determine whether the given types T1 and T2 are equivalent.
void getInjectedTemplateArgs(const TemplateParameterList *Params, SmallVectorImpl< TemplateArgument > &Args)
Get a template argument list with one argument per template parameter in a template parameter list,...
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
void * Allocate(size_t Size, unsigned Align=8) const
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any.
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
bool isConstrained() const
Represents a C++ struct/union/class.
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Declaration of a class template.
void AddPartialSpecialization(ClassTemplatePartialSpecializationDecl *D, void *InsertPos)
Insert the specified partial specialization knowing that it is not already in.
llvm::FoldingSetVector< ClassTemplateSpecializationDecl > & getSpecializations() const
Retrieve the set of specializations of this class template.
CXXRecordDecl * getTemplatedDecl() const
Get the underlying class declarations of the template.
static ClassTemplateDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Create an empty class template node.
llvm::FoldingSetVector< ClassTemplatePartialSpecializationDecl > & getPartialSpecializations() const
Retrieve the set of partial specializations of this class template.
ClassTemplatePartialSpecializationDecl * findPartialSpecialization(ArrayRef< TemplateArgument > Args, TemplateParameterList *TPL, void *&InsertPos)
Return the partial specialization with the provided arguments if it exists, otherwise return the inse...
CommonBase * newCommon(ASTContext &C) const override
static ClassTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)
Create a class template node.
ClassTemplatePartialSpecializationDecl * findPartialSpecInstantiatedFromMember(ClassTemplatePartialSpecializationDecl *D)
Find a class template partial specialization which was instantiated from the given member partial spe...
void LoadLazySpecializations() const
Load any lazily-loaded specializations from the external source.
void AddSpecialization(ClassTemplateSpecializationDecl *D, void *InsertPos)
Insert the specified specialization knowing that it is not already in.
QualType getInjectedClassNameSpecialization()
Retrieve the template specialization type of the injected-class-name for this class template.
Common * getCommonPtr() const
ClassTemplateSpecializationDecl * findSpecialization(ArrayRef< TemplateArgument > Args, void *&InsertPos)
Return the specialization with the provided arguments if it exists, otherwise return the insertion po...
ClassTemplatePartialSpecializationDecl * getInstantiatedFromMember() const
Retrieve the member class template partial specialization from which this particular class template p...
void Profile(llvm::FoldingSetNodeID &ID) const
static ClassTemplatePartialSpecializationDecl * CreateDeserialized(ASTContext &C, unsigned ID)
static ClassTemplatePartialSpecializationDecl * Create(ASTContext &Context, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, ClassTemplateDecl *SpecializedTemplate, ArrayRef< TemplateArgument > Args, const TemplateArgumentListInfo &ArgInfos, QualType CanonInjectedType, ClassTemplatePartialSpecializationDecl *PrevDecl)
Represents a class template specialization, which refers to a class template with a given set of temp...
TemplateSpecializationKind getSpecializationKind() const
Determine the kind of specialization that this declaration represents.
ClassTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
ClassTemplateSpecializationDecl(ASTContext &Context, Kind DK, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, ClassTemplateDecl *SpecializedTemplate, ArrayRef< TemplateArgument > Args, ClassTemplateSpecializationDecl *PrevDecl)
static ClassTemplateSpecializationDecl * CreateDeserialized(ASTContext &C, unsigned ID)
SourceLocation getExternLoc() const
Gets the location of the extern keyword, if present.
void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const override
Appends a human-readable name for this declaration into the given stream.
TypeSourceInfo * getTypeAsWritten() const
Gets the type of this specialization as it was written by the user, if it was so written.
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the class template specialization.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
SourceLocation getTemplateKeywordLoc() const
Gets the location of the template keyword, if present.
llvm::PointerUnion< ClassTemplateDecl *, ClassTemplatePartialSpecializationDecl * > getInstantiatedFrom() const
If this class template specialization is an instantiation of a template (rather than an explicit spec...
static ClassTemplateSpecializationDecl * Create(ASTContext &Context, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, ClassTemplateDecl *SpecializedTemplate, ArrayRef< TemplateArgument > Args, ClassTemplateSpecializationDecl *PrevDecl)
Declaration of a C++20 concept.
static ConceptDecl * CreateDeserialized(ASTContext &C, unsigned ID)
static ConceptDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, Expr *ConstraintExpr)
A reference to a concept and its template args, as it appears in the code.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
bool hasExternalLexicalStorage() const
Whether this DeclContext has external storage containing additional declarations that are lexically i...
Decl - This represents one declaration (or definition), e.g.
SourceLocation getEndLoc() const LLVM_READONLY
ASTContext & getASTContext() const LLVM_READONLY
ASTMutationListener * getASTMutationListener() const
void setInvalidDecl(bool Invalid=true)
setInvalidDecl - Indicates the Decl had a semantic error.
Kind
Lists the kind of concrete classes of Decl.
bool isCanonicalDecl() const
Whether this particular Decl is a canonical one.
The name of a declaration.
Represents a ValueDecl that came out of a declarator.
SourceLocation getOuterLocStart() const
Return start of source range taking into account any outer template declarations.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void set(ArgType Arg)
Set the default argument.
This represents one expression.
bool containsUnexpandedParameterPack() const
Whether this expression contains an unexpanded parameter pack (for C++11 variadic templates).
virtual Decl * GetExternalDecl(uint32_t ID)
Resolve a declaration ID into a declaration, potentially building a new declaration.
Declaration of a friend template.
static FriendTemplateDecl * Create(ASTContext &Context, DeclContext *DC, SourceLocation Loc, MutableArrayRef< TemplateParameterList * > Params, FriendUnion Friend, SourceLocation FriendLoc)
static FriendTemplateDecl * CreateDeserialized(ASTContext &C, unsigned ID)
llvm::PointerUnion< NamedDecl *, TypeSourceInfo * > FriendUnion
Represents a function declaration or definition.
Declaration of a template function.
FunctionDecl * findSpecialization(ArrayRef< TemplateArgument > Args, void *&InsertPos)
Return the specialization with the provided arguments if it exists, otherwise return the insertion po...
void addSpecialization(FunctionTemplateSpecializationInfo *Info, void *InsertPos)
Add a specialization of this function template.
CommonBase * newCommon(ASTContext &C) const override
static FunctionTemplateDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Create an empty function template node.
Common * getCommonPtr() const
FunctionTemplateDecl * getPreviousDecl()
Retrieve the previous declaration of this function template, or nullptr if no such declaration exists...
static FunctionTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)
Create a function template node.
llvm::FoldingSetVector< FunctionTemplateSpecializationInfo > & getSpecializations() const
Retrieve the set of function template specializations of this function template.
void mergePrevDecl(FunctionTemplateDecl *Prev)
Merge Prev with our RedeclarableTemplateDecl::Common.
void LoadLazySpecializations() const
Load any lazily-loaded specializations from the external source.
Provides information about a function template specialization, which is a FunctionDecl that has been ...
static FunctionTemplateSpecializationInfo * Create(ASTContext &C, FunctionDecl *FD, FunctionTemplateDecl *Template, TemplateSpecializationKind TSK, const TemplateArgumentList *TemplateArgs, const TemplateArgumentListInfo *TemplateArgsAsWritten, SourceLocation POI, MemberSpecializationInfo *MSInfo)
One of these records is kept for each identifier that is lexed.
void setTemplateArguments(ArrayRef< TemplateArgument > Converted)
static ImplicitConceptSpecializationDecl * CreateDeserialized(const ASTContext &C, unsigned ID, unsigned NumTemplateArgs)
static ImplicitConceptSpecializationDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation SL, ArrayRef< TemplateArgument > ConvertedArgs)
Provides information a specialization of a member of a class template, which may be a member function...
This represents a decl that may have a name.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
virtual void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const
Appends a human-readable name for this declaration into the given stream.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
SourceLocation getDefaultArgumentLoc() const
Retrieve the location of the default argument, if any.
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
static NonTypeTemplateParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, unsigned D, unsigned P, const IdentifierInfo *Id, QualType T, bool ParameterPack, TypeSourceInfo *TInfo)
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
static NonTypeTemplateParmDecl * CreateDeserialized(ASTContext &C, unsigned ID, bool HasTypeConstraint)
A (possibly-)qualified type.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
void print(raw_ostream &OS, const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine(), unsigned Indentation=0) const
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
Declaration of a redeclarable template.
CommonBase * getCommonPtr() const
Retrieves the "common" pointer shared by all (re-)declarations of the same template.
SpecEntryTraits< EntryType >::DeclType * findSpecializationImpl(llvm::FoldingSetVector< EntryType > &Specs, void *&InsertPos, ProfileArguments &&...ProfileArgs)
CommonBase * Common
Pointer to the common data shared by all declarations of this template.
virtual CommonBase * newCommon(ASTContext &C) const =0
void addSpecializationImpl(llvm::FoldingSetVector< EntryType > &Specs, EntryType *Entry, void *InsertPos)
void loadLazySpecializationsImpl() const
ArrayRef< TemplateArgument > getInjectedTemplateArgs()
Retrieve the "injected" template arguments that correspond to the template parameters of this templat...
RedeclarableTemplateDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
RedeclarableTemplateDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical, bool ProfileLambdaExpr=false) const
Produce a unique representation of the given statement.
SourceRange getBraceRange() const
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
A convenient class for passing around template argument information.
A template argument list.
static TemplateArgumentList * CreateCopy(ASTContext &Context, ArrayRef< TemplateArgument > Args)
Create a new template argument list that copies the given set of template arguments.
ArrayRef< TemplateArgument > asArray() const
Produce this as an array ref.
Location wrapper for a TemplateArgument.
SourceLocation getLocation() const
const TemplateArgument & getArgument() const
Represents a template argument.
bool isNull() const
Determine whether this template argument has no value.
The base class of all kinds of template declarations (e.g., class, function, etc.).
TemplateParameterList * TemplateParams
bool hasAssociatedConstraints() const
NamedDecl * getTemplatedDecl() const
Get the underlying, templated declaration.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void getAssociatedConstraints(llvm::SmallVectorImpl< const Expr * > &AC) const
Get the total constraint-expression associated with this template, including constraint-expressions d...
TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Represents a C++ template name within the type system.
A template parameter object.
void printAsExpr(llvm::raw_ostream &OS) const
Print this object as an equivalent expression.
const APValue & getValue() const
void printName(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const override
Print this template parameter object in a human-readable format.
void printAsInit(llvm::raw_ostream &OS) const
Print this object as an initializer suitable for a variable of the object's type.
Stores a list of template parameters for a TemplateDecl and its derived classes.
NamedDecl * getParam(unsigned Idx)
unsigned getDepth() const
Get the depth of this template parameter list in the set of template parameter lists.
bool hasAssociatedConstraints() const
unsigned getMinRequiredArguments() const
Returns the minimum number of arguments needed to form a template specialization.
static TemplateParameterList * Create(const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause)
Expr * getRequiresClause()
The constraint-expression of the associated requires-clause.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &C) const
void getAssociatedConstraints(llvm::SmallVectorImpl< const Expr * > &AC) const
All associated constraints derived from this template parameter list, including the requires clause a...
ArrayRef< NamedDecl * > asArray()
static bool shouldIncludeTypeForArgument(const PrintingPolicy &Policy, const TemplateParameterList *TPL, unsigned Idx)
Defines the position of a template parameter within a template parameter list.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
static TemplateTemplateParmDecl * CreateDeserialized(ASTContext &C, unsigned ID)
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
SourceLocation getDefaultArgumentLoc() const
Retrieve the location of the default argument, if any.
void setDefaultArgument(const ASTContext &C, const TemplateArgumentLoc &DefArg)
Set the default argument for this template parameter, and whether that default argument was inherited...
static TemplateTemplateParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, bool ParameterPack, IdentifierInfo *Id, bool Typename, TemplateParameterList *Params)
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Declaration of a template type parameter.
SourceLocation getDefaultArgumentLoc() const
Retrieves the location of the default argument declaration.
unsigned getIndex() const
Retrieve the index of the template parameter.
TypeSourceInfo * getDefaultArgumentInfo() const
Retrieves the default argument's source information, if any.
static TemplateTypeParmDecl * Create(const ASTContext &C, DeclContext *DC, SourceLocation KeyLoc, SourceLocation NameLoc, unsigned D, unsigned P, IdentifierInfo *Id, bool Typename, bool ParameterPack, bool HasTypeConstraint=false, std::optional< unsigned > NumExpanded=std::nullopt)
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
static TemplateTypeParmDecl * CreateDeserialized(const ASTContext &C, unsigned ID)
bool isParameterPack() const
Returns whether this is a parameter pack.
unsigned getDepth() const
Retrieve the depth of the template parameter.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setTypeConstraint(ConceptReference *CR, Expr *ImmediatelyDeclaredConstraint)
Declaration of an alias template.
CommonBase * newCommon(ASTContext &C) const override
static TypeAliasTemplateDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Create an empty alias template node.
static TypeAliasTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, NamedDecl *Decl)
Create a function template node.
Models the abbreviated syntax to constrain a template type parameter: template <convertible_to<string...
const Type * getTypeForDecl() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
SourceLocation getBeginLoc() const LLVM_READONLY
SourceLocation getEndLoc() const
Get the end source location.
SourceLocation getBeginLoc() const
Get the begin source location.
A container of type source information.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
QualType getType() const
Return the type wrapped by this type source info.
const T * castAs() const
Member-template castAs<specific type>.
AutoType * getContainedAutoType() const
Get the AutoType whose type will be deduced for a variable with an initializer of this type.
Represents a variable declaration or definition.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
VarDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
Declaration of a variable template.
VarTemplateDecl * getDefinition()
void AddPartialSpecialization(VarTemplatePartialSpecializationDecl *D, void *InsertPos)
Insert the specified partial specialization knowing that it is not already in.
Common * getCommonPtr() const
VarTemplatePartialSpecializationDecl * findPartialSpecialization(ArrayRef< TemplateArgument > Args, TemplateParameterList *TPL, void *&InsertPos)
Return the partial specialization with the provided arguments if it exists, otherwise return the inse...
void LoadLazySpecializations() const
Load any lazily-loaded specializations from the external source.
void AddSpecialization(VarTemplateSpecializationDecl *D, void *InsertPos)
Insert the specified specialization knowing that it is not already in.
VarTemplateDecl * getPreviousDecl()
Retrieve the previous declaration of this variable template, or nullptr if no such declaration exists...
CommonBase * newCommon(ASTContext &C) const override
static VarTemplateDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name, TemplateParameterList *Params, VarDecl *Decl)
Create a variable template node.
llvm::FoldingSetVector< VarTemplatePartialSpecializationDecl > & getPartialSpecializations() const
Retrieve the set of partial specializations of this class template.
llvm::FoldingSetVector< VarTemplateSpecializationDecl > & getSpecializations() const
Retrieve the set of specializations of this variable template.
bool isThisDeclarationADefinition() const
Returns whether this template declaration defines the primary variable pattern.
VarTemplateSpecializationDecl * findSpecialization(ArrayRef< TemplateArgument > Args, void *&InsertPos)
Return the specialization with the provided arguments if it exists, otherwise return the insertion po...
VarTemplatePartialSpecializationDecl * findPartialSpecInstantiatedFromMember(VarTemplatePartialSpecializationDecl *D)
Find a variable template partial specialization which was instantiated from the given member partial ...
static VarTemplateDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Create an empty variable template node.
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Get the template arguments as written.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static VarTemplatePartialSpecializationDecl * Create(ASTContext &Context, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo, StorageClass S, ArrayRef< TemplateArgument > Args, const TemplateArgumentListInfo &ArgInfos)
void Profile(llvm::FoldingSetNodeID &ID) const
static VarTemplatePartialSpecializationDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Represents a variable template specialization, which refers to a variable template with a given set o...
VarTemplateSpecializationDecl(Kind DK, ASTContext &Context, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo, StorageClass S, ArrayRef< TemplateArgument > Args)
void setTemplateArgsInfo(const TemplateArgumentListInfo &ArgsInfo)
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the variable template specialization.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static VarTemplateSpecializationDecl * Create(ASTContext &Context, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo, StorageClass S, ArrayRef< TemplateArgument > Args)
VarTemplateDecl * getSpecializedTemplate() const
Retrieve the template that this specialization specializes.
const ASTTemplateArgumentListInfo * getTemplateArgsInfo() const
bool isExplicitSpecialization() const
static VarTemplateSpecializationDecl * CreateDeserialized(ASTContext &C, unsigned ID)
void getNameForDiagnostic(raw_ostream &OS, const PrintingPolicy &Policy, bool Qualified) const override
Appends a human-readable name for this declaration into the given stream.
The JSON file list parser is used to communicate input to InstallAPI.
StorageClass
Storage classes.
void * allocateDefaultArgStorageChain(const ASTContext &C)
@ Result
The result type of a method or function.
TemplateParameterList * getReplacedTemplateParameterList(Decl *D)
Internal helper used by Subst* nodes to retrieve the parameter list for their AssociatedDecl.
TagTypeKind
The kind of a tag type.
BuiltinTemplateKind
Kinds of BuiltinTemplateDecl.
@ BTK__type_pack_element
This names the __type_pack_element BuiltinTemplateDecl.
@ BTK__make_integer_seq
This names the __make_integer_seq BuiltinTemplateDecl.
std::optional< unsigned > getExpandedPackSize(const NamedDecl *Param)
Check whether the template parameter is a pack expansion, and if so, determine the number of paramete...
const FunctionProtoType * T
void printTemplateArgumentList(raw_ostream &OS, ArrayRef< TemplateArgument > Args, const PrintingPolicy &Policy, const TemplateParameterList *TPL=nullptr)
Print a template argument list, including the '<' and '>' enclosing the template arguments.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
@ TSK_ExplicitSpecialization
This template specialization was declared or defined by an explicit specialization (C++ [temp....
@ TSK_Undeclared
This template specialization was formed from a template-id but has not yet been declared,...
@ Struct
The "struct" keyword introduces the elaborated-type-specifier.
@ Typename
The "typename" keyword precedes the qualified type name, e.g., typename T::type.
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
static const ASTTemplateArgumentListInfo * Create(const ASTContext &C, const TemplateArgumentListInfo &List)
Data that is common to all of the declarations of a given class template.
llvm::FoldingSetVector< ClassTemplatePartialSpecializationDecl > PartialSpecializations
The class template partial specializations for this class template.
llvm::FoldingSetVector< ClassTemplateSpecializationDecl > Specializations
The class template specializations for this class template, including explicit specializations and in...
QualType InjectedClassNameType
The injected-class-name type for this class template.
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
Data that is common to all of the declarations of a given function template.
llvm::FoldingSetVector< FunctionTemplateSpecializationInfo > Specializations
The function template specializations for this function template, including explicit specializations ...
Describes how types, statements, expressions, and declarations should be printed.
unsigned AlwaysIncludeTypeForTemplateArgument
Whether to use type suffixes (eg: 1U) on integral non-type template parameters.
uint32_t * LazySpecializations
If non-null, points to an array of specializations (including partial specializations) known only by ...
Data that is common to all of the declarations of a given variable template.
llvm::FoldingSetVector< VarTemplatePartialSpecializationDecl > PartialSpecializations
The variable template partial specializations for this variable template.
llvm::FoldingSetVector< VarTemplateSpecializationDecl > Specializations
The variable template specializations for this variable template, including explicit specializations ...