15 #ifndef LLVM_CLANG_AST_TYPELOC_H
16 #define LLVM_CLANG_AST_TYPELOC_H
22 #include "llvm/Support/Compiler.h"
31 #define ABSTRACT_TYPELOC(Class, Base)
32 #define TYPELOC(Class, Base) \
34 #include "clang/AST/TypeLocNodes.def"
54 assert(T::isKind(*
this));
65 if (!T::isKind(*
this))
84 #define ABSTRACT_TYPE(Class, Base)
85 #define TYPE(Class, Base) \
87 #include "clang/AST/TypeNodes.def"
93 :
Ty(ty.getAsOpaquePtr()),
Data(opaqueData) { }
95 :
Ty(ty),
Data(opaqueData) { }
103 explicit operator bool()
const {
return Ty; }
142 return getLocalSourceRangeImpl(*
this);
153 return getNextTypeLocImpl(*
this);
175 initializeImpl(Context, *
this, Loc);
202 return !(LHS == RHS);
210 static bool isKind(
const TypeLoc&) {
218 static SourceRange getLocalSourceRangeImpl(
TypeLoc TL);
224 return TypeLoc(Ty, const_cast<void*>(static_cast<const void*>(
this + 1)));
235 return reinterpret_cast<const Type*
>(
Ty);
244 static bool isKind(
const TypeLoc &TL) {
264 dataInt = llvm::alignTo(dataInt, align);
299 static bool isKind(
const TypeLoc &TL) {
307 return castAs<UnqualTypeLoc>();
338 template <
class Base,
class Derived,
class TypeClass,
class LocalData>
341 const Derived *asDerived()
const {
342 return static_cast<const Derived*
>(
this);
346 static bool isKind(
const TypeLoc &TL) {
351 static bool classofType(
const Type *Ty) {
357 return std::max(
unsigned(
alignof(LocalData)),
361 unsigned size =
sizeof(LocalData);
362 unsigned extraAlign = asDerived()->getExtraLocalDataAlignment();
363 size = llvm::alignTo(size, extraAlign);
364 size += asDerived()->getExtraLocalDataSize();
373 memcpy(
getLocalData(), other.getLocalData(),
sizeof(LocalData));
379 asDerived()->getExtraLocalDataSize());
387 return cast<TypeClass>(Base::getTypePtr());
400 return static_cast<LocalData*
>(Base::Data);
407 unsigned size =
sizeof(LocalData);
408 unsigned extraAlign = asDerived()->getExtraLocalDataAlignment();
409 size = llvm::alignTo(size, extraAlign);
410 return reinterpret_cast<char*
>(Base::Data) + size;
415 data += asDerived()->getLocalDataSize();
416 data = llvm::alignTo(data, getNextTypeAlign());
417 return reinterpret_cast<void*
>(data);
428 unsigned getInnerTypeSize()
const {
432 unsigned getInnerTypeSize(HasNoInnerType _)
const {
436 unsigned getInnerTypeSize(QualType _)
const {
440 unsigned getNextTypeAlign()
const {
444 unsigned getNextTypeAlign(HasNoInnerType _)
const {
448 unsigned getNextTypeAlign(QualType T)
const {
464 template <
class Base,
class Derived,
class TypeClass>
467 static bool classofType(
const Type *Ty) {
471 static bool isKind(
const TypeLoc &TL) {
475 static bool isKind(
const UnqualTypeLoc &TL) {
476 return Derived::classofType(TL.getTypePtr());
481 return cast<TypeClass>(Base::getTypePtr());
517 static bool isKind(
const TypeLoc &TL);
540 BuiltinRange = Range;
558 return (bk >= BuiltinType::UShort && bk <= BuiltinType::UInt128)
559 || (bk >= BuiltinType::Short && bk <= BuiltinType::Float128)
560 || bk == BuiltinType::UChar
561 || bk == BuiltinType::SChar;
651 InjectedClassNameTypeLoc,
652 InjectedClassNameType> {
662 UnresolvedUsingTypeLoc,
663 UnresolvedUsingType> {
708 TemplateTypeParmTypeLoc,
709 TemplateTypeParmType> {
721 ObjCTypeParamTypeLoc,
723 ObjCTypeParamTypeLocInfo> {
764 return getProtocolLocArray()[i];
768 getProtocolLocArray()[i] = Loc;
802 SubstTemplateTypeParmTypeLoc,
803 SubstTemplateTypeParmType> {
809 SubstTemplateTypeParmPackTypeLoc,
810 SubstTemplateTypeParmPackType> {
858 TypeLoc getModifiedLoc()
const {
865 SourceLocation getAttrNameLoc()
const {
868 void setAttrNameLoc(SourceLocation loc) {
875 Expr *getAttrExprOperand()
const {
879 void setAttrExprOperand(Expr *e) {
929 setAttrExprOperand(
nullptr);
958 ObjCObjectTypeLocInfo> {
991 return getTypeArgLocArray()[i];
996 getTypeArgLocArray()[i] = TInfo;
1019 return getProtocolLocArray()[i];
1023 getProtocolLocArray()[i] = Loc;
1067 "not enough alignment for tail-allocated data");
1084 ObjCInterfaceTypeLoc,
1086 ObjCInterfaceLocInfo> {
1159 if (ParenTypeLoc::isKind(*
this))
1160 return IgnoreParensImpl(*
this);
1168 AdjustedType, AdjustedLocInfo> {
1198 AdjustedTypeLoc, DecayedTypeLoc, DecayedType> {
1206 template <
class Derived,
class TypeClass,
class LocalData = Po
interLikeLocInfo>
1208 TypeClass, LocalData> {
1267 MemberPointerLocInfo> {
1302 ObjCObjectPointerType> {
1324 LValueReferenceTypeLoc,
1325 LValueReferenceType> {
1337 RValueReferenceTypeLoc,
1338 RValueReferenceType> {
1361 bool hasExceptionSpec()
const {
1362 if (
auto *FPT = dyn_cast<FunctionProtoType>(
getTypePtr())) {
1363 return FPT->hasExceptionSpec();
1369 assert(hasExceptionSpec() &&
"No exception spec range");
1408 if (hasExceptionSpec())
1409 return *getExceptionSpecRangePtr();
1413 if (hasExceptionSpec())
1414 *getExceptionSpecRangePtr() = R;
1449 if (hasExceptionSpec())
1456 unsigned ExceptSpecSize = hasExceptionSpec() ?
sizeof(
SourceRange) : 0;
1467 FunctionProtoTypeLoc,
1468 FunctionProtoType> {
1473 FunctionNoProtoTypeLoc,
1474 FunctionNoProtoType> {
1533 ConstantArrayTypeLoc,
1534 ConstantArrayType> {
1539 IncompleteArrayTypeLoc,
1540 IncompleteArrayType> {
1545 DependentSizedArrayTypeLoc,
1546 DependentSizedArrayType> {
1556 VariableArrayTypeLoc,
1557 VariableArrayType> {
1574 TemplateSpecializationTypeLoc,
1575 TemplateSpecializationType,
1576 TemplateSpecializationLocInfo> {
1603 getArgInfos()[i] = AI;
1606 return getArgInfos()[i];
1645 getArgInfos(), Loc);
1690 DependentSizedExtVectorTypeLoc,
1691 DependentSizedExtVectorType> {
1713 template <
class Derived,
class TypeClass,
class LocalData = TypeofLocInfo>
1715 :
public ConcreteTypeLoc<UnqualTypeLoc, Derived, TypeClass, LocalData> {
1759 TypeOfExprTypeLocInfo> {
1802 UnaryTransformTypeLoc,
1804 UnaryTransformTypeLocInfo> {
1851 DeducedTemplateSpecializationTypeLoc,
1852 DeducedTemplateSpecializationType> {
1871 ElaboratedLocInfo> {
1888 "Inconsistent nested-name-specifier pointer");
1927 DependentNameTypeLoc,
1929 DependentNameLocInfo> {
1946 "Inconsistent nested-name-specifier pointer");
1982 DependentTemplateSpecializationTypeLoc,
1983 DependentTemplateSpecializationType,
1984 DependentTemplateSpecializationLocInfo> {
2002 if (!QualifierLoc) {
2013 "Inconsistent nested-name-specifier pointer");
2050 getArgInfos()[i] = AI;
2053 return getArgInfos()[i];
2100 PackExpansionType, PackExpansionTypeLocInfo> {
2132 AtomicType, AtomicTypeLocInfo> {
2203 template <
typename T>
2206 while (!T::isKind(Cur)) {
2208 Cur = PTL.getInnerLoc();
2210 Cur = ATL.getModifiedLoc();
2212 Cur = ETL.getNamedTypeLoc();
2214 Cur = ATL.getOriginalLoc();
2218 return Cur.
getAs<T>();
TypeSourceInfo * getUnderlyingTInfo() const
unsigned getLocalDataSize() const
SourceLocation getEnd() const
SourceLocation getNameLoc() const
T getAs() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLoc is not of the desired...
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
static unsigned getFullDataSizeForType(QualType Ty)
Returns the size of type source info data block for the given type.
SourceLocation getElaboratedKeywordLoc() const
unsigned getLocalDataAlignment() const
Returns the alignment of the type source info data block that is specific to this type...
void initializeLocal(ASTContext &Context, SourceLocation Loc)
TypeSourceInfo * ClassTInfo
CXXRecordDecl * getDecl() const
A (possibly-)qualified type.
QualType getInnerType() const
void setStarLoc(SourceLocation Loc)
SourceLocation TypeArgsRAngleLoc
Wrapper for source info for tag types.
SourceLocation getNameLoc() const
HasNoInnerType getInnerType() const
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range covering the entirety of this nested-name-specifier.
SourceLocation findNullabilityLoc() const
Find the location of the nullability specifier (__nonnull, __nullable, or __null_unspecifier), if there is one.
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
void setNameEndLoc(SourceLocation Loc)
void setKWLoc(SourceLocation Loc)
unsigned getExtraLocalDataAlignment() const
void setRParenLoc(SourceLocation Loc)
void setStarLoc(SourceLocation Loc)
void setLAngleLoc(SourceLocation Loc)
void setExceptionSpecRange(SourceRange R)
TypeLoc getNamedTypeLoc() const
SourceLocation getLAngleLoc() const
unsigned getNumArgs() const
Retrieve the number of template arguments.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
C Language Family Type Representation.
void setWrittenWidthSpec(TypeSpecifierWidth written)
CXXRecordDecl * getDecl() const
ArrayRef< SourceLocation > getProtocolLocs() const
bool hasWrittenTypeSpec() const
TypeLoc getPatternLoc() const
QualType getInnerType() const
WrittenBuiltinSpecs & getWrittenBuiltinSpecs()
SourceRange getLocalSourceRange() const
SourceLocation ProtocolLAngleLoc
The base class of the type hierarchy.
SourceLocation getLocalRangeBegin() const
void setTemplateKeywordLoc(SourceLocation Loc)
Wrapper for source info for typedefs.
bool hasBaseTypeAsWritten() const
A container of type source information.
unsigned EnumOperandLoc
A raw SourceLocation.
unsigned getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it...
Wrapper for source info for pointers decayed from arrays and functions.
bool hasAttrEnumOperand() const
T getAsAdjusted() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLock is not of the desire...
SourceLocation LocalRangeEnd
SourceRange getAttrOperandParensRange() const
The location of the parentheses around the operand, if there is an operand.
TypeLoc getNextTypeLoc() const
unsigned getLocalDataSize() const
Returns the size of the type source info data block that is specific to this type.
Expr * getUnderlyingExpr() const
void setParensRange(SourceRange range)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Wrapper for source info for member pointers.
Wrapper of type source information for a type with non-trivial direct qualifiers. ...
unsigned getExtraLocalDataAlignment() const
bool hasAttrExprOperand() const
TypeSpecifierType
Specifies the kind of type.
TemplateTypeParmDecl * getDecl() const
QualType getOriginalType() const
void setProtocolRAngleLoc(SourceLocation Loc)
void setBegin(SourceLocation b)
unsigned getExtraLocalDataAlignment() const
bool hasAttrOperand() const
const Type * getTypePtr() const
ParmVarDecl - Represents a parameter to a function.
TypeLocClass getTypeLocClass() const
unsigned getNumArgs() const
Retrieve the number of template arguments.
SourceLocation NameEndLoc
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation getAmpAmpLoc() const
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier...
void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo)
void setParensRange(SourceRange Range)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Base wrapper for a particular "section" of type source info.
RecordDecl - Represents a struct/union/class.
QualType getInnerType() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
unsigned getExtraLocalDataSize() const
void setLocalRangeEnd(SourceLocation L)
SourceLocation TypeArgsLAngleLoc
bool isDefinition() const
True if the tag was defined in this type specifier.
unsigned getExtraLocalDataAlignment() const
qual_iterator qual_begin() const
SourceRange getLocalSourceRange() const
TypeLoc getPointeeLoc() const
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
unsigned getLocalDataAlignment() const
unsigned getExtraLocalDataSize() const
Returns the size of the type source info data block that is specific to this type.
A C++ nested-name-specifier augmented with source location information.
unsigned getNumArgs() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void setBuiltinLoc(SourceLocation Loc)
SourceRange getLocalSourceRange() const
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
TypeSpecifierSign
Specifies the signedness of a type, e.g., signed or unsigned.
EnumDecl * getDecl() const
void setRBracketLoc(SourceLocation Loc)
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
TypeSourceInfo * getTypeArgTInfo(unsigned i) const
SourceLocation getLocalRangeEnd() const
bool isCompleteDefinition() const
isCompleteDefinition - Return true if this decl has its body fully specified.
SourceLocation getTypeArgsRAngleLoc() const
bool hasWrittenSignSpec() const
SourceLocation RBracketLoc
SourceRange getLocalSourceRange() const
ParmVarDecl * getParam(unsigned i) const
UnresolvedUsingTypenameDecl * getDecl() const
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
unsigned getNumProtocols() const
void setElaboratedKeywordLoc(SourceLocation Loc)
SourceRange getLocalSourceRange() const
Get the local source range.
TypeLoc getValueLoc() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
unsigned getNumProtocols() const
Wrapper for source info for unresolved typename using decls.
SourceLocation getBuiltinLoc() const
void copy(DependentTemplateSpecializationTypeLoc Loc)
SourceRange getLocalSourceRange() const
Wrapper of type source information for a type with no direct qualifiers.
QualType getUnderlyingType() const
RecordDecl * getDecl() const
Expr * getUnderlyingExpr() const
SourceLocation getBeginLoc() const
Get the begin source location.
ArrayRef< SourceLocation > getProtocolLocs() const
void setProtocolLoc(unsigned i, SourceLocation Loc)
const Type * getTypePtr() const
void setLParenLoc(SourceLocation Loc)
void setNameLoc(SourceLocation Loc)
void setCaretLoc(SourceLocation Loc)
void setRAngleLoc(SourceLocation Loc)
Wrapper for source info for injected class names of class templates.
QualType getInnerType() const
friend bool operator==(const TypeLoc &LHS, const TypeLoc &RHS)
bool HasBaseTypeAsWritten
SourceLocation getRAngleLoc() const
QualType getBaseType() const
Gets the base type of this object type.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
QualType getReturnType() const
Wrapper for source info for functions.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Initializes the local data of this type source info block to provide no information.
UnresolvedUsingTypenameDecl * getDecl() const
NestedNameSpecifierLoc getQualifierLoc() const
Wrapper for substituted template type parameters.
TypeSourceInfo * getClassTInfo() const
Wrapper for substituted template type parameters.
bool needsExtraLocalData() const
RecordDecl * getDecl() const
void setRParenLoc(SourceLocation Loc)
TypeLoc(const Type *ty, void *opaqueData)
void expandBuiltinRange(SourceRange Range)
unsigned getExtraLocalDataSize() const
SourceLocation getProtocolRAngleLoc() const
SourceRange getLocalSourceRange() const
SourceLocation getRParenLoc() const
Wrapper for source info for ObjC interfaces.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
SourceRange getLocalSourceRange() const
TypeClass getTypeClass() const
void setNameLoc(SourceLocation Loc)
Represents an Objective-C protocol declaration.
void setProtocolLoc(unsigned i, SourceLocation Loc)
void setLocalRangeBegin(SourceLocation L)
Represents an ObjC class declaration.
void copy(ElaboratedTypeLoc Loc)
SourceLocation getTypeofLoc() const
SourceLocation getTypeArgsLAngleLoc() const
unsigned getNumParams() const
SourceLocation LocalRangeBegin
T castAs() const
Convert to the specified TypeLoc type, asserting that this TypeLoc is of the desired type...
TypedefNameDecl * getTypedefNameDecl() const
SourceRange getBracketsRange() const
void setUnderlyingTInfo(TypeSourceInfo *TI) const
AttributedType::Kind getAttrKind() const
EnumDecl * getDecl() const
SourceLocation getKWLoc() const
SourceRange getLocalSourceRange() const
TypeLoc getNextTypeLoc() const
Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the TypeLoc is a PointerLoc and next Typ...
QualType getValueType() const
Gets the type contained by this atomic type, i.e.
void * QualifierData
Data associated with the nested-name-specifier location.
TagDecl * getDecl() const
QualType getInnerType() const
unsigned getExtraLocalDataAlignment() const
unsigned getExtraLocalDataSize() const
SourceLocation getAttrEnumOperandLoc() const
The modified type, which is generally canonically different from the attribute type.
SourceLocation getNameLoc() const
SourceLocation getLBracketLoc() const
SourceRange getLocalSourceRange() const
SourceRange getLocalSourceRange() const
void setSizeExpr(Expr *Size)
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
void initialize(ASTContext &Context, SourceLocation Loc) const
Initializes this to state that every location in this type is the given location. ...
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
void setTemplateNameLoc(SourceLocation Loc)
SourceLocation getElaboratedKeywordLoc() const
QualType getInnerType() const
Type source information for an attributed type.
SourceLocation getRBracketLoc() const
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
Expr - This represents one expression.
void setModeAttr(bool written)
void * getOpaqueData() const
Get the pointer where source information is stored.
SourceLocation EllipsisLoc
Declaration of a template type parameter.
TypeSpecifierWidth getWrittenWidthSpec() const
unsigned getExtraLocalDataSize() const
SourceLocation getSigilLoc() const
Expr * getUnderlyingExpr() const
unsigned getExtraLocalDataAlignment() const
TypeLoc getInnerTypeLoc() const
QualType getNamedType() const
Retrieve the type named by the qualified-id.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation getLParenLoc() const
void setWrittenSignSpec(TypeSpecifierSign written)
void setRParenLoc(SourceLocation Loc)
char __ovld __cnfn min(char x, char y)
Returns y if y < x, otherwise it returns x.
SourceRange getExceptionSpecRange() const
void setNameLoc(SourceLocation Loc)
void setLParenLoc(SourceLocation Loc)
SourceLocation getTemplateNameLoc() const
QualType getType() const
Get the type for which this source info wrapper provides information.
Wrapper for source info for enum types.
void setEllipsisLoc(SourceLocation Loc)
ProtocolLAngleLoc, ProtocolRAngleLoc, and the source locations for protocol qualifiers are stored aft...
void setHasBaseTypeAsWritten(bool HasBaseType)
ObjCProtocolDecl * getProtocol(unsigned i) const
SourceRange getLocalSourceRange() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceRange getParensRange() const
SourceRange getLocalSourceRange() const
QualType getInnerType() const
SourceLocation getLocEnd() const LLVM_READONLY
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
TypeSourceInfo * UnderlyingTInfo
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
SourceLocation getRAngleLoc() const
const TypeClass * getTypePtr() const
SourceLocation getProtocolRAngleLoc() const
unsigned getExtraLocalDataSize() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation getEndLoc() const
Get the end source location.
void setStarLoc(SourceLocation Loc)
void setTypeofLoc(SourceLocation Loc)
TypeLoc getInnerLoc() const
TemplateArgumentLoc getArgLoc(unsigned i) const
Wrapper for source info for arrays.
TypeLoc getNextTypeLoc() const
TemplateArgumentLoc getArgLoc(unsigned i) const
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
void setAttrOperandParensRange(SourceRange range)
SourceLocation getTemplateKeywordLoc() const
SourceLocation getRParenLoc() const
TypeLoc getValueLoc() const
void setLAngleLoc(SourceLocation Loc)
QualType getInnerType() const
Encodes a location in the source.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
bool isQualifier() const
Does this attribute behave like a type qualifier?
SourceRange OperandParens
void initializeLocal(ASTContext &Context, SourceLocation Loc)
bool isValid() const
Return true if this is a valid SourceLocation object.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation getLParenLoc() const
void setProtocolLAngleLoc(SourceLocation Loc)
TagDecl - Represents the declaration of a struct/union/class/enum.
void setProtocolRAngleLoc(SourceLocation Loc)
SourceRange getLocalSourceRange() const
SourceLocation getNameEndLoc() const
A metaprogramming base class for TypeLoc classes which correspond to a particular Type subclass...
QualType getInnerType() const
SourceLocation getNameLoc() const
LocalData * getLocalData() const
friend bool operator!=(const TypeLoc &LHS, const TypeLoc &RHS)
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation ProtocolRAngleLoc
unsigned getNumTypeArgs() const
SourceLocation getRParenLoc() const
UnqualTypeLoc(const Type *Ty, void *Data)
TypeLocClass
The kinds of TypeLocs.
TypedefNameDecl * getDecl() const
void setElaboratedKeywordLoc(SourceLocation Loc)
SourceRange getLocalSourceRange() const
TypeLocClass getTypeLocClass() const
TypeSpecifierType getWrittenTypeSpec() const
void setWrittenTypeSpec(TypeSpecifierType written)
SourceRange getLocalSourceRange() const
SourceLocation getBegin() const
void setAmpLoc(SourceLocation Loc)
TypeLoc getReturnLoc() const
void setLBracketLoc(SourceLocation Loc)
SourceLocation ElaboratedKWLoc
QualType getInnerType() const
SourceLocation LBracketLoc
SourceRange getLocalSourceRange() const
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
A metaprogramming class designed for concrete subtypes of abstract types where all subtypes share equ...
SourceLocation getKWLoc() const
SourceLocation getTemplateNameLoc() const
static QualType getFromOpaquePtr(const void *Ptr)
SourceLocation getProtocolLAngleLoc() const
ObjCTypeParamDecl * getDecl() const
void * getExtraLocalData() const
Gets a pointer past the Info structure; useful for classes with local data that can't be captured in ...
SourceLocation getNameLoc() const
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments of this object type as they were written.
Defines various enumerations that describe declaration and type specifiers.
void setLParenLoc(SourceLocation Loc)
QualType getInnerType() const
void setTemplateKeywordLoc(SourceLocation Loc)
TypeLoc(QualType ty, void *opaqueData)
void setTypeArgsLAngleLoc(SourceLocation Loc)
TypeLoc findExplicitQualifierLoc() const
Find a type with the location of an explicit type qualifier.
Base class for declarations which introduce a typedef-name.
Represents a template argument.
void setClassTInfo(TypeSourceInfo *TI)
void initializeLocal(ASTContext &Context, SourceLocation loc)
SourceLocation TemplateKWLoc
SourceRange getLocalSourceRange() const
void setAmpAmpLoc(SourceLocation Loc)
unsigned getLocalDataSize() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation getEllipsisLoc() const
SourceLocation getLocStart() const LLVM_READONLY
TypeLoc IgnoreParens() const
SourceLocation getStarLoc() const
SourceLocation getTemplateKeywordLoc() const
Represents a dependent using declaration which was marked with typename.
Represents the declaration of an Objective-C type parameter.
SourceLocation getCaretLoc() const
Expr * getSizeExpr() const
ObjCInterfaceDecl * getIFaceDecl() const
void * getNonLocalData() const
SourceRange getLocalSourceRange() const
EnumDecl - Represents an enum.
SourceLocation getElaboratedKeywordLoc() const
QualType getUnderlyingType() const
QualType getModifiedType() const
unsigned getNumProtocols() const
Return the number of qualifying protocols in this type, or 0 if there are none.
void setSigilLoc(SourceLocation Loc)
TemplateTypeParmDecl * getDecl() const
void * getOpaqueData() const
Retrieve the opaque pointer that refers to source-location data.
void setNameLoc(SourceLocation Loc)
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
void setAttrEnumOperandLoc(SourceLocation loc)
TypeSpecifierSign getWrittenSignSpec() const
Location wrapper for a TemplateArgument.
static bool classof(const OMPClause *T)
TypeLoc getOriginalLoc() const
unsigned getExtraLocalDataAlignment() const
QualType getInnerType() const
static void initializeArgLocs(ASTContext &Context, unsigned NumArgs, const TemplateArgument *Args, TemplateArgumentLocInfo *ArgInfos, SourceLocation Loc)
unsigned getNumArgs() const
void setTemplateNameLoc(SourceLocation Loc)
UnqualTypeLoc getUnqualifiedLoc() const
QualType getInnerType() const
SourceRange getParensRange() const
TypeLoc getBaseLoc() const
void setTypeArgsRAngleLoc(SourceLocation Loc)
Wrapper for source info for record types.
void copy(TemplateSpecializationTypeLoc Loc)
Copy the location information from the given info.
ObjCProtocolDecl * getProtocol(unsigned i) const
Wraps an ObjCPointerType with source location information.
const TypeClass * getTypePtr() const
NestedNameSpecifier * getQualifier() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceLocation getProtocolLAngleLoc() const
char __ovld __cnfn max(char x, char y)
Returns y if x < y, otherwise it returns x.
NestedNameSpecifierLoc getQualifierLoc() const
Structure that packs information about the type specifiers that were written in a particular type spe...
Expr * getUnderlyingExpr() const
const Type * getClass() const
unsigned getFullDataSize() const
Returns the size of the type source info data block.
void setKWLoc(SourceLocation Loc)
SourceRange getLocalSourceRange() const
SourceLocation getProtocolLoc(unsigned i) const
bool hasWrittenWidthSpec() const
SourceRange getParensRange() const
void setEnd(SourceLocation e)
Represents a C++ struct/union/class.
TypeSpecifierWidth
Specifies the width of a type, e.g., short, long, or long long.
SourceLocation getTemplateNameLoc() const
void setParam(unsigned i, ParmVarDecl *VD)
void copyLocal(TypeLoc other)
static unsigned getLocalAlignmentForType(QualType Ty)
Returns the alignment of type source info data block for the given type.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
void copyLocal(Derived other)
SourceRange getLocalSourceRange() const
TypeLoc getElementLoc() const
void setLParenLoc(SourceLocation Loc)
SourceLocation getRParenLoc() const
Location information for a TemplateArgument.
void initializeLocal(ASTContext &Context, SourceLocation Loc)
SourceRange getLocalSourceRange() const
QualType getPattern() const
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated w...
ArrayRef< ParmVarDecl * > getParams() const
void setRAngleLoc(SourceLocation Loc)
SourceLocation TemplateKWLoc
SourceLocation getProtocolLoc(unsigned i) const
const WrittenBuiltinSpecs & getWrittenBuiltinSpecs() const
QualType getPointeeTypeAsWritten() const
TagDecl * getDecl() const
void copy(TypeLoc other)
Copies the other type loc into this one.
QualType getElementType() const
QualType getElementType() const
void setProtocolLAngleLoc(SourceLocation Loc)
SourceLocation getStarLoc() const
SourceRange getLocalSourceRange() const
void initializeFullCopy(TypeLoc Other)
Initializes this by copying its information from another TypeLoc of the same type.
SourceLocation getAmpLoc() const
SourceLocation getLAngleLoc() const
Wrapper for source info for builtin types.
void setRParenLoc(SourceLocation Loc)
Wrapper for template type parameters.
A trivial tuple used to represent a source range.
SourceLocation getLocation() const
UnqualTypeLoc getUnqualifiedLoc() const
Skips past any qualifiers, if this is qualified.
void copy(DependentNameTypeLoc Loc)
NestedNameSpecifierLoc getQualifierLoc() const
void setTemplateNameLoc(SourceLocation Loc)
ParmVarDecl ** getParmArray() const
void initializeLocal(ASTContext &Context, SourceLocation Loc)
void initializeFullCopy(TypeLoc Other, unsigned Size)
Initializes this by copying its information from another TypeLoc of the same type.
const Type * getClass() const
unsigned getExtraLocalDataSize() const
Wrapper for source info for pointers.
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
Wrapper for source info for block pointers.
void setElaboratedKeywordLoc(SourceLocation Loc)
SourceLocation getStarLoc() const
ObjCTypeParamDecl * getDecl() const
SourceLocation getLParenLoc() const
SourceLocation getLParenLoc() const