25#include "llvm/ADT/SmallVector.h"
26#include "llvm/Support/ErrorHandling.h"
27#include "llvm/Support/MathExtras.h"
43class TypeLocRanger :
public TypeLocVisitor<TypeLocRanger, SourceRange> {
45#define ABSTRACT_TYPELOC(CLASS, PARENT)
46#define TYPELOC(CLASS, PARENT) \
47 SourceRange Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
48 return TyLoc.getLocalSourceRange(); \
50#include "clang/AST/TypeLocNodes.def"
57 return TypeLocRanger().Visit(TL);
64#define ABSTRACT_TYPELOC(CLASS, PARENT)
65#define TYPELOC(CLASS, PARENT) \
66 unsigned Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
67 return TyLoc.getLocalDataAlignment(); \
69#include "clang/AST/TypeLocNodes.def"
76 if (
Ty.isNull())
return 1;
77 return TypeAligner().Visit(
TypeLoc(
Ty,
nullptr));
84#define ABSTRACT_TYPELOC(CLASS, PARENT)
85#define TYPELOC(CLASS, PARENT) \
86 unsigned Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
87 return TyLoc.getLocalDataSize(); \
89#include "clang/AST/TypeLocNodes.def"
98 unsigned MaxAlign = 1;
101 MaxAlign = std::max(Align, MaxAlign);
102 Total = llvm::alignTo(Total, Align);
103 Total += TypeSizer().Visit(TyLoc);
106 Total = llvm::alignTo(Total, MaxAlign);
114#define ABSTRACT_TYPELOC(CLASS, PARENT)
115#define TYPELOC(CLASS, PARENT) \
116 TypeLoc Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
117 return TyLoc.getNextTypeLoc(); \
119#include "clang/AST/TypeLocNodes.def"
127 return NextLoc().Visit(TL);
137#define ABSTRACT_TYPELOC(CLASS, PARENT)
138#define TYPELOC(CLASS, PARENT) \
140 CLASS##TypeLoc TLCasted = TL.castAs<CLASS##TypeLoc>(); \
141 TLCasted.initializeLocal(Context, Loc); \
142 TL = TLCasted.getNextTypeLoc(); \
146#include "clang/AST/TypeLocNodes.def"
157 TypeLocCopier(
TypeLoc source) : Source(source) {}
159#define ABSTRACT_TYPELOC(CLASS, PARENT)
160#define TYPELOC(CLASS, PARENT) \
161 void Visit##CLASS##TypeLoc(CLASS##TypeLoc dest) { \
162 dest.copyLocal(Source.castAs<CLASS##TypeLoc>()); \
164#include "clang/AST/TypeLocNodes.def"
188 TypeLocCopier(other).Visit(TL);
205 case FunctionNoProto:
207 case DependentSizedArray:
208 case IncompleteArray:
235 return Last.getLocalSourceRange().getEnd();
238 case DependentSizedArray:
239 case IncompleteArray:
241 case FunctionNoProto:
252 case ObjCObjectPointer:
260 case LValueReference:
261 case RValueReference:
280 static bool isTypeSpec(
TypeLoc _) {
return false; }
282#define ABSTRACT_TYPELOC(CLASS, PARENT)
283#define TYPELOC(CLASS, PARENT) \
284 bool Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
285 return isTypeSpec(TyLoc); \
287#include "clang/AST/TypeLocNodes.def"
300bool TypeSpecTypeLoc::isKind(
const TypeLoc &TL) {
302 return TSTChecker().
Visit(TL);
326 case BuiltinType::Void:
328 case BuiltinType::Bool:
330 case BuiltinType::Char_U:
331 case BuiltinType::Char_S:
333 case BuiltinType::Char8:
335 case BuiltinType::Char16:
337 case BuiltinType::Char32:
339 case BuiltinType::WChar_S:
340 case BuiltinType::WChar_U:
342 case BuiltinType::UChar:
343 case BuiltinType::UShort:
344 case BuiltinType::UInt:
345 case BuiltinType::ULong:
346 case BuiltinType::ULongLong:
347 case BuiltinType::UInt128:
348 case BuiltinType::SChar:
349 case BuiltinType::Short:
350 case BuiltinType::Int:
351 case BuiltinType::Long:
352 case BuiltinType::LongLong:
353 case BuiltinType::Int128:
354 case BuiltinType::Half:
355 case BuiltinType::Float:
356 case BuiltinType::Double:
357 case BuiltinType::LongDouble:
358 case BuiltinType::Float16:
359 case BuiltinType::Float128:
360 case BuiltinType::Ibm128:
361 case BuiltinType::ShortAccum:
362 case BuiltinType::Accum:
363 case BuiltinType::LongAccum:
364 case BuiltinType::UShortAccum:
365 case BuiltinType::UAccum:
366 case BuiltinType::ULongAccum:
367 case BuiltinType::ShortFract:
368 case BuiltinType::Fract:
369 case BuiltinType::LongFract:
370 case BuiltinType::UShortFract:
371 case BuiltinType::UFract:
372 case BuiltinType::ULongFract:
373 case BuiltinType::SatShortAccum:
374 case BuiltinType::SatAccum:
375 case BuiltinType::SatLongAccum:
376 case BuiltinType::SatUShortAccum:
377 case BuiltinType::SatUAccum:
378 case BuiltinType::SatULongAccum:
379 case BuiltinType::SatShortFract:
380 case BuiltinType::SatFract:
381 case BuiltinType::SatLongFract:
382 case BuiltinType::SatUShortFract:
383 case BuiltinType::SatUFract:
384 case BuiltinType::SatULongFract:
385 case BuiltinType::BFloat16:
386 llvm_unreachable(
"Builtin type needs extra local data!");
389 case BuiltinType::NullPtr:
390 case BuiltinType::Overload:
391 case BuiltinType::Dependent:
392 case BuiltinType::UnresolvedTemplate:
393 case BuiltinType::BoundMember:
394 case BuiltinType::UnknownAny:
395 case BuiltinType::ARCUnbridgedCast:
396 case BuiltinType::PseudoObject:
397 case BuiltinType::ObjCId:
398 case BuiltinType::ObjCClass:
399 case BuiltinType::ObjCSel:
400#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
401 case BuiltinType::Id:
402#include "clang/Basic/OpenCLImageTypes.def"
403#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
404 case BuiltinType::Id:
405#include "clang/Basic/OpenCLExtensionTypes.def"
406 case BuiltinType::OCLSampler:
407 case BuiltinType::OCLEvent:
408 case BuiltinType::OCLClkEvent:
409 case BuiltinType::OCLQueue:
410 case BuiltinType::OCLReserveID:
411#define SVE_TYPE(Name, Id, SingletonId) \
412 case BuiltinType::Id:
413#include "clang/Basic/AArch64ACLETypes.def"
414#define PPC_VECTOR_TYPE(Name, Id, Size) \
415 case BuiltinType::Id:
416#include "clang/Basic/PPCTypes.def"
417#define RVV_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
418#include "clang/Basic/RISCVVTypes.def"
419#define WASM_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
420#include "clang/Basic/WebAssemblyReferenceTypes.def"
421#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) case BuiltinType::Id:
422#include "clang/Basic/AMDGPUTypes.def"
423#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) case BuiltinType::Id:
424#include "clang/Basic/HLSLIntangibleTypes.def"
425 case BuiltinType::BuiltinFn:
426 case BuiltinType::IncompleteMatrixIdx:
427 case BuiltinType::ArraySection:
428 case BuiltinType::OMPArrayShaping:
429 case BuiltinType::OMPIterator:
433 llvm_unreachable(
"Invalid BuiltinType Kind!");
438 TL = PTL.getInnerLoc();
443 if (
auto ATL = getAs<AttributedTypeLoc>()) {
444 const Attr *A = ATL.getAttr();
445 if (A && (isa<TypeNullableAttr>(A) || isa<TypeNonNullAttr>(A) ||
446 isa<TypeNullUnspecifiedAttr>(A)))
455 if (
auto qual = getAs<QualifiedTypeLoc>())
462 if (
attr.isQualifier())
return attr;
463 return attr.getModifiedLoc().findExplicitQualifierLoc();
476 case TypeLoc::DependentName:
477 return castAs<DependentNameTypeLoc>().getQualifierLoc();
478 case TypeLoc::TemplateSpecialization:
479 return castAs<TemplateSpecializationTypeLoc>().getQualifierLoc();
480 case TypeLoc::DependentTemplateSpecialization:
481 return castAs<DependentTemplateSpecializationTypeLoc>().getQualifierLoc();
482 case TypeLoc::DeducedTemplateSpecialization:
483 return castAs<DeducedTemplateSpecializationTypeLoc>().getQualifierLoc();
485 case TypeLoc::Record:
486 case TypeLoc::InjectedClassName:
487 return castAs<TagTypeLoc>().getQualifierLoc();
488 case TypeLoc::Typedef:
489 return castAs<TypedefTypeLoc>().getQualifierLoc();
490 case TypeLoc::UnresolvedUsing:
491 return castAs<UnresolvedUsingTypeLoc>().getQualifierLoc();
493 return castAs<UsingTypeLoc>().getQualifierLoc();
501 case TypeLoc::TemplateSpecialization: {
502 auto TL = castAs<TemplateSpecializationTypeLoc>();
505 Loc = TL.getTemplateNameLoc();
508 case TypeLoc::DependentTemplateSpecialization: {
509 auto TL = castAs<DependentTemplateSpecializationTypeLoc>();
512 Loc = TL.getTemplateNameLoc();
515 case TypeLoc::DeducedTemplateSpecialization: {
516 auto TL = castAs<DeducedTemplateSpecializationTypeLoc>();
519 Loc = TL.getTemplateNameLoc();
522 case TypeLoc::DependentName:
523 return castAs<DependentNameTypeLoc>().getNameLoc();
525 case TypeLoc::Record:
526 case TypeLoc::InjectedClassName:
527 return castAs<TagTypeLoc>().getNameLoc();
528 case TypeLoc::Typedef:
529 return castAs<TypedefTypeLoc>().getNameLoc();
530 case TypeLoc::UnresolvedUsing:
531 return castAs<UnresolvedUsingTypeLoc>().getNameLoc();
533 return castAs<UsingTypeLoc>().getNameLoc();
544 return castAs<QualifiedTypeLoc>()
546 .getNonElaboratedBeginLoc();
547 case TypeLoc::TemplateSpecialization: {
548 auto T = castAs<TemplateSpecializationTypeLoc>();
550 return QualifierLoc.getBeginLoc();
551 return T.getTemplateNameLoc();
553 case TypeLoc::DependentTemplateSpecialization: {
554 auto T = castAs<DependentTemplateSpecializationTypeLoc>();
556 return QualifierLoc.getBeginLoc();
557 return T.getTemplateNameLoc();
559 case TypeLoc::DeducedTemplateSpecialization: {
560 auto T = castAs<DeducedTemplateSpecializationTypeLoc>();
562 return QualifierLoc.getBeginLoc();
563 return T.getTemplateNameLoc();
565 case TypeLoc::DependentName: {
566 auto T = castAs<DependentNameTypeLoc>();
568 return QualifierLoc.getBeginLoc();
569 return T.getNameLoc();
572 case TypeLoc::Record:
573 case TypeLoc::InjectedClassName: {
574 auto T = castAs<TagTypeLoc>();
576 return QualifierLoc.getBeginLoc();
577 return T.getNameLoc();
579 case TypeLoc::Typedef: {
580 auto T = castAs<TypedefTypeLoc>();
582 return QualifierLoc.getBeginLoc();
583 return T.getNameLoc();
585 case TypeLoc::UnresolvedUsing: {
586 auto T = castAs<UnresolvedUsingTypeLoc>();
588 return QualifierLoc.getBeginLoc();
589 return T.getNameLoc();
591 case TypeLoc::Using: {
592 auto T = castAs<UsingTypeLoc>();
594 return QualifierLoc.getBeginLoc();
595 return T.getNameLoc();
669 T.setElaboratedKeywordLoc(
T.getTypePtr()->getKeyword() !=
681 Builder.MakeTrivial(Context, Qualifier,
Loc);
682 return Builder.getWithLocInContext(Context);
698 Context,
getTypePtr()->getDependentTemplateName().getQualifier(),
Loc));
704 Context,
getTypePtr()->template_arguments(), getArgInfos(),
Loc);
715 Data.ElaboratedKWLoc = ElaboratedKeywordLoc;
721 getTypePtr()->getTemplateName().getQualifier());
723 if (QualifierLoc && !BeginLoc.
isValid())
726 Data.TemplateKWLoc = TemplateKeywordLoc;
728 BeginLoc = TemplateKeywordLoc;
730 Data.NameLoc = NameLoc;
734 Data.LAngleLoc = LAngleLoc;
743 set(ElaboratedKeywordLoc, QualifierLoc, TemplateKeywordLoc, NameLoc,
746 assert(TAL.
size() == ArgInfos.size());
747 for (
unsigned I = 0, N = TAL.
size(); I != N; ++I)
748 ArgInfos[I] = TAL[I].getLocInfo();
754 auto [Qualifier, HasTemplateKeyword] =
765 Builder.MakeTrivial(Context, Qualifier,
Loc);
766 QualifierLoc = Builder.getWithLocInContext(Context);
770 set(ElaboratedKeywordLoc, QualifierLoc,
780 for (
unsigned i = 0, e = Args.size(); i != e; ++i) {
783 llvm_unreachable(
"Impossible TemplateArgument");
807 Builder.MakeTrivial(Context, DTN->getQualifier(),
Loc);
809 Builder.MakeTrivial(Context, QTN->getQualifier(),
Loc);
812 Context,
Loc, Builder.getWithLocInContext(Context),
Loc,
838 for (
unsigned i = 0; i < size; ++i) {
865 Context,
getTypePtr()->getTemplateName().getQualifier(),
Loc));
871 class GetContainedAutoTypeLocVisitor :
883 return Visit(
T.getUnqualifiedLoc());
887 return Visit(
T.getPointeeLoc());
891 return Visit(
T.getPointeeLoc());
895 return Visit(
T.getPointeeLoc());
899 return Visit(
T.getPointeeLoc());
903 return Visit(
T.getElementLoc());
907 return Visit(
T.getReturnLoc());
911 return Visit(
T.getInnerLoc());
915 return Visit(
T.getModifiedLoc());
919 return Visit(
T.getWrappedLoc());
924 return Visit(
T.getWrappedLoc());
928 return Visit(
T.getInnerLoc());
932 return Visit(
T.getOriginalLoc());
936 return Visit(
T.getPatternLoc());
943 TypeLoc Res = GetContainedAutoTypeLocVisitor().Visit(*
this);
950 if (
const auto TSTL = getAsAdjusted<TemplateSpecializationTypeLoc>())
951 return TSTL.getTemplateKeywordLoc();
952 if (
const auto DTSTL =
953 getAsAdjusted<DependentTemplateSpecializationTypeLoc>())
954 return DTSTL.getTemplateKeywordLoc();
This file provides AST data structures related to concepts.
Defines the clang::ASTContext interface.
static Decl::Kind getKind(const Decl *D)
Defines the C++ template declaration subclasses.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
static ConceptReference * createTrivialConceptReference(ASTContext &Context, SourceLocation Loc, const AutoType *AT)
static const unsigned TypeLocMaxDataAlign
static NestedNameSpecifierLoc initializeQualifier(ASTContext &Context, NestedNameSpecifier Qualifier, SourceLocation Loc)
static void initializeElaboratedKeyword(TL T, SourceLocation Loc)
Defines the clang::TypeLoc interface and its subclasses.
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const
Allocate a TypeSourceInfo where all locations have been initialized to a given location,...
Wrapper for source info for arrays.
Attr - This represents one attribute.
SourceLocation getLocation() const
SourceRange getRange() const
Type source information for an attributed type.
const Attr * getAttr() const
The type attribute.
SourceRange getLocalSourceRange() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void setConceptReference(ConceptReference *CR)
bool isConstrained() const
void setRParenLoc(SourceLocation Loc)
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
ArrayRef< TemplateArgument > getTypeConstraintArguments() const
TemplateDecl * getTypeConstraintConcept() const
Type source information for an btf_tag attributed type.
const BTFTypeTagAttr * getAttr() const
The btf_type_tag attribute.
SourceRange getLocalSourceRange() const
Wrapper for source info for block pointers.
TypeSpecifierType getWrittenTypeSpec() const
bool needsExtraLocalData() const
WrittenBuiltinSpecs & getWrittenBuiltinSpecs()
A reference to a concept and its template args, as it appears in the code.
static ConceptReference * Create(const ASTContext &C, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, TemplateDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten)
const TagType * getTypePtr() const
LocalData * getLocalData() const
Expr * getCountExpr() const
SourceRange getLocalSourceRange() const
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void setTemplateNameLoc(SourceLocation Loc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void setNameLoc(SourceLocation Loc)
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void setTemplateKeywordLoc(SourceLocation Loc)
void setRAngleLoc(SourceLocation Loc)
void setLAngleLoc(SourceLocation Loc)
void setTemplateNameLoc(SourceLocation Loc)
bool hasTrailingReturn() const
Whether this function prototype has a trailing return type.
Wrapper for source info for functions.
Type source information for HLSL attributed resource type.
const TypeClass * getTypePtr() const
ElaboratedTypeKeyword getKeyword() const
Wrapper for source info for member pointers.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Class that aids in the construction of nested-name-specifiers along with source-location information ...
A C++ nested-name-specifier augmented with source location information.
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
void * getOpaqueData() const
Retrieve the opaque pointer that refers to source-location data.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Wraps an ObjCPointerType with source location information.
SourceLocation getStarLoc() const
void setTypeArgsRAngleLoc(SourceLocation Loc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
unsigned getNumTypeArgs() const
unsigned getNumProtocols() const
void setTypeArgsLAngleLoc(SourceLocation Loc)
void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo)
void setProtocolLAngleLoc(SourceLocation Loc)
void setProtocolRAngleLoc(SourceLocation Loc)
void setHasBaseTypeAsWritten(bool HasBaseType)
void setProtocolLoc(unsigned i, SourceLocation Loc)
unsigned getNumProtocols() const
void setProtocolLoc(unsigned i, SourceLocation Loc)
void setProtocolLAngleLoc(SourceLocation Loc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void setProtocolRAngleLoc(SourceLocation Loc)
void setNameLoc(SourceLocation Loc)
Wrapper for source info for pointers.
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.
Wrapper of type source information for a type with non-trivial direct qualifiers.
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 getBegin() const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
TagDecl * getOriginalDecl() const
bool isDefinition() const
True if the tag was defined in this type specifier.
bool isTagOwned() const
Does the TagType own this declaration of the Tag?
A convenient class for passing around template argument information.
SourceLocation getRAngleLoc() const
void addArgument(const TemplateArgumentLoc &Loc)
SourceLocation getLAngleLoc() const
Location wrapper for a TemplateArgument.
@ 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,...
Represents a C++ template name within the type system.
std::tuple< NestedNameSpecifier, bool > getQualifierAndTemplateKeyword() const
static void initializeArgLocs(ASTContext &Context, ArrayRef< TemplateArgument > Args, TemplateArgumentLocInfo *ArgInfos, SourceLocation Loc)
MutableArrayRef< TemplateArgumentLocInfo > getArgLocInfos()
void set(SourceLocation ElaboratedKeywordLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKeywordLoc, SourceLocation NameLoc, SourceLocation LAngleLoc, SourceLocation RAngleLoc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
RetTy Visit(TypeLoc TyLoc)
Base wrapper for a particular "section" of type source info.
SourceLocation findNullabilityLoc() const
Find the location of the nullability specifier (__nonnull, __nullable, or __null_unspecifier),...
static unsigned getLocalAlignmentForType(QualType Ty)
Returns the alignment of type source info data block for the given type.
TypeLoc findExplicitQualifierLoc() const
Find a type with the location of an explicit type qualifier.
QualType getType() const
Get the type for which this source info wrapper provides information.
TypeLoc getNextTypeLoc() const
Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the TypeLoc is a PointerLoc and next Typ...
T getAs() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLoc is not of the desired...
NestedNameSpecifierLoc getPrefix() const
If this type represents a qualified-id, this returns it's nested name specifier.
TypeLoc IgnoreParens() const
T castAs() const
Convert to the specified TypeLoc type, asserting that this TypeLoc is of the desired type.
SourceLocation getNonElaboratedBeginLoc() const
This returns the position of the type after any elaboration, such as the 'struct' keyword.
SourceRange getLocalSourceRange() const
Get the local source range.
unsigned getFullDataSize() const
Returns the size of the type source info data block.
AutoTypeLoc getContainedAutoTypeLoc() const
Get the typeloc of an AutoType whose type will be deduced for a variable with an initializer of this ...
SourceLocation getTemplateKeywordLoc() const
Get the SourceLocation of the template keyword (if any).
void copy(TypeLoc other)
Copies the other type loc into this one.
TypeLocClass getTypeLocClass() const
static unsigned getFullDataSizeForType(QualType Ty)
Returns the size of type source info data block for the given type.
SourceLocation getEndLoc() const
Get the end source location.
SourceLocation getBeginLoc() const
Get the begin source location.
SourceLocation getNonPrefixBeginLoc() const
This returns the position of the type after any elaboration, such as the 'struct' keyword,...
SourceRange getLocalSourceRange() const
Expr * getUnderlyingExpr() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
QualType getUnmodifiedType() const
A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier.
void setNameLoc(SourceLocation Loc)
SourceLocation getRParenLoc() const
SourceLocation getTypeofLoc() const
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
The JSON file list parser is used to communicate input to InstallAPI.
TypeSpecifierType
Specifies the kind of type.
@ Template
We are parsing a template declaration.
const FunctionProtoType * T
@ None
No keyword precedes the qualified type name.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
static const ASTTemplateArgumentListInfo * Create(const ASTContext &C, const TemplateArgumentListInfo &List)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
Location information for a TemplateArgument.