25 assert(S &&
"Expecting non-null pointer.");
26 S->ProcessODRHash(ID, *
this);
30 assert(II &&
"Expecting non-null pointer.");
39 AddDeclarationNameImpl(Name);
48 auto Result = DeclNameMap.insert(std::make_pair(Name, DeclNameMap.size()));
49 ID.AddInteger(
Result.first->second);
60 auto Kind = Name.getNameKind();
73 unsigned NumArgs = S.getNumArgs();
74 ID.AddInteger(NumArgs);
77 unsigned SlotsToCheck = NumArgs > 0 ? NumArgs : 1;
78 for (
unsigned i = 0; i < SlotsToCheck; ++i) {
92 ID.AddInteger(Name.getCXXOverloadedOperator());
103 auto *Template = Name.getCXXDeductionGuideTemplate();
113 assert(NNS &&
"Expecting non-null pointer.");
142 auto Kind = Name.getKind();
147 AddDecl(Name.getAsTemplateDecl());
162 const auto Kind = TA.
getKind();
167 llvm_unreachable(
"Expected valid TemplateArgument");
175 ID.AddPointer(
nullptr);
200 assert(TPL &&
"Expecting non-null pointer.");
202 ID.AddInteger(TPL->
size());
203 for (
auto *ND : TPL->
asArray()) {
219 const unsigned size = Bools.size();
220 const unsigned remainder = size % unsigned_bits;
221 const unsigned loops = size / unsigned_bits;
222 auto I = Bools.rbegin();
224 for (
unsigned i = 0; i <
remainder; ++i) {
229 ID.AddInteger(value);
231 for (
unsigned i = 0; i < loops; ++i) {
233 for (
unsigned j = 0; j < unsigned_bits; ++j) {
238 ID.AddInteger(value);
241 assert(I == Bools.rend());
243 return ID.ComputeHash();
251 llvm::FoldingSetNodeID &
ID;
255 ODRDeclVisitor(llvm::FoldingSetNodeID &
ID,
ODRHash &Hash)
256 :
ID(
ID), Hash(Hash) {}
258 void AddStmt(
const Stmt *S) {
276 void AddDecl(
const Decl *D) {
287 void Visit(
const Decl *D) {
292 void VisitNamedDecl(
const NamedDecl *D) {
294 Inherited::VisitNamedDecl(D);
297 void VisitValueDecl(
const ValueDecl *D) {
298 if (
auto *DD = dyn_cast<DeclaratorDecl>(D); DD && DD->getTypeSourceInfo())
299 AddQualType(DD->getTypeSourceInfo()->getType());
301 Inherited::VisitValueDecl(D);
304 void VisitVarDecl(
const VarDecl *D) {
307 const bool HasInit = D->
hasInit();
312 Inherited::VisitVarDecl(D);
317 Inherited::VisitParmVarDecl(D);
322 Inherited::VisitAccessSpecDecl(D);
329 Inherited::VisitStaticAssertDecl(D);
332 void VisitFieldDecl(
const FieldDecl *D) {
343 Inherited::VisitFieldDecl(D);
348 Inherited::VisitObjCIvarDecl(D);
357 Inherited::VisitObjCPropertyDecl(D);
364 Inherited::VisitFunctionDecl(D);
370 Inherited::VisitCXXMethodDecl(D);
388 ID.AddInteger(
Cmd->getParameterKind());
418 Decls.push_back(SubDecl);
420 ID.AddInteger(Decls.size());
421 for (
auto SubDecl : Decls)
428 Inherited::VisitObjCMethodDecl(Method);
434 Inherited::VisitTypedefNameDecl(D);
438 Inherited::VisitTypedefDecl(D);
442 Inherited::VisitTypeAliasDecl(D);
457 const bool hasDefaultArgument =
460 if (hasDefaultArgument) {
470 Inherited::VisitTemplateTypeParmDecl(D);
475 const bool hasDefaultArgument =
478 if (hasDefaultArgument) {
483 Inherited::VisitNonTypeTemplateParmDecl(D);
488 const bool hasDefaultArgument =
491 if (hasDefaultArgument) {
496 Inherited::VisitTemplateTemplateParmDecl(D);
502 Inherited::VisitTemplateDecl(D);
507 Inherited::VisitRedeclarableTemplateDecl(D);
513 Inherited::VisitFunctionTemplateDecl(D);
518 Inherited::VisitEnumConstantDecl(D);
532 case Decl::AccessSpec:
533 case Decl::CXXConstructor:
534 case Decl::CXXDestructor:
535 case Decl::CXXMethod:
536 case Decl::EnumConstant:
539 case Decl::FunctionTemplate:
540 case Decl::StaticAssert:
541 case Decl::TypeAlias:
544 case Decl::ObjCMethod:
546 case Decl::ObjCProperty:
552 assert(D &&
"Expecting non-null pointer.");
554 ODRDeclVisitor(ID, *
this).Visit(D);
558 assert(Record && Record->hasDefinition() &&
559 "Expected non-null record to be a definition.");
563 if (isa<ClassTemplateSpecializationDecl>(DC)) {
574 for (
Decl *SubDecl : Record->decls()) {
576 Decls.push_back(SubDecl);
577 if (
auto *Function = dyn_cast<FunctionDecl>(SubDecl)) {
579 Function->getODRHash();
584 ID.AddInteger(Decls.size());
585 for (
auto SubDecl : Decls) {
595 ID.AddInteger(Record->getNumBases());
596 auto Bases = Record->bases();
597 for (
const auto &
Base : Bases) {
599 ID.AddInteger(
Base.isVirtual());
600 ID.AddInteger(
Base.getAccessSpecifierAsWritten());
605 assert(!isa<CXXRecordDecl>(Record) &&
606 "For CXXRecordDecl should call AddCXXRecordDecl.");
612 for (
Decl *SubDecl : Record->decls()) {
614 Decls.push_back(SubDecl);
617 ID.AddInteger(Decls.size());
618 for (
const Decl *SubDecl : Decls)
628 ID.AddInteger(SuperClass->getODRHash());
642 Decls.push_back(SubDecl);
644 ID.AddInteger(Decls.size());
645 for (
auto *SubDecl : Decls)
651 assert(Function &&
"Expecting non-null pointer.");
656 if (isa<ClassTemplateSpecializationDecl>(DC))
return;
657 if (
auto *F = dyn_cast<FunctionDecl>(DC)) {
658 if (F->isFunctionTemplateSpecialization()) {
659 if (!isa<CXXMethodDecl>(DC))
return;
668 ID.AddInteger(Function->getDeclKind());
670 const auto *SpecializationArgs = Function->getTemplateSpecializationArgs();
672 if (SpecializationArgs) {
673 ID.AddInteger(SpecializationArgs->size());
679 if (
const auto *Method = dyn_cast<CXXMethodDecl>(Function)) {
684 ID.AddInteger(Function->getStorageClass());
689 AddBoolean(Function->isExplicitlyDefaulted());
695 ID.AddInteger(Function->param_size());
696 for (
auto *Param : Function->parameters())
704 const bool HasBody = Function->isThisDeclarationADefinition() &&
705 !Function->isDefaulted() && !Function->isDeleted() &&
706 !Function->isLateTemplateParsed();
712 auto *Body = Function->getBody();
720 for (
Decl *SubDecl : Function->decls()) {
722 Decls.push_back(SubDecl);
726 ID.AddInteger(Decls.size());
727 for (
auto SubDecl : Decls) {
737 if (
Enum->isScoped())
740 if (
Enum->getIntegerTypeSourceInfo())
746 for (
Decl *SubDecl :
Enum->decls()) {
748 assert(isa<EnumConstantDecl>(SubDecl) &&
"Unexpected Decl");
749 Decls.push_back(SubDecl);
753 ID.AddInteger(Decls.size());
754 for (
auto SubDecl : Decls) {
764 ID.AddInteger(
P->getReferencedProtocols().size());
773 for (
Decl *SubDecl :
P->decls()) {
775 Decls.push_back(SubDecl);
779 ID.AddInteger(Decls.size());
780 for (
auto *SubDecl : Decls) {
786 assert(D &&
"Expecting non-null pointer.");
789 const NamedDecl *ND = dyn_cast<NamedDecl>(D);
799 dyn_cast<ClassTemplateSpecializationDecl>(D);
803 ID.AddInteger(List.size());
812class ODRTypeVisitor :
public TypeVisitor<ODRTypeVisitor> {
814 llvm::FoldingSetNodeID &
ID;
818 ODRTypeVisitor(llvm::FoldingSetNodeID &
ID,
ODRHash &Hash)
819 :
ID(
ID), Hash(Hash) {}
821 void AddStmt(
Stmt *S) {
828 void AddDecl(
const Decl *D) {
839 void AddType(
const Type *T) {
866 static const Type *RemoveTypedef(
const Type *T) {
867 const auto *TypedefT = dyn_cast<TypedefType>(T);
879 const auto *ElaboratedT = dyn_cast<ElaboratedType>(UnderlyingType);
884 if (ElaboratedT->getQualifier() !=
nullptr) {
888 QualType NamedType = ElaboratedT->getNamedType();
893 const auto *RecordT = dyn_cast<RecordType>(NamedType);
898 const IdentifierInfo *TypedefII = TypedefT->getDecl()->getIdentifier();
899 const IdentifierInfo *RecordII = RecordT->getDecl()->getIdentifier();
900 if (!TypedefII || !RecordII ||
908 void Visit(
const Type *T) {
909 T = RemoveTypedef(T);
914 void VisitType(
const Type *T) {}
925 VisitAdjustedType(T);
928 void VisitArrayType(
const ArrayType *T) {
981 VisitDecltypeType(T);
989 void VisitAutoType(
const AutoType *T) {
1001 void VisitDeducedTemplateSpecializationType(
1004 VisitDeducedType(T);
1029 VisitFunctionType(T);
1035 AddQualType(ParamType);
1037 VisitFunctionType(T);
1060 ID.AddInteger(TypeArgs.size());
1061 for (
auto Arg : TypeArgs) {
1066 ID.AddInteger(Protocols.size());
1067 for (
auto *Protocol : Protocols) {
1078 VisitObjCObjectType(T);
1084 ID.AddInteger(Protocols.size());
1085 for (
auto *Protocol : Protocols) {
1097 void VisitParenType(
const ParenType *T) {
1102 void VisitPipeType(
const PipeType *T) {
1119 VisitReferenceType(T);
1123 VisitReferenceType(T);
1139 void VisitTagType(
const TagType *T) {
1144 void VisitRecordType(
const RecordType *T) { VisitTagType(T); }
1145 void VisitEnumType(
const EnumType *T) { VisitTagType(T); }
1187 VisitTypeWithKeyword(T);
1190 void VisitDependentTemplateSpecializationType(
1198 VisitTypeWithKeyword(T);
1204 VisitTypeWithKeyword(T);
1232 assert(T &&
"Expecting non-null pointer.");
1233 ODRTypeVisitor(ID, *
this).Visit(T);
1246 Bools.push_back(
Value);
This file contains the declaration of the ODRHash class, which calculates a hash based on AST nodes,...
Represents an access specifier followed by colon ':'.
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons.
QualType getOriginalType() const
Represents an array type, per C99 6.7.5.2 - Array Declarators.
ArraySizeModifier getSizeModifier() const
Qualifiers getIndexTypeQualifiers() const
QualType getElementType() const
An attributed type is a type to which a type attribute has been applied.
QualType getModifiedType() const
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
ArrayRef< TemplateArgument > getTypeConstraintArguments() const
ConceptDecl * getTypeConstraintConcept() const
AutoTypeKeyword getKeyword() const
bool isConstrained() const
QualType getPointeeType() const
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.
Declaration of a class template.
Complex values, per C99 6.2.5p11.
QualType getElementType() const
A simple visitor class that helps create declaration visitors.
Represents the canonical version of C arrays with a specified constant size.
const llvm::APInt & getSize() const
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::Kind getDeclKind() const
Decl - This represents one declaration (or definition), e.g.
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
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).
Expr * getUnderlyingExpr() const
Represents a C++17 deduced template specialization type.
TemplateName getTemplateName() const
Retrieve the name of the template that we are deducing.
Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 a...
QualType getDeducedType() const
Get the type deduced for this placeholder type, or null if it has not been deduced.
Represents an extended address space qualifier where the input address space value is dependent.
Expr * getAddrSpaceExpr() const
QualType getPointeeType() const
Internal representation of canonical, dependent decltype(expr) types.
Represents a qualified type name for which the type name is dependent.
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
const IdentifierInfo * getIdentifier() const
Retrieve the type named by the typename specifier as an identifier.
Represents an array type in C++ whose size is a value-dependent expression.
Expr * getSizeExpr() const
Represents an extended vector type where either the type or size is dependent.
Expr * getSizeExpr() const
QualType getElementType() const
Represents a template specialization type whose template cannot be resolved, e.g.
const IdentifierInfo * getIdentifier() const
ArrayRef< TemplateArgument > template_arguments() const
NestedNameSpecifier * getQualifier() const
Represents a type that was referred to using an elaborated type keyword, e.g., struct S,...
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
QualType getNamedType() const
Retrieve the type named by the qualified-id.
An instance of this object exists for each enum constant that is defined.
const Expr * getInitExpr() const
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
ExtVectorType - Extended vector type.
Represents a member of a struct/union/class.
bool isMutable() const
Determines whether this field is mutable (C++ only).
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
bool isBitField() const
Determines whether this field is a bitfield.
Expr * getBitWidth() const
Returns the expression that represents the bit width, if this field is a bit field.
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Represents a function declaration or definition.
unsigned getODRHash()
Returns ODRHash of the function.
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
ArrayRef< QualType > getParamTypes() const
Declaration of a template function.
FunctionDecl * getTemplatedDecl() const
Get the underlying function declaration of the template.
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.
ImplicitParamKind getParameterKind() const
Returns the implicit parameter kind.
Represents a C array with an unspecified size.
The injected class name of a C++ class template or class template partial specialization.
CXXRecordDecl * getDecl() const
An lvalue reference type, per C++11 [dcl.ref].
A pointer to member type per C++ 8.3.3 - Pointers to members.
QualType getPointeeType() const
const Type * getClass() const
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>::".
SpecifierKind getKind() const
Determine what kind of nested name specifier is stored.
NamespaceAliasDecl * getAsNamespaceAlias() const
Retrieve the namespace alias stored in this nested name specifier.
IdentifierInfo * getAsIdentifier() const
Retrieve the identifier stored in this nested name specifier.
NestedNameSpecifier * getPrefix() const
Return the prefix of this nested name specifier.
@ NamespaceAlias
A namespace alias, stored as a NamespaceAliasDecl*.
@ TypeSpec
A type, stored as a Type*.
@ TypeSpecWithTemplate
A type that was preceded by the 'template' keyword, stored as a Type*.
@ Super
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
@ Identifier
An identifier, stored as an IdentifierInfo*.
@ Global
The global specifier '::'. There is no stored value.
@ Namespace
A namespace, stored as a NamespaceDecl*.
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
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.
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
void AddDecl(const Decl *D)
void AddStmt(const Stmt *S)
void AddCXXRecordDecl(const CXXRecordDecl *Record)
void AddIdentifierInfo(const IdentifierInfo *II)
void AddObjCProtocolDecl(const ObjCProtocolDecl *P)
void AddDeclarationName(DeclarationName Name, bool TreatAsDecl=false)
void AddObjCInterfaceDecl(const ObjCInterfaceDecl *Record)
void AddType(const Type *T)
void AddEnumDecl(const EnumDecl *Enum)
void AddNestedNameSpecifier(const NestedNameSpecifier *NNS)
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 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.
AccessControl getCanonicalAccessControl() const
ObjCMethodDecl - Represents an instance or class method declaration.
ImplicitParamDecl * getSelfDecl() const
bool hasBody() const override
Determine whether this method has a body.
ArrayRef< ParmVarDecl * > parameters() const
unsigned param_size() const
Stmt * getBody() const override
Retrieve the body of this method, if it has one.
TypeSourceInfo * getReturnTypeSourceInfo() const
bool isSynthesizedAccessorStub() const
ImplementationControl getImplementationControl() const
bool isDirectMethod() const
True if the method is tagged as objc_direct.
ImplicitParamDecl * getCmdDecl() const
bool isInstanceMethod() const
bool isThisDeclarationADefinition() const
Returns whether this specific method is a definition.
bool isThisDeclarationADesignatedInitializer() const
Returns true if this specific method declaration is marked with the designated initializer attribute.
ObjCMethodFamily getMethodFamily() const
Determines the family of this method.
bool hasSkippedBody() const
True if the method was a definition but its body was skipped.
Represents a pointer to an Objective C object.
QualType getPointeeType() const
Gets the type pointed to by this ObjC pointer.
Represents a class type in Objective C.
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments of this object type as they were written.
bool isKindOfType() const
Whether this ia a "__kindof" type (semantically).
ObjCInterfaceDecl * getInterface() const
Gets the interface declaration for this object type, if the base type really is an interface.
Represents one property declaration in an Objective-C interface.
TypeSourceInfo * getTypeSourceInfo() const
ObjCPropertyAttribute::Kind getPropertyAttributes() const
PropertyControl getPropertyImplementation() const
Represents an Objective-C protocol declaration.
ArrayRef< ObjCProtocolDecl * > getProtocols() const
Retrieve all of the protocol qualifiers.
Represents a type parameter type in Objective C.
ObjCTypeParamDecl * getDecl() const
Represents a pack expansion of types.
QualType getPattern() const
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated w...
Sugar for parentheses used when specifying types.
QualType getInnerType() const
Represents a parameter to a function.
QualType getElementType() const
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
A (possibly-)qualified type.
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
bool isNull() const
Return true if this QualType doesn't point to a type yet.
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
The collection of all-type qualifiers we support.
unsigned getAsOpaqueValue() const
An rvalue reference type, per C++11 [dcl.ref].
Represents a struct/union/class.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Declaration of a redeclarable template.
bool isMemberSpecialization() const
Determines whether this template was a specialization of a member template.
Base for LValueReferenceType and RValueReferenceType.
QualType getPointeeTypeAsWritten() const
Smart pointer class that efficiently represents Objective-C method names.
Represents a C++11 static_assert declaration.
Stmt - This represents one statement.
Represents the result of substituting a set of types for a template type parameter pack.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
TemplateArgument getArgumentPack() const
Represents the result of substituting a type for a template type parameter.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
QualType getReplacementType() const
Gets the type that was substituted for the template parameter.
TagDecl * getDecl() const
A template argument list.
const TemplateArgument & getArgument() const
Represents a template argument.
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.
@ 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,...
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,...
@ 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...
ArrayRef< TemplateArgument > template_arguments() const
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Declaration of a template type parameter.
QualType getDefaultArgument() const
Retrieve the default argument, if any.
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
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.
bool isParameterPack() const
Returns whether this is a parameter pack.
TemplateTypeParmDecl * getDecl() const
bool isParameterPack() const
unsigned getIndex() const
unsigned getDepth() const
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...
bool isSugared() const
Returns whether this type directly provides sugar.
Expr * getUnderlyingExpr() const
Represents typeof(type), a C23 feature and GCC extension, or `typeof_unqual(type),...
QualType getUnmodifiedType() const
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.
ElaboratedTypeKeyword getKeyword() const
The base class of the type hierarchy.
TypeClass getTypeClass() const
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Base class for declarations which introduce a typedef-name.
QualType getUnderlyingType() const
TypedefNameDecl * getDecl() const
Represents the dependent type named by a dependently-scoped typename using declaration,...
UnresolvedUsingTypenameDecl * getDecl() const
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.
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
bool isStaticLocal() const
Returns true if a variable with function scope is a static local variable.
const Expr * getInit() const
Represents a C array with a specified size that is not an integer-constant-expression.
Expr * getSizeExpr() const
Represents a GCC generic vector type.
unsigned getNumElements() const
VectorKind getVectorKind() const
QualType getElementType() const
@ Specialization
We are substituting template parameters for template arguments in order to form a template specializa...
@ Result
The result type of a method or function.
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)