24 assert(S &&
"Expecting non-null pointer.");
25 S->ProcessODRHash(ID, *
this);
29 assert(II &&
"Expecting non-null pointer.");
39 AddDeclarationNameInfoImpl(NameInfo);
49 auto Result = DeclNameMap.insert(std::make_pair(Name, DeclNameMap.size()));
50 ID.AddInteger(
Result.first->second);
61 auto Kind = Name.getNameKind();
74 unsigned NumArgs = S.getNumArgs();
75 ID.AddInteger(NumArgs);
78 unsigned SlotsToCheck = NumArgs > 0 ? NumArgs : 1;
79 for (
unsigned i = 0; i < SlotsToCheck; ++i) {
97 ID.AddInteger(Name.getCXXOverloadedOperator());
105 auto *
Template = Name.getCXXDeductionGuideTemplate();
116 ID.AddInteger(llvm::to_underlying(Kind));
140 ID.AddInteger(IO.getOperator());
144 auto Kind = Name.getKind();
149 AddDecl(Name.getAsTemplateDecl());
170 llvm_unreachable(
"Unexpected DeducedTemplate");
175 const auto Kind = TA.
getKind();
180 llvm_unreachable(
"Expected valid TemplateArgument");
188 ID.AddPointer(
nullptr);
217 assert(TPL &&
"Expecting non-null pointer.");
219 ID.AddInteger(TPL->
size());
220 for (
auto *ND : TPL->
asArray()) {
236 const unsigned size = Bools.size();
237 const unsigned remainder = size % unsigned_bits;
238 const unsigned loops = size / unsigned_bits;
239 auto I = Bools.rbegin();
241 for (
unsigned i = 0; i <
remainder; ++i) {
246 ID.AddInteger(value);
248 for (
unsigned i = 0; i < loops; ++i) {
250 for (
unsigned j = 0; j < unsigned_bits; ++j) {
255 ID.AddInteger(value);
258 assert(I == Bools.rend());
260 return ID.computeStableHash();
268 llvm::FoldingSetNodeID &
ID;
272 ODRDeclVisitor(llvm::FoldingSetNodeID &
ID,
ODRHash &Hash)
273 :
ID(
ID), Hash(Hash) {}
275 void AddStmt(
const Stmt *S) {
293 void AddDecl(
const Decl *
D) {
304 void Visit(
const Decl *
D) {
310 if (
const auto *FD = dyn_cast<FunctionDecl>(
D))
314 Inherited::VisitNamedDecl(
D);
318 if (
auto *DD = dyn_cast<DeclaratorDecl>(
D); DD && DD->getTypeSourceInfo())
319 AddQualType(DD->getTypeSourceInfo()->getType());
321 Inherited::VisitValueDecl(
D);
324 void VisitVarDecl(
const VarDecl *
D) {
327 const bool HasInit =
D->hasInit();
330 AddStmt(
D->getInit());
332 Inherited::VisitVarDecl(
D);
337 Inherited::VisitParmVarDecl(
D);
342 Inherited::VisitAccessSpecDecl(
D);
346 AddStmt(
D->getAssertExpr());
347 AddStmt(
D->getMessage());
349 Inherited::VisitStaticAssertDecl(
D);
353 const bool IsBitfield =
D->isBitField();
357 AddStmt(
D->getBitWidth());
361 AddStmt(
D->getInClassInitializer());
363 Inherited::VisitFieldDecl(
D);
367 ID.AddInteger(
D->getCanonicalAccessControl());
368 Inherited::VisitObjCIvarDecl(
D);
372 ID.AddInteger(
D->getPropertyAttributes());
373 ID.AddInteger(
D->getPropertyImplementation());
374 AddQualType(
D->getTypeSourceInfo()->getType());
377 Inherited::VisitObjCPropertyDecl(
D);
382 ID.AddInteger(
D->getODRHash());
384 Inherited::VisitFunctionDecl(
D);
390 Inherited::VisitCXXMethodDecl(
D);
394 ID.AddInteger(
Method->getDeclKind());
403 ID.AddInteger(llvm::to_underlying(
Method->getImplementationControl()));
404 ID.AddInteger(
Method->getMethodFamily());
408 ID.AddInteger(llvm::to_underlying(
Cmd->getParameterKind()));
413 ID.AddInteger(llvm::to_underlying(Self->getParameterKind()));
417 if (
Method->getReturnTypeSourceInfo())
418 AddQualType(
Method->getReturnTypeSourceInfo()->getType());
420 ID.AddInteger(
Method->param_size());
421 for (
auto Param :
Method->parameters())
425 const bool IsDefinition =
Method->isThisDeclarationADefinition();
438 Decls.push_back(SubDecl);
440 ID.AddInteger(Decls.size());
441 for (
auto SubDecl : Decls)
448 Inherited::VisitObjCMethodDecl(Method);
452 AddQualType(
D->getUnderlyingType());
454 Inherited::VisitTypedefNameDecl(
D);
458 Inherited::VisitTypedefDecl(
D);
462 Inherited::VisitTypeAliasDecl(
D);
471 AddDecl(
D->getFriendDecl());
478 const bool hasDefaultArgument =
479 D->hasDefaultArgument() && !
D->defaultArgumentWasInherited();
481 if (hasDefaultArgument) {
482 AddTemplateArgument(
D->getDefaultArgument().getArgument());
491 Inherited::VisitTemplateTypeParmDecl(
D);
496 const bool hasDefaultArgument =
497 D->hasDefaultArgument() && !
D->defaultArgumentWasInherited();
499 if (hasDefaultArgument) {
500 AddTemplateArgument(
D->getDefaultArgument().getArgument());
504 Inherited::VisitNonTypeTemplateParmDecl(
D);
509 const bool hasDefaultArgument =
510 D->hasDefaultArgument() && !
D->defaultArgumentWasInherited();
512 if (hasDefaultArgument) {
513 AddTemplateArgument(
D->getDefaultArgument().getArgument());
517 Inherited::VisitTemplateTemplateParmDecl(
D);
523 Inherited::VisitTemplateDecl(
D);
528 Inherited::VisitRedeclarableTemplateDecl(
D);
532 AddDecl(
D->getTemplatedDecl());
533 ID.AddInteger(
D->getTemplatedDecl()->getODRHash());
534 Inherited::VisitFunctionTemplateDecl(
D);
538 AddStmt(
D->getInitExpr());
539 Inherited::VisitEnumConstantDecl(
D);
553 case Decl::AccessSpec:
554 case Decl::CXXConstructor:
555 case Decl::CXXDestructor:
556 case Decl::CXXMethod:
557 case Decl::EnumConstant:
560 case Decl::FunctionTemplate:
561 case Decl::StaticAssert:
562 case Decl::TypeAlias:
565 case Decl::ObjCMethod:
567 case Decl::ObjCProperty:
573 assert(
D &&
"Expecting non-null pointer.");
575 ODRDeclVisitor(ID, *
this).Visit(
D);
580 "Expected non-null record to be a definition.");
584 if (isa<ClassTemplateSpecializationDecl>(DC)) {
597 Decls.push_back(SubDecl);
598 if (
auto *
Function = dyn_cast<FunctionDecl>(SubDecl)) {
605 ID.AddInteger(Decls.size());
606 for (
auto SubDecl : Decls) {
616 ID.AddInteger(
Record->getNumBases());
617 auto Bases =
Record->bases();
618 for (
const auto &
Base : Bases) {
620 ID.AddInteger(
Base.isVirtual());
621 ID.AddInteger(
Base.getAccessSpecifierAsWritten());
626 assert(!isa<CXXRecordDecl>(
Record) &&
627 "For CXXRecordDecl should call AddCXXRecordDecl.");
635 Decls.push_back(SubDecl);
638 ID.AddInteger(Decls.size());
639 for (
const Decl *SubDecl : Decls)
649 ID.AddInteger(SuperClass->getODRHash());
663 Decls.push_back(SubDecl);
665 ID.AddInteger(Decls.size());
666 for (
auto *SubDecl : Decls)
672 assert(
Function &&
"Expecting non-null pointer.");
677 if (isa<ClassTemplateSpecializationDecl>(DC))
return;
678 if (
auto *F = dyn_cast<FunctionDecl>(DC)) {
679 if (F->isFunctionTemplateSpecialization()) {
680 if (!isa<CXXMethodDecl>(DC))
return;
684 if (F->getDependentSpecializationInfo())
693 ID.AddInteger(
Function->getDeclKind());
695 const auto *SpecializationArgs =
Function->getTemplateSpecializationArgs();
697 if (SpecializationArgs) {
698 ID.AddInteger(SpecializationArgs->size());
709 ID.AddInteger(
Function->getStorageClass());
720 ID.AddString(DeletedMessage->
getBytes());
726 ID.AddInteger(
Function->param_size());
727 for (
auto *Param :
Function->parameters())
735 const bool HasBody =
Function->isThisDeclarationADefinition() &&
753 Decls.push_back(SubDecl);
757 ID.AddInteger(Decls.size());
758 for (
auto SubDecl : Decls) {
768 if (
Enum->isScoped())
771 if (
Enum->getIntegerTypeSourceInfo())
777 for (
Decl *SubDecl :
Enum->decls()) {
779 assert(isa<EnumConstantDecl>(SubDecl) &&
"Unexpected Decl");
780 Decls.push_back(SubDecl);
784 ID.AddInteger(Decls.size());
785 for (
auto SubDecl : Decls) {
795 ID.AddInteger(
P->getReferencedProtocols().size());
804 for (
Decl *SubDecl :
P->decls()) {
806 Decls.push_back(SubDecl);
810 ID.AddInteger(Decls.size());
811 for (
auto *SubDecl : Decls) {
817 assert(
D &&
"Expecting non-null pointer.");
827 if (
auto *FD = dyn_cast<FunctionDecl>(
D))
836 if (
auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(
D))
837 Args = CTSD->getTemplateArgs().asArray();
838 else if (
auto *VTSD = dyn_cast<VarTemplateSpecializationDecl>(
D))
839 Args = VTSD->getTemplateArgs().asArray();
840 else if (
auto *FD = dyn_cast<FunctionDecl>(
D))
841 if (FD->getTemplateSpecializationArgs())
842 Args = FD->getTemplateSpecializationArgs()->asArray();
844 for (
auto &TA : Args)
851class ODRTypeVisitor :
public TypeVisitor<ODRTypeVisitor> {
853 llvm::FoldingSetNodeID &
ID;
857 ODRTypeVisitor(llvm::FoldingSetNodeID &
ID,
ODRHash &Hash)
858 :
ID(
ID), Hash(Hash) {}
860 void AddStmt(
Stmt *S) {
867 void AddDecl(
const Decl *
D) {
878 void AddType(
const Type *
T) {
901 bool handleTypedef(
const Type *
T) {
902 const auto *TypedefT = dyn_cast<TypedefType>(
T);
906 QualType UnderlyingType = TypedefT->desugar();
911 const auto *TagT = dyn_cast<TagType>(UnderlyingType);
912 if (!TagT || TagT->getQualifier())
915 if (TypedefT->getDecl()->getIdentifier() !=
916 TagT->getOriginalDecl()->getIdentifier())
919 ID.AddInteger(TagT->getTypeClass());
920 VisitTagType(TagT, TypedefT);
924 void Visit(
const Type *
T) {
925 if (handleTypedef(
T))
931 void VisitType(
const Type *
T) {}
934 AddQualType(
T->getOriginalType());
942 VisitAdjustedType(
T);
946 AddQualType(
T->getElementType());
947 ID.AddInteger(llvm::to_underlying(
T->getSizeModifier()));
948 VisitQualifiers(
T->getIndexTypeQualifiers());
957 VisitConstantArrayType(
T);
961 AddStmt(
T->getSizeExpr());
970 AddStmt(
T->getSizeExpr());
975 ID.AddInteger(
T->getAttrKind());
976 AddQualType(
T->getModifiedType());
987 ID.AddInteger(
T->getKind());
992 AddQualType(
T->getElementType());
997 Hash.
AddStmt(
T->getUnderlyingExpr());
1002 VisitDecltypeType(
T);
1006 AddQualType(
T->getDeducedType());
1011 ID.AddInteger((
unsigned)
T->getKeyword());
1012 ID.AddInteger(
T->isConstrained());
1013 if (
T->isConstrained()) {
1014 AddDecl(
T->getTypeConstraintConcept());
1015 ID.AddInteger(
T->getTypeConstraintArguments().size());
1016 for (
const auto &TA :
T->getTypeConstraintArguments())
1019 VisitDeducedType(
T);
1022 void VisitDeducedTemplateSpecializationType(
1025 VisitDeducedType(
T);
1030 AddStmt(
T->getAddrSpaceExpr());
1035 AddQualType(
T->getElementType());
1036 AddStmt(
T->getSizeExpr());
1050 VisitFunctionType(
T);
1056 AddQualType(ParamType);
1058 VisitFunctionType(
T);
1062 AddDecl(
T->getOriginalDecl()->getDefinitionOrSelf());
1068 AddNestedNameSpecifier(
T->getQualifier());
1078 AddDecl(
T->getInterface());
1080 auto TypeArgs =
T->getTypeArgsAsWritten();
1081 ID.AddInteger(TypeArgs.size());
1082 for (
auto Arg : TypeArgs) {
1086 auto Protocols =
T->getProtocols();
1087 ID.AddInteger(Protocols.size());
1088 for (
auto *Protocol : Protocols) {
1099 VisitObjCObjectType(
T);
1103 AddDecl(
T->getDecl());
1104 auto Protocols =
T->getProtocols();
1105 ID.AddInteger(Protocols.size());
1106 for (
auto *Protocol : Protocols) {
1114 AddQualType(
T->getPattern());
1119 AddQualType(
T->getInnerType());
1124 AddQualType(
T->getElementType());
1135 AddQualType(
T->getPointeeTypeAsWritten());
1140 VisitReferenceType(
T);
1144 VisitReferenceType(
T);
1149 AddDecl(
T->getAssociatedDecl());
1155 AddDecl(
T->getAssociatedDecl());
1156 AddQualType(
T->getReplacementType());
1160 void VisitTagType(
const TagType *
T,
1161 const TypedefType *ElaboratedOverride =
nullptr) {
1162 ID.AddInteger(llvm::to_underlying(
1163 ElaboratedOverride ? ElaboratedTypeKeyword::None :
T->getKeyword()));
1164 AddNestedNameSpecifier(ElaboratedOverride
1165 ? ElaboratedOverride->getQualifier()
1166 :
T->getQualifier());
1167 AddDecl(
T->getOriginalDecl()->getDefinitionOrSelf());
1172 ID.AddInteger(
T->template_arguments().size());
1173 for (
const auto &TA :
T->template_arguments()) {
1181 ID.AddInteger(
T->getDepth());
1182 ID.AddInteger(
T->getIndex());
1184 AddDecl(
T->getDecl());
1188 ID.AddInteger(llvm::to_underlying(
T->getKeyword()));
1189 AddNestedNameSpecifier(
T->getQualifier());
1190 AddDecl(
T->getDecl());
1195 AddStmt(
T->getUnderlyingExpr());
1201 AddQualType(
T->getUnmodifiedType());
1206 ID.AddInteger(llvm::to_underlying(
T->getKeyword()));
1211 AddNestedNameSpecifier(
T->getQualifier());
1212 AddIdentifierInfo(
T->getIdentifier());
1213 VisitTypeWithKeyword(
T);
1216 void VisitDependentTemplateSpecializationType(
1219 ID.AddInteger(
T->template_arguments().size());
1220 for (
const auto &TA :
T->template_arguments()) {
1223 VisitTypeWithKeyword(
T);
1227 AddQualType(
T->getUnderlyingType());
1228 AddQualType(
T->getBaseType());
1233 AddDecl(
T->getDecl());
1238 AddQualType(
T->getElementType());
1239 ID.AddInteger(
T->getNumElements());
1240 ID.AddInteger(llvm::to_underlying(
T->getVectorKind()));
1251 assert(
T &&
"Expecting non-null pointer.");
1252 ODRTypeVisitor(ID, *
this).Visit(
T);
1265 Bools.push_back(
Value);
1279 ID.AddInteger(
Value.getLValueOffset().getQuantity());
1285 ID.AddInteger(
Value.getLValueOffset().getQuantity());
1287 bool OnePastTheEnd =
Value.isLValueOnePastTheEnd();
1288 if (
Value.hasLValuePath()) {
1292 if (
const auto *CAT = dyn_cast<ConstantArrayType>(AT))
1293 OnePastTheEnd |= CAT->getSize() ==
E.getAsArrayIndex();
1294 TypeSoFar = AT->getElementType();
1296 const Decl *
D =
E.getAsBaseOrMember().getPointer();
1297 if (
const auto *FD = dyn_cast<FieldDecl>(
D)) {
1298 if (FD->getParent()->isUnion())
1299 ID.AddInteger(FD->getFieldIndex());
1300 TypeSoFar = FD->getType();
1309 if (
Value.isNullPointer())
1313 if (
Value.hasLValuePath())
llvm::MachO::Record Record
This file contains the declaration of the ODRHash class, which calculates a hash based on AST nodes,...
A non-discriminated union of a base, field, or array index.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
CharUnits getMemberPointerPathAdjustment(const APValue &MP) const
Find the 'this' offset for the member path in a pointer-to-member APValue.
CanQualType getCanonicalTagType(const TagDecl *TD) const
Represents an access specifier followed by colon ':'.
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons.
Represents a constant array type that does not decay to a pointer when used as a function parameter.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
An attributed type is a type to which a type attribute has been applied.
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
This class is used for builtin types like 'int'.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
QuantityType getQuantity() const
getQuantity - Get the raw integer representation of this quantity.
Declaration of a class template.
Complex values, per C99 6.2.5p11.
A simple visitor class that helps create declaration visitors.
Represents the canonical version of C arrays with a specified constant size.
Represents a pointer type decayed from an array or function type.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
bool isFileContext() const
DeclContext * getLexicalParent()
getLexicalParent - Returns the containing lexical DeclContext.
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
Decl - This represents one declaration (or definition), e.g.
ASTContext & getASTContext() const LLVM_READONLY
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
bool isParameterPack() const
Whether this declaration is a parameter pack.
DeclContext * getDeclContext()
AccessSpecifier getAccess() const
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
The name of a declaration.
@ CXXConversionFunctionName
Represents the type decltype(expr) (C++11).
Represents a C++17 deduced template specialization type.
Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 a...
Represents an extended address space qualifier where the input address space value is dependent.
Internal representation of canonical, dependent decltype(expr) types.
Represents a qualified type name for which the type name is dependent.
Represents an array type in C++ whose size is a value-dependent expression.
Represents an extended vector type where either the type or size is dependent.
Represents a template specialization type whose template cannot be resolved, e.g.
Represents a dependent template name that cannot be resolved prior to template instantiation.
An instance of this object exists for each enum constant that is defined.
ExtVectorType - Extended vector type.
Represents a member of a struct/union/class.
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Represents a function declaration or definition.
Represents a K&R-style 'int foo()' function, which has no information available about its arguments.
Represents a prototype with parameter type info, e.g.
unsigned getNumParams() const
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx)
ArrayRef< QualType > getParamTypes() const
Declaration of a template function.
void Profile(llvm::FoldingSetNodeID &ID) const
FunctionType - C99 6.7.5.3 - Function Declarators.
ExtInfo getExtInfo() const
QualType getReturnType() const
One of these records is kept for each identifier that is lexed.
StringRef getName() const
Return the actual identifier string.
Represents a C array with an unspecified size.
The injected class name of a C++ class template or class template partial specialization.
An lvalue reference type, per C++11 [dcl.ref].
A pointer to member type per C++ 8.3.3 - Pointers to members.
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.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
NamespaceAndPrefix getAsNamespaceAndPrefix() const
const Type * getAsType() const
@ MicrosoftSuper
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
@ Global
The global specifier '::'. There is no stored value.
@ Type
A type, stored as a Type*.
@ Namespace
A namespace-like entity, stored as a NamespaceBaseDecl*.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
void AddDecl(const Decl *D)
void AddStmt(const Stmt *S)
void AddStructuralValue(const APValue &)
void AddDeclarationNameInfo(DeclarationNameInfo NameInfo, bool TreatAsDecl=false)
void AddCXXRecordDecl(const CXXRecordDecl *Record)
void AddDeclarationName(DeclarationName Name, bool TreatAsDecl=false)
void AddIdentifierInfo(const IdentifierInfo *II)
void AddObjCProtocolDecl(const ObjCProtocolDecl *P)
void AddObjCInterfaceDecl(const ObjCInterfaceDecl *Record)
void AddType(const Type *T)
void AddEnumDecl(const EnumDecl *Enum)
void AddDependentTemplateName(const DependentTemplateStorage &Name)
void AddFunctionDecl(const FunctionDecl *Function, bool SkipBody=false)
void AddBoolean(bool value)
void AddTemplateName(TemplateName Name)
void AddRecordDecl(const RecordDecl *Record)
void AddSubDecl(const Decl *D)
void AddNestedNameSpecifier(NestedNameSpecifier NNS)
void AddQualType(QualType T)
void AddTemplateParameterList(const TemplateParameterList *TPL)
void AddTemplateArgument(TemplateArgument TA)
static bool isSubDeclToBeProcessed(const Decl *D, const DeclContext *Parent)
Represents an ObjC class declaration.
protocol_range protocols() const
const ObjCProtocolList & getReferencedProtocols() const
ObjCInterfaceDecl * getSuperClass() const
Interfaces are the core concept in Objective-C for object oriented design.
ObjCIvarDecl - Represents an ObjC instance variable.
ObjCMethodDecl - Represents an instance or class method declaration.
Represents a pointer to an Objective C object.
Represents a class type in Objective C.
Represents one property declaration in an Objective-C interface.
Represents an Objective-C protocol declaration.
Represents a type parameter type in Objective C.
Represents a pack expansion of types.
Sugar for parentheses used when specifying types.
Represents a parameter to a function.
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
Represents a template name as written in source code.
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
TemplateName getUnderlyingTemplate() const
Return the underlying template name.
bool hasTemplateKeyword() const
Whether the template name was prefixed by the "template" keyword.
The collection of all-type qualifiers we support.
uint64_t getAsOpaqueValue() const
An rvalue reference type, per C++11 [dcl.ref].
Represents a struct/union/class.
Declaration of a redeclarable template.
Base for LValueReferenceType and RValueReferenceType.
Smart pointer class that efficiently represents Objective-C method names.
Represents a C++11 static_assert declaration.
Stmt - This represents one statement.
StringLiteral - This represents a string literal expression, e.g.
StringRef getBytes() const
Allow access to clients that need the byte representation, such as ASTWriterStmt::VisitStringLiteral(...
Represents the result of substituting a set of types for a template type parameter pack.
Represents the result of substituting a type for a template type parameter.
Represents a template argument.
QualType getStructuralValueType() const
Get the type of a StructuralValue.
Expr * getAsExpr() const
Retrieve the template argument as an expression.
QualType getAsType() const
Retrieve the type for a type template argument.
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
unsigned pack_size() const
The number of template arguments in the given template argument pack.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
@ Declaration
The template argument is a declaration that was provided for a pointer, reference,...
@ Template
The template argument is a template name that was provided for a template template parameter.
@ StructuralValue
The template argument is a non-type template argument that can't be represented by the special-case D...
@ Pack
The template argument is actually a parameter pack.
@ TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
@ NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
@ Type
The template argument is a type.
@ Null
Represents an empty template argument, e.g., one that has not been deduced.
@ Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
@ Expression
The template argument is an expression, and we've not resolved it to one of the other forms yet,...
ArgKind getKind() const
Return the kind of stored template argument.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
const APValue & getAsStructuralValue() const
Get the value of a StructuralValue.
The base class of all kinds of template declarations (e.g., class, function, etc.).
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Represents a C++ template name within the type system.
@ UsingTemplate
A template name that refers to a template declaration found through a specific using shadow declarati...
@ OverloadedTemplate
A set of overloaded template declarations.
@ Template
A single template declaration.
@ DependentTemplate
A dependent template name that has not been resolved to a template (or set of templates).
@ SubstTemplateTemplateParm
A template template parameter that has been substituted for some other template name.
@ SubstTemplateTemplateParmPack
A template template parameter pack that has been substituted for a template template argument pack,...
@ DeducedTemplate
A template name that refers to another TemplateName with deduced default arguments.
@ QualifiedTemplate
A qualified template name, where the qualification is kept to describe the source code as written.
@ AssumedTemplate
An unqualified-id that has been assumed to name a function template that will be found by ADL.
Stores a list of template parameters for a TemplateDecl and its derived classes.
ArrayRef< NamedDecl * > asArray()
Represents a type template specialization; the template must be a class template, a type alias templa...
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Declaration of a template type parameter.
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Models the abbreviated syntax to constrain a template type parameter: template <convertible_to<string...
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
Represents a typeof (or typeof) expression (a C23 feature and GCC extension) or a typeof_unqual expre...
Represents typeof(type), a C23 feature and GCC extension, or `typeof_unqual(type),...
A container of type source information.
QualType getType() const
Return the type wrapped by this type source info.
A helper class for Type nodes having an ElaboratedTypeKeyword.
The base class of the type hierarchy.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
const ArrayType * getAsArrayTypeUnsafe() const
A variant of getAs<> for array types which silently discards qualifiers from the outermost type.
TypeClass getTypeClass() const
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Base class for declarations which introduce a typedef-name.
Represents the dependent type named by a dependently-scoped typename using declaration,...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
Represents a C array with a specified size that is not an integer-constant-expression.
Represents a GCC generic vector type.
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
@ Template
We are parsing a template declaration.
const FunctionProtoType * T
@ Enum
The "enum" keyword introduces the elaborated-type-specifier.
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
DeclarationName getName() const
getName - Returns the embedded declaration name.
TypeSourceInfo * getNamedTypeInfo() const
getNamedTypeInfo - Returns the source type info associated to the name.
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
const Type * Ty
The locally-unqualified type.
Qualifiers Quals
The local qualifiers.
#define remainder(__x, __y)