14 #ifndef LLVM_CLANG_AST_TYPE_H
15 #define LLVM_CLANG_AST_TYPE_H
27 #include "llvm/ADT/APInt.h"
28 #include "llvm/ADT/FoldingSet.h"
29 #include "llvm/ADT/Optional.h"
30 #include "llvm/ADT/PointerIntPair.h"
31 #include "llvm/ADT/PointerUnion.h"
32 #include "llvm/ADT/Twine.h"
33 #include "llvm/ADT/iterator_range.h"
34 #include "llvm/Support/ErrorHandling.h"
48 class PointerLikeTypeTraits;
69 struct isPodLike<clang::QualType> {
static const bool value =
true; };
74 class TypedefNameDecl;
76 class TemplateTypeParmDecl;
77 class NonTypeTemplateParmDecl;
78 class TemplateTemplateParmDecl;
85 class ObjCInterfaceDecl;
86 class ObjCProtocolDecl;
88 class UnresolvedUsingTypenameDecl;
92 class StmtIteratorBase;
93 class TemplateArgument;
94 class TemplateArgumentLoc;
95 class TemplateArgumentListInfo;
98 class ExtQualsTypeCommonBase;
99 struct PrintingPolicy;
101 template <
typename>
class CanQual;
105 #define TYPE(Class, Base) class Class##Type;
106 #include "clang/AST/TypeNodes.def"
170 Q.Mask = L.Mask & R.Mask;
250 assert(!(mask & ~
CVRMask) &&
"bitmask contains non-CVR bits");
251 Mask = (Mask & ~
CVRMask) | mask;
254 assert(!(mask & ~
CVRMask) &&
"bitmask contains non-CVR bits");
261 assert(!(mask & ~
CVRMask) &&
"bitmask contains non-CVR bits");
268 Mask = (Mask & ~GCAttrMask) | (type << GCAttrShift);
288 return ObjCLifetime((Mask & LifetimeMask) >> LifetimeShift);
291 Mask = (Mask & ~LifetimeMask) | (type << LifetimeShift);
297 Mask |= (type << LifetimeShift);
316 Mask = (Mask & ~AddressSpaceMask)
317 | (((uint32_t) space) << AddressSpaceShift);
330 assert(!(mask & ~
FastMask) &&
"bitmask contains non-fast qualifier bits");
334 assert(!(mask & ~
FastMask) &&
"bitmask contains non-fast qualifier bits");
341 assert(!(mask & ~
FastMask) &&
"bitmask contains non-fast qualifier bits");
356 bool empty()
const {
return !Mask; }
489 bool appendSpaceIfNonEmpty =
false)
const;
501 static const uint32_t GCAttrMask = 0x18;
502 static const uint32_t GCAttrShift = 3;
503 static const uint32_t LifetimeMask = 0xE0;
504 static const uint32_t LifetimeShift = 5;
505 static const uint32_t AddressSpaceMask = ~(
CVRMask|GCAttrMask|LifetimeMask);
506 static const uint32_t AddressSpaceShift = 8;
524 std::pair<const Type *,Qualifiers>
asPair()
const {
525 return std::pair<const Type *, Qualifiers>(Ty, Quals);
568 llvm::PointerIntPair<llvm::PointerUnion<const Type*,const ExtQuals*>,
571 const ExtQuals *getExtQualsUnsafe()
const {
575 const Type *getTypePtrUnsafe()
const {
576 return Value.getPointer().get<
const Type*>();
580 assert(!isNull() &&
"Cannot retrieve a NULL type pointer");
581 uintptr_t CommonPtrVal
582 =
reinterpret_cast<uintptr_t
>(
Value.getOpaqueValue());
592 :
Value(Ptr, Quals) {}
594 :
Value(Ptr, Quals) {}
603 const Type *getTypePtr()
const;
605 const Type *getTypePtrOrNull()
const;
617 T.Value.setFromOpaqueValue(const_cast<void*>(Ptr));
622 return *getTypePtr();
629 bool isCanonical()
const;
630 bool isCanonicalAsParam()
const;
634 return Value.getPointer().isNull();
645 bool isConstQualified()
const;
655 bool isRestrictQualified()
const;
665 bool isVolatileQualified()
const;
671 return getLocalFastQualifiers() || hasLocalNonFastQualifiers();
696 return getLocalFastQualifiers();
757 return withFastQualifiers(CVR);
762 &&
"non-fast qualifier bits set in mask!");
766 void removeLocalConst();
767 void removeLocalVolatile();
768 void removeLocalRestrict();
769 void removeLocalCVRQualifiers(
unsigned Mask);
823 inline QualType getUnqualifiedType()
const;
838 bool isMoreQualifiedThan(
QualType Other)
const;
842 bool isAtLeastAsQualifiedAs(
QualType Other)
const;
844 QualType getNonReferenceType()
const;
865 return getDesugaredType(*
this, Context);
869 return getSplitDesugaredType(*
this);
878 return getSingleStepDesugaredTypeImpl(*
this, Context);
884 if (isa<ParenType>(*
this))
892 return LHS.Value == RHS.Value;
895 return LHS.Value != RHS.Value;
908 const Twine &PlaceHolder = Twine())
const {
909 print(split(), OS, Policy, PlaceHolder);
913 return print(split.
Ty, split.
Quals, OS, policy, PlaceHolder);
917 const Twine &PlaceHolder);
921 return getAsStringInternal(split(), Str, Policy);
925 return getAsStringInternal(split.
Ty, split.
Quals, out, policy);
934 const Twine &PlaceHolder;
937 const Twine &PlaceHolder)
938 : T(T), Policy(Policy), PlaceHolder(PlaceHolder) { }
942 SQT.T.
print(OS, SQT.Policy, SQT.PlaceHolder);
948 const Twine &PlaceHolder = Twine())
const {
952 void dump(
const char *s)
const;
956 ID.AddPointer(getAsOpaquePtr());
977 return getQualifiers().getObjCLifetime();
981 return getQualifiers().hasNonTrivialObjCLifetime();
985 return getQualifiers().hasStrongOrWeakObjCLifetime();
992 DK_objc_weak_lifetime
1000 return isDestructedTypeImpl(*
this);
1013 bool isCForbiddenLValueType()
const;
1071 static DestructionKind isDestructedTypeImpl(
QualType type);
1097 enum { NumLowBitsAvailable = 0 };
1110 : BaseType(baseType), CanonicalType(canon) {}
1117 const Type *
const BaseType;
1160 canon.isNull() ?
QualType(this_(), 0) : canon),
1164 &&
"ExtQuals created with no fast qualifiers");
1166 &&
"ExtQuals created with fast qualifiers");
1189 const Type *BaseType,
1192 ID.AddPointer(BaseType);
1237 #define TYPE(Class, Base) Class,
1238 #define LAST_TYPE(Class) TypeLast = Class,
1239 #define ABSTRACT_TYPE(Class, Base)
1240 #include "clang/AST/TypeNodes.def"
1246 void operator=(
const Type &) =
delete;
1249 class TypeBitfields {
1257 unsigned Dependent : 1;
1261 unsigned InstantiationDependent : 1;
1264 unsigned VariablyModified : 1;
1268 unsigned ContainsUnexpandedParameterPack : 1;
1272 mutable unsigned CacheValid : 1;
1275 mutable unsigned CachedLinkage : 3;
1278 mutable unsigned CachedLocalOrUnnamed : 1;
1281 mutable unsigned FromAST : 1;
1283 bool isCacheValid()
const {
1287 assert(isCacheValid() &&
"getting linkage from invalid cache");
1288 return static_cast<Linkage>(CachedLinkage);
1290 bool hasLocalOrUnnamedType()
const {
1291 assert(isCacheValid() &&
"getting linkage from invalid cache");
1292 return CachedLocalOrUnnamed;
1295 enum { NumTypeBits = 18 };
1304 unsigned : NumTypeBits;
1308 unsigned IndexTypeQuals : 3;
1313 unsigned SizeModifier : 3;
1319 unsigned : NumTypeBits;
1329 unsigned : NumTypeBits;
1333 unsigned ExtInfo : 9;
1341 unsigned TypeQuals : 3;
1346 unsigned RefQualifier : 2;
1352 unsigned : NumTypeBits;
1355 unsigned NumTypeArgs : 7;
1359 unsigned NumProtocols : 6;
1362 unsigned IsKindOf : 1;
1364 static_assert(NumTypeBits + 7 + 6 + 1 <= 32,
"Does not fit in an unsigned");
1369 unsigned : NumTypeBits;
1382 unsigned SpelledAsLValue : 1;
1386 unsigned InnerRef : 1;
1392 unsigned : NumTypeBits;
1395 unsigned Keyword : 8;
1401 unsigned : NumTypeBits;
1405 unsigned VecKind : 3;
1408 unsigned NumElements : 29 - NumTypeBits;
1410 enum { MaxNumElements = (1 << (29 - NumTypeBits)) - 1 };
1416 unsigned : NumTypeBits;
1419 unsigned AttrKind : 32 - NumTypeBits;
1425 unsigned : NumTypeBits;
1428 unsigned IsDecltypeAuto : 1;
1446 void setFromAST(
bool V =
true)
const {
1456 bool InstantiationDependent,
bool VariablyModified,
1457 bool ContainsUnexpandedParameterPack)
1462 TypeBits.InstantiationDependent = Dependent || InstantiationDependent;
1463 TypeBits.VariablyModified = VariablyModified;
1464 TypeBits.ContainsUnexpandedParameterPack = ContainsUnexpandedParameterPack;
1466 TypeBits.CachedLocalOrUnnamed =
false;
1475 TypeBits.InstantiationDependent =
true;
1478 TypeBits.InstantiationDependent = D; }
1482 TypeBits.ContainsUnexpandedParameterPack = PP;
1507 return TypeBits.ContainsUnexpandedParameterPack;
1513 return CanonicalType ==
QualType(
this, 0);
1734 return TypeBits.InstantiationDependent;
1827 template <
typename T>
const T *
getAs()
const;
1839 template <
typename T>
const T *
castAs()
const;
1952 return CanonicalType;
1976 #define TYPE(Class, Base)
1977 #define LEAF_TYPE(Class) \
1978 template <> inline const Class##Type *Type::getAs() const { \
1979 return dyn_cast<Class##Type>(CanonicalType); \
1981 template <> inline const Class##Type *Type::castAs() const { \
1982 return cast<Class##Type>(CanonicalType); \
1984 #include "clang/AST/TypeNodes.def"
1992 #define BUILTIN_TYPE(Id, SingletonId) Id,
1993 #define LAST_BUILTIN_TYPE(Id) LastKind = Id
1994 #include "clang/AST/BuiltinTypes.def"
2010 StringRef str =
getName(Policy);
2011 assert(!str.empty() && str.data()[str.size()] ==
'\0');
2036 return K >= Overload;
2072 ElementType(Element) {
2133 PointeeType(Pointee) {
2184 OriginalTy(OriginalTy), AdjustedTy(AdjustedTy) {}
2196 Profile(ID, OriginalTy, AdjustedTy);
2212 :
AdjustedType(Decayed, OriginalType, DecayedPtr, CanonicalPtr) {
2239 PointeeType(Pointee) {
2270 bool SpelledAsLValue) :
2275 PointeeType(Referencee)
2291 return T->PointeeType;
2299 bool SpelledAsLValue) {
2301 ID.AddBoolean(SpelledAsLValue);
2314 bool SpelledAsLValue) :
2315 ReferenceType(LValueReference, Referencee, CanonicalRef, SpelledAsLValue)
2331 ReferenceType(RValueReference, Referencee, CanonicalRef,
false) {
2352 Type(MemberPointer, CanonicalPtr,
2359 PointeeType(Pointee), Class(Cls) {
2388 const Type *Class) {
2390 ID.AddPointer(Class);
2421 bool ContainsUnexpandedParameterPack)
2425 ContainsUnexpandedParameterPack),
2462 :
ArrayType(ConstantArray, et, can, sm, tq,
2472 const llvm::APInt &
getSize()
const {
return Size; }
2481 const llvm::APInt &NumElements);
2493 unsigned TypeQuals) {
2495 ID.AddInteger(ArraySize.getZExtValue());
2496 ID.AddInteger(SizeMod);
2497 ID.AddInteger(TypeQuals);
2511 :
ArrayType(IncompleteArray, et, can, sm, tq,
2532 ID.AddInteger(SizeMod);
2533 ID.AddInteger(TypeQuals);
2562 :
ArrayType(VariableArray, et, can, sm, tq,
2564 SizeExpr((
Stmt*) e), Brackets(brackets) {}
2571 return (
Expr*) SizeExpr;
2587 llvm_unreachable(
"Cannot unique VariableArrayTypes.");
2627 return (
Expr*) SizeExpr;
2650 unsigned TypeQuals,
Expr *E);
2726 return NumElements > VectorTypeBitfields::MaxNumElements;
2744 ID.AddInteger(NumElements);
2745 ID.AddInteger(TypeClass);
2746 ID.AddInteger(VecKind);
2787 case 'a':
return 10;
2789 case 'b':
return 11;
2791 case 'c':
return 12;
2793 case 'd':
return 13;
2795 case 'e':
return 14;
2797 case 'f':
return 15;
2856 enum { CallConvMask = 0xF };
2857 enum { NoReturnMask = 0x10 };
2858 enum { ProducesResultMask = 0x20 };
2859 enum { RegParmMask = ~(CallConvMask | NoReturnMask | ProducesResultMask),
2860 RegParmOffset = 6 };
2864 ExtInfo(
unsigned Bits) : Bits(static_cast<uint16_t>(Bits)) {}
2872 bool producesResult) {
2873 assert((!hasRegParm || regParm < 7) &&
"Invalid regparm value");
2875 (noReturn ? NoReturnMask : 0) |
2876 (producesResult ? ProducesResultMask : 0) |
2877 (hasRegParm ? ((regParm + 1) << RegParmOffset) : 0);
2892 unsigned RegParm = Bits >> RegParmOffset;
2900 return Bits == Other.Bits;
2903 return Bits != Other.Bits;
2911 return ExtInfo(Bits | NoReturnMask);
2913 return ExtInfo(Bits & ~NoReturnMask);
2918 return ExtInfo(Bits | ProducesResultMask);
2920 return ExtInfo(Bits & ~ProducesResultMask);
2924 assert(RegParm < 7 &&
"Invalid regparm value");
2925 return ExtInfo((Bits & ~RegParmMask) |
2926 ((RegParm + 1) << RegParmOffset));
2930 return ExtInfo((Bits & ~CallConvMask) | (
unsigned) cc);
2934 ID.AddInteger(Bits);
2940 QualType Canonical,
bool Dependent,
2941 bool InstantiationDependent,
2942 bool VariablyModified,
bool ContainsUnexpandedParameterPack,
2944 :
Type(tc, Canonical, Dependent, InstantiationDependent, VariablyModified,
2945 ContainsUnexpandedParameterPack),
3021 SourceDecl(nullptr), SourceTemplate(nullptr) {}
3024 :
Type(EST), NoexceptExpr(nullptr), SourceDecl(nullptr),
3025 SourceTemplate(nullptr) {}
3044 : Variadic(
false), HasTrailingReturn(
false), TypeQuals(0),
3045 RefQualifier(
RQ_None), ConsumedParameters(nullptr) {}
3049 RefQualifier(
RQ_None), ConsumedParameters(nullptr) {}
3059 bool HasTrailingReturn : 1;
3069 static bool containsAnyUnexpandedParameterPack(
const QualType *ArgArray,
3071 for (
unsigned Idx = 0; Idx < numArgs; ++Idx)
3079 QualType canonical,
const ExtProtoInfo &epi);
3082 unsigned NumParams : 15;
3085 unsigned NumExceptions : 9;
3088 unsigned ExceptionSpecType : 4;
3091 unsigned HasAnyConsumedParams : 1;
3094 unsigned Variadic : 1;
3097 unsigned HasTrailingReturn : 1;
3119 const bool *getConsumedParamsBuffer()
const {
3120 assert(hasAnyConsumedParams());
3123 Expr *
const *eh_end =
reinterpret_cast<Expr *
const *
>(param_type_end());
3125 eh_end += NumExceptions;
3129 return reinterpret_cast<const bool*
>(eh_end);
3135 assert(i < NumParams &&
"invalid parameter index");
3136 return param_type_begin()[i];
3139 return llvm::makeArrayRef(param_type_begin(), param_type_end());
3160 if (hasAnyConsumedParams())
3171 return getExceptionSpecType() !=
EST_None;
3182 bool hasDependentExceptionSpec()
const;
3192 NoexceptResult getNoexceptSpec(
const ASTContext &Ctx)
const;
3195 assert(i < NumExceptions &&
"Invalid exception number!");
3196 return exception_begin()[i];
3202 return *
reinterpret_cast<Expr *
const *
>(param_type_end());
3212 return reinterpret_cast<FunctionDecl *
const *
>(param_type_end())[0];
3221 return reinterpret_cast<FunctionDecl *
const *
>(param_type_end())[1];
3226 bool isNothrow(
const ASTContext &Ctx,
bool ResultIfDependent =
false)
const;
3236 bool isTemplateVariadic()
const;
3255 return reinterpret_cast<const QualType *
>(
this+1);
3258 return param_type_begin() + NumParams;
3264 return llvm::makeArrayRef(exception_begin(), exception_end());
3268 return param_type_end();
3272 return exception_begin();
3273 return exception_begin() + NumExceptions;
3278 assert(I < getNumParams() &&
"parameter index out of range");
3279 if (hasAnyConsumedParams())
3280 return getConsumedParamsBuffer()[I];
3287 void printExceptionSpecification(raw_ostream &OS,
3294 void Profile(llvm::FoldingSetNodeID &
ID,
const ASTContext &Ctx);
3296 param_type_iterator ArgTys,
unsigned NumArgs,
3311 Decl(const_cast<UnresolvedUsingTypenameDecl*>(D)) {}
3325 return Profile(ID,
Decl);
3343 assert(!isa<TypedefType>(can) &&
"Invalid canonical type");
3370 bool isSugared()
const;
3390 Profile(ID,
Context, getUnderlyingExpr());
3406 assert(!isa<TypedefType>(can) &&
"Invalid canonical type");
3437 bool isSugared()
const;
3455 Profile(ID, Context, getUnderlyingExpr());
3458 static void Profile(llvm::FoldingSetNodeID &
ID,
const ASTContext &Context,
3509 bool isBeingDefined()
const;
3584 FirstExprOperandKind = attr_address_space,
3585 LastExprOperandKind = attr_neon_polyvector_type,
3593 FirstEnumOperandKind = attr_objc_gc,
3594 LastEnumOperandKind = attr_pcs_vfp,
3629 ModifiedType(modified), EquivalentType(equivalent) {
3644 bool isMSTypeSpec()
const;
3646 bool isCallingConv()
const;
3655 return attr_nonnull;
3658 return attr_nullable;
3661 return attr_null_unspecified;
3663 llvm_unreachable(
"Unknown nullability kind.");
3678 Profile(ID, getAttrKind(), ModifiedType, EquivalentType);
3683 ID.AddInteger(attrKind);
3695 struct CanonicalTTPTInfo {
3696 unsigned Depth : 15;
3697 unsigned ParameterPack : 1;
3698 unsigned Index : 16;
3710 :
Type(TemplateTypeParm, Canon,
true,
3714 TTPDecl(TTPDecl) { }
3717 TemplateTypeParmType(
unsigned D,
unsigned I,
bool PP)
3718 : Type(TemplateTypeParm,
QualType(this, 0),
3722 CanTTPTInfo.Depth = D;
3723 CanTTPTInfo.Index = I;
3724 CanTTPTInfo.ParameterPack = PP;
3729 const CanonicalTTPTInfo& getCanTTPTInfo()
const {
3735 unsigned getDepth()
const {
return getCanTTPTInfo().Depth; }
3736 unsigned getIndex()
const {
return getCanTTPTInfo().Index; }
3749 Profile(ID, getDepth(), getIndex(), isParameterPack(), getDecl());
3753 unsigned Index,
bool ParameterPack,
3755 ID.AddInteger(Depth);
3756 ID.AddInteger(Index);
3757 ID.AddBoolean(ParameterPack);
3758 ID.AddPointer(TTPDecl);
3802 Profile(ID, getReplacedParameter(), getReplacementType());
3807 ID.AddPointer(Replaced);
3837 unsigned NumArguments;
3858 void Profile(llvm::FoldingSetNodeID &
ID);
3859 static void Profile(llvm::FoldingSetNodeID &
ID,
3878 IsDependent, IsDependent,
3882 assert((DeducedType.
isNull() || !IsDependent) &&
3883 "auto deduced to dependent type");
3905 Profile(ID, getDeducedType(), isDecltypeAuto(),
3910 bool IsDecltypeAuto,
bool IsDependent) {
3912 ID.AddBoolean(IsDecltypeAuto);
3913 ID.AddBoolean(IsDependent);
3942 :
public Type,
public llvm::FoldingSetNode {
3954 unsigned NumArgs : 31;
3972 bool &InstantiationDependent);
3975 bool &InstantiationDependent);
3979 static void PrintTemplateArgumentList(raw_ostream &OS,
3983 bool SkipBrackets =
false);
3985 static void PrintTemplateArgumentList(raw_ostream &OS,
3990 static void PrintTemplateArgumentList(raw_ostream &OS,
4020 assert(isTypeAlias() &&
"not a type alias template specialization");
4021 return *
reinterpret_cast<const QualType*
>(end());
4027 iterator end()
const;
4045 return !
isDependentType() || isCurrentInstantiation() || isTypeAlias();
4050 Profile(ID, Template, getArgs(), NumArgs, Ctx);
4052 getAliasedType().Profile(ID);
4105 Decl(D), InjectedType(TST) {
4106 assert(isa<TemplateSpecializationType>(TST));
4114 return cast<TemplateSpecializationType>(InjectedType.getTypePtr());
4168 QualType Canonical,
bool Dependent,
4169 bool InstantiationDependent,
bool VariablyModified,
4170 bool ContainsUnexpandedParameterPack)
4171 :
Type(tc, Canonical, Dependent, InstantiationDependent, VariablyModified,
4172 ContainsUnexpandedParameterPack) {
4188 static TagTypeKind getTagTypeKindForTypeSpec(
unsigned TypeSpec);
4204 return getKeywordName(getKeywordForTagTypeKind(Kind));
4234 NNS(NNS), NamedType(NamedType) {
4235 assert(!(Keyword ==
ETK_None && NNS ==
nullptr) &&
4236 "ElaboratedType cannot have elaborated type keyword "
4237 "and name qualifier both null.");
4258 Profile(ID, getKeyword(), NNS, NamedType);
4263 ID.AddInteger(Keyword);
4299 NNS(NNS), Name(Name) {}
4321 Profile(ID, getKeyword(), NNS, Name);
4326 ID.AddInteger(Keyword);
4328 ID.AddPointer(Name);
4374 return getArgBuffer();
4384 iterator end()
const;
4390 Profile(ID, Context, getKeyword(), NNS, Name, NumArgs, getArgs());
4393 static void Profile(llvm::FoldingSetNodeID &
ID,
4402 return T->
getTypeClass() == DependentTemplateSpecialization;
4438 unsigned NumExpansions;
4447 NumExpansions(NumExpansions? *NumExpansions + 1: 0) { }
4461 return NumExpansions - 1;
4470 Profile(ID, getPattern(), getNumExpansions());
4476 ID.AddBoolean(NumExpansions.hasValue());
4478 ID.AddInteger(*NumExpansions);
4531 mutable llvm::PointerIntPair<const ObjCObjectType *, 1, bool>
4532 CachedSuperClassType;
4539 const QualType *getTypeArgStorage()
const {
4560 void computeSuperClassTypeSlow()
const;
4572 return getBaseType()->isSpecificBuiltinType(BuiltinType::ObjCId);
4575 return getBaseType()->isSpecificBuiltinType(BuiltinType::ObjCClass);
4580 if (!qual_empty())
return false;
4581 if (
const BuiltinType *T = getBaseType()->getAs<BuiltinType>())
4582 return T->getKind() == BuiltinType::ObjCId ||
4583 T->getKind() == BuiltinType::ObjCClass;
4595 bool isSpecialized()
const;
4635 assert(I < getNumProtocols() &&
"Out-of-range protocol access");
4636 return qual_begin()[I];
4648 bool isKindOfType()
const;
4657 if (!CachedSuperClassType.getInt())
4658 computeSuperClassTypeSlow();
4660 assert(CachedSuperClassType.getInt() &&
"Superclass not set?");
4661 return QualType(CachedSuperClassType.getPointer(), 0);
4691 :
ObjCObjectType(Canonical, Base, typeArgs, protocols, isKindOf) {}
4694 void Profile(llvm::FoldingSetNodeID &
ID);
4695 static void Profile(llvm::FoldingSetNodeID &
ID,
4702 inline QualType *ObjCObjectType::getTypeArgStorage() {
4703 return reinterpret_cast<QualType *
>(
static_cast<ObjCObjectTypeImpl*
>(
this)+1);
4706 inline ObjCProtocolDecl **ObjCObjectType::getProtocolStorage() {
4707 return reinterpret_cast<ObjCProtocolDecl**
>(
4729 Decl(const_cast<ObjCInterfaceDecl*>(D)) {}
4762 return T->getDecl();
4764 baseType = ObjT->getBaseType();
4783 :
Type(ObjCObjectPointer, Canonical,
4788 PointeeType(Pointee) {}
4836 return getObjectType()->getInterface();
4842 return getObjectType()->isObjCUnqualifiedId();
4848 return getObjectType()->isObjCUnqualifiedClass();
4854 return getObjectType()->isObjCUnqualifiedIdOrClass();
4860 return getObjectType()->isObjCQualifiedId();
4866 return getObjectType()->isObjCQualifiedClass();
4877 return getObjectType()->isSpecializedAsWritten();
4889 return getObjectType()->getTypeArgs();
4894 return getObjectType()->getTypeArgsAsWritten();
4905 return getObjectType()->qual_begin();
4908 return getObjectType()->qual_end();
4910 bool qual_empty()
const {
return getObjectType()->qual_empty(); }
4915 return getObjectType()->getNumProtocols();
4921 return getObjectType()->getProtocol(I);
4933 QualType getSuperClassType()
const;
4971 Profile(ID, getValueType());
4992 return type.getTypePtrUnsafe();
4994 const ExtQuals *extQuals = type.getExtQualsUnsafe();
5011 Ty->getLocallyUnqualifiedSingleStepDesugaredType().split();
5017 return getCommonPtr()->BaseType;
5021 return (isNull() ?
nullptr : getCommonPtr()->BaseType);
5025 if (!hasLocalNonFastQualifiers())
5029 const ExtQuals *eq = getExtQualsUnsafe();
5037 if (hasLocalNonFastQualifiers())
5038 Quals = getExtQualsUnsafe()->getQualifiers();
5044 Qualifiers quals = getCommonPtr()->CanonicalType.getLocalQualifiers();
5050 unsigned cvr = getCommonPtr()->CanonicalType.getLocalCVRQualifiers();
5051 cvr |= getLocalCVRQualifiers();
5056 QualType canon = getCommonPtr()->CanonicalType;
5061 return getTypePtr()->isCanonicalUnqualified();
5065 if (!isCanonical())
return false;
5066 if (hasLocalQualifiers())
return false;
5068 const Type *T = getTypePtr();
5072 return !isa<FunctionType>(T) && !isa<ArrayType>(T);
5076 return isLocalConstQualified() ||
5077 getCommonPtr()->CanonicalType.isLocalConstQualified();
5081 return isLocalRestrictQualified() ||
5082 getCommonPtr()->CanonicalType.isLocalRestrictQualified();
5087 return isLocalVolatileQualified() ||
5088 getCommonPtr()->CanonicalType.isLocalVolatileQualified();
5092 return hasLocalQualifiers() ||
5093 getCommonPtr()->CanonicalType.hasLocalQualifiers();
5100 return QualType(getSplitUnqualifiedTypeImpl(*this).Ty, 0);
5107 return getSplitUnqualifiedTypeImpl(*
this);
5127 removeLocalFastQualifiers(Mask);
5132 return getQualifiers().getAddressSpace();
5137 return getQualifiers().getObjCGCAttr();
5143 return FT->getExtInfo();
5145 return FT->getExtInfo();
5170 return getQualifiers().compatiblyIncludes(other.
getQualifiers());
5190 return ((getTypePtr()->
isVoidType() && !hasQualifiers()) ||
5230 return isa<FunctionType>(CanonicalType);
5233 return isa<PointerType>(CanonicalType);
5239 return isa<BlockPointerType>(CanonicalType);
5242 return isa<ReferenceType>(CanonicalType);
5245 return isa<LValueReferenceType>(CanonicalType);
5248 return isa<RValueReferenceType>(CanonicalType);
5252 return T->getPointeeType()->isFunctionType();
5257 return isa<MemberPointerType>(CanonicalType);
5261 return T->isMemberFunctionPointer();
5267 return T->isMemberDataPointer();
5272 return isa<ArrayType>(CanonicalType);
5275 return isa<ConstantArrayType>(CanonicalType);
5278 return isa<IncompleteArrayType>(CanonicalType);
5281 return isa<VariableArrayType>(CanonicalType);
5284 return isa<DependentSizedArrayType>(CanonicalType);
5287 return isa<BuiltinType>(CanonicalType);
5290 return isa<RecordType>(CanonicalType);
5293 return isa<EnumType>(CanonicalType);
5296 return isa<ComplexType>(CanonicalType);
5299 return isa<VectorType>(CanonicalType);
5302 return isa<ExtVectorType>(CanonicalType);
5305 return isa<ObjCObjectPointerType>(CanonicalType);
5308 return isa<ObjCObjectType>(CanonicalType);
5311 return isa<ObjCInterfaceType>(CanonicalType) ||
5312 isa<ObjCObjectType>(CanonicalType);
5315 return isa<AtomicType>(CanonicalType);
5320 return OPT->isObjCQualifiedIdType();
5325 return OPT->isObjCQualifiedClassType();
5330 return OPT->isObjCIdType();
5335 return OPT->isObjCClassType();
5339 if (
const PointerType *OPT = getAs<PointerType>())
5340 return OPT->getPointeeType()->isSpecificBuiltinType(BuiltinType::ObjCSel);
5390 return isa<TemplateTypeParmType>(CanonicalType);
5401 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(
this))
5402 return BT->isPlaceholderType();
5407 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(
this))
5408 if (BT->isPlaceholderType())
5415 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(
this))
5421 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(
this))
5422 return BT->isNonOverloadPlaceholderType();
5427 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
5428 return BT->getKind() == BuiltinType::Void;
5433 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
5434 return BT->getKind() == BuiltinType::Half;
5441 return BT->getKind() == BuiltinType::NullPtr;
5449 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
5450 return BT->getKind() >= BuiltinType::Bool &&
5451 BT->getKind() <= BuiltinType::Int128;
5452 if (
const EnumType *ET = dyn_cast<EnumType>(CanonicalType)) {
5462 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
5463 return BT->getKind() > BuiltinType::Void &&
5464 BT->getKind() <= BuiltinType::NullPtr;
5465 if (
const EnumType *ET = dyn_cast<EnumType>(CanonicalType))
5469 return isa<PointerType>(CanonicalType) ||
5470 isa<BlockPointerType>(CanonicalType) ||
5471 isa<MemberPointerType>(CanonicalType) ||
5472 isa<ComplexType>(CanonicalType) ||
5473 isa<ObjCObjectPointerType>(CanonicalType);
5477 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
5478 return BT->getKind() >= BuiltinType::Bool &&
5479 BT->getKind() <= BuiltinType::Int128;
5483 if (
const EnumType *ET = dyn_cast<EnumType>(CanonicalType))
5490 if (
const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
5491 return BT->getKind() == BuiltinType::Bool;
5523 type = arrayType->getElementType().getTypePtr();
5547 template <typename T, bool isArrayType = (std::is_same<T, ArrayType>::value ||
5548 std::is_base_of<ArrayType, T>::value)>
5551 template<
typename T>
5560 if (
const T *Ty = dyn_cast<T>(
this))
5564 if (!isa<T>(CanonicalType))
5574 if (
const ArrayType *arr = dyn_cast<ArrayType>(
this))
5578 if (!isa<ArrayType>(CanonicalType))
5590 if (
const T *ty = dyn_cast<T>(
this))
return ty;
5591 assert(isa<T>(CanonicalType));
5596 assert(isa<ArrayType>(CanonicalType));
5597 if (
const ArrayType *arr = dyn_cast<ArrayType>(
this))
return arr;
bool isDynamicExceptionSpec(ExceptionSpecificationType ESpecType)
bool isObjCSelType() const
bool isPlaceholderType() const
Internal representation of canonical, dependent typeof(expr) types.
unsigned getNumElements() const
bool hasObjCGCAttr() const
unsigned getAddressSpace() const
getAddressSpace - Return the address space of this type.
const ComplexType * getAsComplexIntegerType() const
bool isUnspecialized() const
bool compatiblyIncludesObjCLifetime(Qualifiers other) const
Determines if these qualifiers compatibly include another set of qualifiers from the narrow perspecti...
void Profile(llvm::FoldingSetNodeID &ID) const
bool isObjCObjectOrInterfaceType() const
QualType getExceptionType(unsigned i) const
Represents a type that was referred to using an elaborated type keyword, e.g., struct S...
SourceLocation getEnd() const
typedefconst::clang::Type * SimpleType
Expr * getSizeExpr() const
QualType getUnderlyingType() const
Qualifiers getLocalQualifiers() const
Retrieve the set of qualifiers local to this particular QualType instance, not including any qualifie...
const Type * Ty
The locally-unqualified type.
ObjCInterfaceDecl * getDecl() const
getDecl - Get the declaration of this interface.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Ctx)
Qualifiers getNonFastQualifiers() const
static bool classof(const Type *T)
bool isNullPtrType() const
The "enum" keyword introduces the elaborated-type-specifier.
bool containsUnexpandedParameterPack() const
Whether this nested-name-specifier contains an unexpanded parameter pack (for C++11 variadic template...
unsigned getDepth() const
void setDependent(bool D=true)
no exception specification
bool canDecayToPointerType() const
Determines whether this type can decay to a pointer type.
bool isNonOverloadPlaceholderType() const
void Profile(llvm::FoldingSetNodeID &ID)
Represents the dependent type named by a dependently-scoped typename using declaration, e.g. using typename Base<T>::foo; Template instantiation turns these into the underlying type.
bool isAtLeastAsQualifiedAs(QualType Other) const
Determine whether this type is at least as qualified as the other given type, requiring exact equalit...
bool isConstantArrayType() const
const TemplateArgument * iterator
static void Profile(llvm::FoldingSetNodeID &ID, QualType Pointee)
ExtProtoInfo(CallingConv CC)
SourceRange getBracketsRange() const
bool isCanonicalUnqualified() const
bool isSpecificBuiltinType(unsigned K) const
isSpecificBuiltinType - Test for a particular builtin type.
bool operator==(Qualifiers Other) const
bool hasFloatingRepresentation() const
Determine whether this type has a floating-point representation of some sort, e.g., it is a floating-point type or a vector thereof.
ExtInfo withCallingConv(CallingConv cc) const
ArrayRef< QualType > getTypeArgs() const
Retrieve the type arguments for this type.
DestructionKind isDestructedType() const
bool isMemberPointerType() const
FunctionDecl * getExceptionSpecDecl() const
If this function type has an exception specification which hasn't been determined yet (either because...
bool isKindOfTypeAsWritten() const
Whether this is a "__kindof" type as written.
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
unsigned getFastQualifiers() const
QualType getNonLValueExprType(const ASTContext &Context) const
Determine the type of a (typically non-lvalue) expression with the specified result type...
Qualifiers::ObjCLifetime getObjCARCImplicitLifetime() const
Return the implicit lifetime for this type, which must not be dependent.
bool IsEnumDeclScoped(EnumDecl *ED)
Check if the given decl is scoped.
void setInstantiationDependent(bool D=true)
NullabilityKind
Describes the nullability of a particular type.
bool isAnyCharacterType() const
Determine whether this type is any of the built-in character types.
bool isLocalRestrictQualified() const
Determine whether this particular QualType instance has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.
unsigned getNumArgs() const
Retrieve the number of template arguments.
static void Profile(llvm::FoldingSetNodeID &ID, Kind attrKind, QualType modified, QualType equivalent)
void Profile(llvm::FoldingSetNodeID &ID)
bool canHaveNullability() const
static void Profile(llvm::FoldingSetNodeID &ID, QualType Inner)
No linkage, which means that the entity is unique and can only be referred to from within its scope...
void Profile(llvm::FoldingSetNodeID &ID)
void addConst()
addConst - add the specified type qualifier to this QualType.
Qualifiers::GC getObjCGCAttr() const
getObjCGCAttr - Returns gc attribute of this type.
Represents a qualified type name for which the type name is dependent.
CanonicalTTPTInfo CanTTPTInfo
void setObjCLifetime(ObjCLifetime type)
friend Qualifiers operator-(Qualifiers L, Qualifiers R)
Compute the difference between two qualifier sets.
ConstantArrayType(TypeClass tc, QualType et, QualType can, const llvm::APInt &size, ArraySizeModifier sm, unsigned tq)
ArrayRef< ObjCProtocolDecl * > getProtocols() const
Retrieve all of the protocol qualifiers.
static bool classof(const Type *T)
static bool classof(const Type *T)
static std::string getAsString(SplitQualType split)
bool isRecordType() const
static void Profile(llvm::FoldingSetNodeID &ID, QualType T)
bool isChar16Type() const
ObjCObjectTypeBitfields ObjCObjectTypeBits
bool isLiteralType(const ASTContext &Ctx) const
AutoType * getContainedAutoType() const
Get the AutoType whose type will be deduced for a variable with an initializer of this type...
bool isVoidPointerType() const
Represents a C++11 auto or C++1y decltype(auto) type.
bool isObjCQualifiedId() const
bool isEnumeralType() const
void Profile(llvm::FoldingSetNodeID &ID) const
void removeQualifiers(Qualifiers Q)
Remove the qualifiers from the given set from this set.
static bool classof(const Type *T)
std::string getAsString() const
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
QualType getPointeeType() const
ObjCObjectType(enum Nonce_ObjCInterface)
bool isObjCQualifiedClassType() const
bool isElaboratedTypeSpecifier() const
Determine wither this type is a C++ elaborated-type-specifier.
unsigned getCVRQualifiers() const
Retrieve the set of CVR (const-volatile-restrict) qualifiers applied to this type.
void setObjCGCAttr(GC type)
void Profile(llvm::FoldingSetNodeID &ID)
const ObjCObjectType * getObjectType() const
AdjustedType(TypeClass TC, QualType OriginalTy, QualType AdjustedTy, QualType CanonicalPtr)
static bool classof(const Type *T)
void Profile(llvm::FoldingSetNodeID &ID)
bool isDecltypeAuto() const
bool isBooleanType() const
static clang::QualType getFromVoidPointer(void *P)
bool compatiblyIncludes(Qualifiers other) const
Determines if these qualifiers compatibly include another set. Generally this answers the question of...
QualType ElementType
ElementType - The element type of the vector.
RefQualifierKind RefQualifier
const QualType * param_type_iterator
unsigned getIndex() const
bool getHasRegParm() const
bool isBlockPointerType() const
const ObjCObjectPointerType * getAsObjCQualifiedClassType() const
bool isCForbiddenLValueType() const
Determine whether expressions of the given type are forbidden from being lvalues in C...
bool isUnspecialized() const
Whether this type is unspecialized, meaning that is has no type arguments.
Qualifiers & operator+=(Qualifiers R)
bool isSpelledAsLValue() const
static inline::clang::ExtQuals * getFromVoidPointer(void *P)
static void Profile(llvm::FoldingSetNodeID &ID, QualType ET, const llvm::APInt &ArraySize, ArraySizeModifier SizeMod, unsigned TypeQuals)
bool hasUnsignedIntegerRepresentation() const
Determine whether this type has an unsigned integer representation of some sort, e.g., it is an unsigned integer type or a vector.
bool hasStrongOrWeakObjCLifetime() const
True if the lifetime is either strong or weak.
const llvm::APInt & getSize() const
void * getAsOpaquePtr() const
static Qualifiers fromOpaqueValue(unsigned opaque)
The noexcept specifier has a bad expression.
void removeObjCLifetime()
ObjCLifetime getObjCLifetime() const
ExtProtoInfo - Extra information about a function prototype.
CallingConv getCallConv() const
std::string getAsString() const
Qualifiers::ObjCLifetime getObjCLifetime() const
ArrayTypeBitfields ArrayTypeBits
bool isSpecialized() const
Whether this type is specialized, meaning that it has type arguments.
The "__interface" keyword.
TemplateTypeParmDecl * getDecl() const
bool hasAnyConsumedParams() const
void addAddressSpace(unsigned space)
QualType getOriginalType() const
bool isMemberDataPointerType() const
static Qualifiers fromFastMask(unsigned Mask)
static StringRef getTagTypeKindName(TagTypeKind Kind)
QualType(const Type *Ptr, unsigned Quals)
Describes how types, statements, expressions, and declarations should be printed. ...
void getAsStringInternal(std::string &Str, const PrintingPolicy &Policy) const
const BuiltinType * getAsPlaceholderType() const
Qualifiers getIndexTypeQualifiers() const
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
bool isObjCRetainableType() const
Represents the result of substituting a type for a template type parameter.
void Profile(llvm::FoldingSetNodeID &ID)
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have...
unsigned getNumArgs() const
Retrieve the number of template arguments.
const Type * getUnqualifiedDesugaredType() const
bool isNoexceptExceptionSpec(ExceptionSpecificationType ESpecType)
static int getAccessorIdx(char c)
void AddTaggedVal(intptr_t V, DiagnosticsEngine::ArgumentKind Kind) const
void Profile(llvm::FoldingSetNodeID &ID)
bool operator==(ExtInfo Other) const
QualType getPointeeType() const
unsigned getNumParams() const
Visibility getVisibility() const
bool isOpenCLSpecificType() const
DependentTypeOfExprType(const ASTContext &Context, Expr *E)
const IdentifierInfo * getIdentifier() const
Retrieve the type named by the typename specifier as an identifier.
QualType getElementType() const
FunctionType::ExtInfo ExtInfo
unsigned getIndexTypeCVRQualifiers() const
ExtInfo withProducesResult(bool producesResult) const
bool isScalarType() const
Defines the Linkage enumeration and various utility functions.
const TemplateArgument * iterator
bool hasObjCPointerRepresentation() const
TagDecl * getAsTagDecl() const
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is...
Expr * getSizeExpr() const
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ArrayRef< QualType > getParamTypes() const
bool isObjCARCImplicitlyUnretainedType() const
static bool classof(const Type *T)
bool isReferenceType() const
bool isStructureOrClassType() const
bool isAnyPointerType() const
Defines the ExceptionSpecificationType enumeration and various utility functions. ...
bool isSugared() const
Returns whether this type directly provides sugar.
NoexceptResult
Result type of getNoexceptSpec().
void Profile(llvm::FoldingSetNodeID &ID)
static bool classof(const Type *T)
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
void setLocalFastQualifiers(unsigned Quals)
bool isChar32Type() const
const CXXRecordDecl * getPointeeCXXRecordDecl() const
ObjCObjectType::qual_iterator qual_iterator
Base class that is common to both the ExtQuals and Type classes, which allows QualType to access the ...
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
unsigned getCVRQualifiers() const
static bool classof(const Type *T)
static bool classof(const Type *T)
Represents the result of substituting a set of types for a template type parameter pack...
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments for this type.
ObjCProtocolDecl *const * qual_iterator
const RecordType * getAsUnionType() const
NOTE: getAs*ArrayType are methods on ASTContext.
bool isLocalVolatileQualified() const
Determine whether this particular QualType instance has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.
static void Profile(llvm::FoldingSetNodeID &ID, QualType ElementType, unsigned NumElements, TypeClass TypeClass, VectorKind VecKind)
static int getPointAccessorIdx(char c)
unsigned getAsOpaqueValue() const
static unsigned getNumAddressingBits(ASTContext &Context, QualType ElementType, const llvm::APInt &NumElements)
Determine the number of bits required to address a member of.
ObjCProtocolDecl * getProtocol(unsigned I) const
Retrieve a qualifying protocol by index on the object type.
unsigned getRegParm() const
bool hasStrongOrWeakObjCLifetime() const
static void Profile(llvm::FoldingSetNodeID &ID, QualType Referencee, bool SpelledAsLValue)
bool isParamConsumed(unsigned I) const
StreamedQualTypeHelper(const QualType &T, const PrintingPolicy &Policy, const Twine &PlaceHolder)
QualType getUnderlyingType() const
ReferenceType(TypeClass tc, QualType Referencee, QualType CanonicalRef, bool SpelledAsLValue)
Expr * getUnderlyingExpr() const
FunctionType(TypeClass tc, QualType res, QualType Canonical, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack, ExtInfo Info)
Values of this type can be null.
void addRestrict()
Add the restrict qualifier to this QualType.
const Type & operator*() const
static bool classof(const Type *T)
unsigned getRegParmType() const
Type(TypeClass tc, QualType canon, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack)
bool isIntegralOrUnscopedEnumerationType() const
Determine whether this type is an integral or unscoped enumeration type.
QualType getCallResultType(ASTContext &Context) const
Determine the type of an expression that calls a function of this type.
bool hasNonFastQualifiers() const
static bool classof(const Type *T)
param_type_range param_types() const
static bool classof(const Type *T)
An lvalue ref-qualifier was provided (&).
bool isSpecificPlaceholderType(unsigned K) const
isSpecificPlaceholderType - Test for a specific placeholder type.
void addObjCGCAttr(GC type)
bool isFundamentalType() const
Tests whether the type is categorized as a fundamental type.
Qualifiers withoutObjCGCAttr() const
void setRestrict(bool flag)
static bool classof(const Type *T)
LinkageInfo getLinkageAndVisibility() const
Determine the linkage and visibility of this type.
QualType getBaseType() const
static void dump(llvm::raw_ostream &OS, StringRef FunctionName, ArrayRef< CounterExpression > Expressions, ArrayRef< CounterMappingRegion > Regions)
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
QualType getReturnType() const
The "struct" keyword introduces the elaborated-type-specifier.
UnresolvedUsingTypenameDecl * getDecl() const
TypeWithKeyword(ElaboratedTypeKeyword Keyword, TypeClass tc, QualType Canonical, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack)
Visibility
Describes the different kinds of visibility that a declaration may have.
SplitQualType getSplitUnqualifiedType() const
bool isObjCLifetimeType() const
TypeOfExprType (GCC extension).
void addCVRQualifiers(unsigned mask)
Expr * getNoexceptExpr() const
unsigned getNumProtocols() const
RecordDecl * getDecl() const
QualType withoutLocalFastQualifiers() const
ObjCInterfaceDecl * getInterface() const
bool isUnsignedIntegerType() const
void Profile(llvm::FoldingSetNodeID &ID)
const ObjCObjectType * getAsObjCInterfaceType() const
Values of this type can never be null.
static Qualifiers removeCommonQualifiers(Qualifiers &L, Qualifiers &R)
Returns the common set of qualifiers while removing them from the given sets.
static bool classof(const Type *T)
TemplateTypeParmDecl * TTPDecl
void addQualifiers(Qualifiers Q)
Add the qualifiers from the given set to this set.
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
TypeClass getTypeClass() const
bool isStructureType() const
Represents an Objective-C protocol declaration.
bool isObjCIndependentClassType() const
bool isIncompleteType(NamedDecl **Def=nullptr) const
Def If non-NULL, and the type refers to some kind of declaration that can be completed (such as a C s...
QualType withVolatile() const
static bool classof(const Type *T)
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool appendSpaceIfNonEmpty=false) const
const TemplateSpecializationType * getInjectedTST() const
friend Qualifiers operator+(Qualifiers L, Qualifiers R)
Represents an ObjC class declaration.
bool isExtVectorType() const
static void * getAsVoidPointer(clang::QualType P)
friend bool operator==(const QualType &LHS, const QualType &RHS)
QualType getAliasedType() const
FunctionDecl * SourceDecl
bool operator!=(ExtInfo Other) const
bool isFromAST() const
Whether this type comes from an AST file.
QualType getCanonicalTypeInternal() const
void setFastQualifiers(unsigned mask)
static void Profile(llvm::FoldingSetNodeID &ID, const TemplateTypeParmType *Replaced, QualType Replacement)
bool isMemberFunctionPointer() const
ObjCProtocolDecl * getProtocol(unsigned I) const
Fetch a protocol by index.
const TemplateTypeParmType * getReplacedParameter() const
Gets the template parameter that was substituted for.
bool isLinkageValid() const
True if the computed linkage is valid. Used for consistency checking. Should always return true...
Defines the clang::Visibility enumeration and various utility functions.
static void Profile(llvm::FoldingSetNodeID &ID, ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name)
static bool classof(const Type *T)
const ArrayType * getAsArrayTypeUnsafe() const
EnumDecl * getDecl() const
Provides definitions for the various language-specific address spaces.
void Profile(llvm::FoldingSetNodeID &ID)
llvm::iterator_range< qual_iterator > qual_range
QualType getValueType() const
QualType getInjectedSpecializationType() const
bool isObjCUnqualifiedId() const
const Type * getBaseType() const
ExtInfo getExtInfo() const
const ArrayType * castAsArrayTypeUnsafe() const
void Profile(llvm::FoldingSetNodeID &ID)
A little helper class used to produce diagnostics.
CanQualType getCanonicalTypeUnqualified() const
ExtQuals(const Type *baseType, QualType canon, Qualifiers quals)
Optional< ArrayRef< QualType > > getObjCSubstitutions(const DeclContext *dc) const
QualType getParamType(unsigned i) const
ExceptionSpecificationType getExceptionSpecType() const
Get the kind of exception specification on this function.
bool isFloatingPoint() const
const Type * operator->() const
qual_iterator qual_end() const
Qualifiers::ObjCLifetime getObjCLifetime() const
getObjCLifetime - Returns lifetime attribute of this type.
param_type_iterator param_type_begin() const
bool isUnspecializedAsWritten() const
void addObjCLifetime(ObjCLifetime type)
ID
Defines the set of possible language-specific address spaces.
bool isMoreQualifiedThan(QualType Other) const
Determine whether this type is more qualified than the other given type, requiring exact equality for...
bool hasFastQualifiers() const
QualType getPointeeType() const
bool isFunctionPointerType() const
void Profile(llvm::FoldingSetNodeID &ID)
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
bool hasSizedVLAType() const
Whether this type involves a variable-length array type with a definite size.
bool isRealFloatingType() const
Floating point categories.
static void * getAsVoidPointer(::clang::ExtQuals *P)
bool isSignedInteger() const
bool isKindOfType() const
Whether this is a "__kindof" type.
bool isSignedIntegerOrEnumerationType() const
static bool classof(const Type *T)
RecordType(TypeClass TC, RecordDecl *D)
SplitQualType split() const
static bool classof(const Type *T)
const Type * getTypePtrOrNull() const
Qualifiers::GC getObjCGCAttr() const
QualType getSuperClassType() const
QualType getPointeeType() const
bool isUndeducedType() const
Determine whether this type is an undeduced type, meaning that it somehow involves a C++11 'auto' typ...
static void getAsStringInternal(SplitQualType split, std::string &out, const PrintingPolicy &policy)
static bool classof(const Type *T)
The "typename" keyword precedes the qualified type name, e.g., typename T::type.
static unsigned getMaxSizeBits(ASTContext &Context)
Determine the maximum number of active bits that an array's size can require, which limits the maximu...
QualType desugar() const
Remove a single level of sugar.
bool isAnyComplexType() const
static Kind getNullabilityAttrKind(NullabilityKind kind)
bool isObjCClassType() const
Declaration of a template type parameter.
Internal representation of canonical, dependent decltype(expr) types.
bool hasObjCGCAttr() const
bool hasCVRQualifiers() const
friend bool operator!=(const QualType &LHS, const QualType &RHS)
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
bool isLocalConstQualified() const
Determine whether this particular QualType instance has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.
bool isAtomicType() const
bool isUnsignedInteger() const
void Profile(llvm::FoldingSetNodeID &ID)
void setAddressSpace(unsigned space)
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
bool isObjCGCWeak() const
isObjCGCWeak true when Type is objc's weak.
static void print(SplitQualType split, raw_ostream &OS, const PrintingPolicy &policy, const Twine &PlaceHolder)
llvm::iterator_range< param_type_iterator > param_type_range
Expr * getUnderlyingExpr() const
bool isVariableArrayType() const
bool hasObjCLifetime() const
QualType getNamedType() const
Retrieve the type named by the qualified-id.
ExtProtoInfo getExtProtoInfo() const
ExtProtoInfo withExceptionSpec(const ExceptionSpecInfo &O)
static bool classof(const Type *T)
void removeFastQualifiers(unsigned mask)
void Profile(llvm::FoldingSetNodeID &ID)
bool isFloatingType() const
void Profile(llvm::FoldingSetNodeID &ID)
ArrayType(TypeClass tc, QualType et, QualType can, ArraySizeModifier sm, unsigned tq, bool ContainsUnexpandedParameterPack)
Represents a C++ template name within the type system.
const bool * ConsumedParameters
void removeLocalVolatile()
bool isFunctionNoProtoType() const
unsigned getTypeQuals() const
QualType getDesugaredType(const ASTContext &Context) const
There is no noexcept specifier.
bool isObjCIdType() const
static inline::clang::Type * getFromVoidPointer(void *P)
SourceLocation getAttributeLoc() const
void print(raw_ostream &OS, const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine()) const
bool isDependentType() const
static bool classof(const Type *T)
bool hasTrailingReturn() const
Qualifiers Quals
The local qualifiers.
bool isObjCQualifiedIdType() const
static bool classof(const Type *T)
SourceLocation getRBracketLoc() const
The width of the "fast" qualifier mask.
QualType withFastQualifiers(unsigned TQs) const
llvm::iterator_range< qual_iterator > qual_range
QualType getElementType() const
bool isStrictSupersetOf(Qualifiers Other) const
Determine whether this set of qualifiers is a strict superset of another set of qualifiers, not considering qualifier compatibility.
bool isComplexIntegerType() const
The result type of a method or function.
static bool classof(const Type *T)
void removeLocalCVRQualifiers(unsigned Mask)
unsigned getLocalCVRQualifiers() const
Retrieve the set of CVR (const-volatile-restrict) qualifiers local to this particular QualType instan...
bool IsEnumDeclComplete(EnumDecl *ED)
Check if the given decl is complete.
bool isUnsignedIntegerOrEnumerationType() const
void removeCVRQualifiers(unsigned mask)
QualType getReplacementType() const
CallingConv
CallingConv - Specifies the calling convention that a function uses.
bool isTemplateTypeParmType() const
bool isObjectType() const
Determine whether this type is an object type.
bool hasObjCLifetime() const
bool isEmptyWhenPrinted(const PrintingPolicy &Policy) const
SourceRange getBracketsRange() const
bool hasUnnamedOrLocalType() const
Whether this type is or contains a local or unnamed type.
static void Profile(llvm::FoldingSetNodeID &ID, QualType Pointee)
unsigned getLocalFastQualifiers() const
bool getNoReturnAttr() const
Determine whether this function type includes the GNU noreturn attribute. The C++11 [[noreturn]] attr...
static void Profile(llvm::FoldingSetNodeID &ID, ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType)
const TemplateTypeParmType * getReplacedParameter() const
Gets the template parameter that was substituted for.
bool isDependentSizedArrayType() const
const IdentifierInfo * getIdentifier() const
CXXRecordDecl * getMostRecentCXXRecordDecl() const
There is no lifetime qualification on this type.
exception_iterator exception_begin() const
ExtInfo withRegParm(unsigned RegParm) const
bool hasNoexceptExceptionSpec() const
Return whether this function has a noexcept exception spec.
static void Profile(llvm::FoldingSetNodeID &ID, QualType ResultType, ExtInfo Info)
bool isIntegralOrEnumerationType() const
Determine whether this type is an integral or enumeration type.
ExceptionSpecificationType Type
The kind of exception specification this is.
static bool classof(const Type *T)
static bool classof(const Type *T)
void setVolatile(bool flag)
const char * getNameAsCString(const PrintingPolicy &Policy) const
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
bool hasIntegerRepresentation() const
Determine whether this type has an integer representation of some sort, e.g., it is an integer type o...
void addVolatile()
addVolatile - add the specified type qualifier to this QualType.
bool isObjCIdOrClassType() const
const Type * getTypePtr() const
Visibility getVisibility() const
Determine the visibility of this type.
QualType getElementType() const
QualType withCVRQualifiers(unsigned CVR) const
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this function type.
SourceLocation getLBracketLoc() const
TypeOfType (GCC extension).
static bool classof(const Type *T)
bool isComplexType() const
bool isBuiltinType() const
isBuiltinType - returns true if the type is a builtin type.
bool isConstant(ASTContext &Ctx) const
static bool classof(const Type *T)
TagDecl - Represents the declaration of a struct/union/class/enum.
bool isConstantSizeType() const
static bool isPlaceholderTypeKind(Kind K)
Determines whether the given kind corresponds to a placeholder type.
static bool classof(const Type *T)
void Profile(llvm::FoldingSetNodeID &ID)
static QualType getUnderlyingType(const SubRegion *R)
bool isObjCUnqualifiedIdOrClass() const
static void Profile(llvm::FoldingSetNodeID &ID, QualType T)
VectorKind getVectorKind() const
unsigned getAddressSpace() const
QualType withConst() const
bool isObjCBuiltinType() const
bool isObjCClassOrClassKindOfType() const
bool isVisibilityExplicit() const
Return true if the visibility was explicitly set is the code.
void Profile(llvm::FoldingSetNodeID &ID)
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
static void Profile(llvm::FoldingSetNodeID &ID, const Type *BaseType, Qualifiers Quals)
No ref-qualifier was provided.
ExtInfo withNoReturn(bool noReturn) const
void AddTaggedVal(intptr_t V, DiagnosticsEngine::ArgumentKind Kind) const
const Type * getArrayElementTypeNoTypeQual() const
bool isObjCBoxableRecordType() const
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
FunctionDecl * getExceptionSpecTemplate() const
If this function type has an uninstantiated exception specification, this is the function whose excep...
bool hasConstFields() const
AttributedTypeBitfields AttributedTypeBits
SplitQualType getSplitDesugaredType() const
ExceptionSpecInfo(ExceptionSpecificationType EST)
const Type * getBaseElementTypeUnsafe() const
bool acceptsObjCTypeParams() const
bool isSpecializedAsWritten() const
Determine whether this object type was written with type arguments.
qual_iterator qual_begin() const
RefQualifierKind
The kind of C++0x ref-qualifier associated with a function type, which determines whether a member fu...
bool isMemberDataPointer() const
TypedefNameDecl * getDecl() const
unsigned getNumProtocols() const
bool isObjCQualifiedClassType() const
SourceLocation getBegin() const
static bool classof(const Type *T)
qual_iterator qual_begin() const
Qualifiers & operator-=(Qualifiers R)
bool isVectorType() const
static bool isVectorSizeTooLarge(unsigned NumElements)
bool isPromotableIntegerType() const
More type predicates useful for type checking/promotion.
bool isMemberFunctionPointerType() const
An rvalue ref-qualifier was provided (&&).
Assigning into this object requires a lifetime extension.
void addFastQualifiers(unsigned TQs)
bool isVolatileQualified() const
Determine whether this type is volatile-qualified.
static QualType getFromOpaquePtr(const void *Ptr)
void setVariablyModified(bool VM=true)
bool isAccessorWithinNumElements(char c) const
bool isImage1dArrayT() const
void Profile(llvm::FoldingSetNodeID &ID)
bool isObjCQualifiedClass() const
Represents a pointer type decayed from an array or function type.
bool isFunctionProtoType() const
The injected class name of a C++ class template or class template partial specialization. Used to record that a type was spelled with a bare identifier rather than as a template-id; the equivalent for non-templated classes is just RecordType.
QualType getPointeeType() const
Represents a pack expansion of types.
ArrayRef< QualType > getTypeArgsAsWritten() const
Defines various enumerations that describe declaration and type specifiers.
Expr * getSizeExpr() const
const char * getTypeClassName() const
Base class for declarations which introduce a typedef-name.
friend bool operator!=(SplitQualType a, SplitQualType b)
Represents a template argument.
static bool classof(const Type *T)
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons...
TagTypeKind
The kind of a tag type.
not evaluated yet, for special member function
A qualifier set is used to build a set of qualifiers.
Qualifiers withoutObjCLifetime() const
bool isAggregateType() const
Determines whether the type is a C++ aggregate type or C aggregate or union type. ...
void setContainsUnexpandedParameterPack(bool PP=true)
static bool classof(const Type *T)
TypeWithKeywordBitfields TypeWithKeywordBits
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
void removeLocalFastQualifiers()
bool hasLocalNonFastQualifiers() const
Determine whether this particular QualType instance has any "non-fast" qualifiers, e.g., those that are stored in an ExtQualType instance.
static bool classof(const Type *T)
static bool classof(const Type *T)
static void Profile(llvm::FoldingSetNodeID &ID, QualType Deduced, bool IsDecltypeAuto, bool IsDependent)
QualType IgnoreParens() const
Reads an AST files chain containing the contents of a translation unit.
bool getProducesResult() const
bool hasNonTrivialObjCLifetime() const
True if the lifetime is neither None or ExplicitNone.
TypedefType(TypeClass tc, const TypedefNameDecl *D, QualType can)
QualType getEquivalentType() const
bool isParameterPack() const
bool isStandardLayoutType() const
Test if this type is a standard-layout type. (C++0x [basic.type]p9)
Represents a dependent using declaration which was marked with typename.
The "union" keyword introduces the elaborated-type-specifier.
CallingConv getCC() const
const Type * strip(QualType type)
void Profile(llvm::FoldingSetNodeID &ID)
param_type_iterator param_type_end() const
The "class" keyword introduces the elaborated-type-specifier.
friend raw_ostream & operator<<(raw_ostream &OS, const StreamedQualTypeHelper &SQT)
ReferenceTypeBitfields ReferenceTypeBits
FunctionType::ExtInfo getFunctionExtInfo(const Type &t)
void Profile(llvm::FoldingSetNodeID &ID)
QualType(const ExtQuals *Ptr, unsigned Quals)
QualType getModifiedType() const
void setCVRQualifiers(unsigned mask)
static void Profile(llvm::FoldingSetNodeID &ID, QualType Orig, QualType New)
bool isLValueReferenceType() const
static void Profile(llvm::FoldingSetNodeID &ID, QualType Pattern, Optional< unsigned > NumExpansions)
bool isCanonicalAsParam() const
bool isCurrentInstantiation() const
void Profile(llvm::FoldingSetNodeID &ID)
static bool classof(const Type *T)
void addConsistentQualifiers(Qualifiers qs)
Add the qualifiers from the given set to this set, given that they don't conflict.
const RecordType * getAsStructureType() const
bool isWideCharType() const
Defines the Diagnostic-related interfaces.
bool isRValueReferenceType() const
bool isVisibilityExplicit() const
void removeCVRQualifiers()
QualType getPointeeType() const
QualType getNonReferenceType() const
static bool classof(const Type *T)
bool isObjCObjectType() const
bool operator!=(Qualifiers Other) const
FunctionTypeBitfields FunctionTypeBits
QualType getLocalUnqualifiedType() const
Return this type with all of the instance-specific qualifiers removed, but without removing any quali...
FunctionDecl * SourceTemplate
const QualType * exception_iterator
const TemplateArgument * getArgs() const
Retrieve the template arguments.
qual_iterator qual_end() const
static bool classof(const Type *T)
static bool classof(const Type *T)
bool isObjCNSObjectType() const
QualType withExactLocalFastQualifiers(unsigned TQs) const
AutoTypeBitfields AutoTypeBits
unsigned getTypeQuals() const
bool isAddressSpaceOverlapping(const PointerType &other) const
Returns true if address spaces of pointers overlap. OpenCL v2.0 defines conversion rules for pointers...
QualType getCanonicalType() const
static bool classof(const Type *T)
bool isSpecifierType() const
ObjCInterfaceDecl * getInterfaceDecl() const
const ObjCObjectType * getAsObjCQualifiedInterfaceType() const
void Profile(llvm::FoldingSetNodeID &ID)
static bool classof(const Type *T)
bool isObjCQualifiedIdType() const
VectorTypeBitfields VectorTypeBits
static bool classof(const Type *T)
bool isFunctionType() const
QualType getInnerType() const
const TemplateArgument * getArgs() const
Retrieve the template arguments.
The noexcept specifier evaluates to false.
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
QualType desugar() const
Remove a single level of sugar.
unsigned getAddressSpace() const
ExtInfo(bool noReturn, bool hasRegParm, unsigned regParm, CallingConv cc, bool producesResult)
QualType withRestrict() const
bool isRestrictQualified() const
Determine whether this type is restrict-qualified.
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
static bool classof(const Type *T)
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream...
NestedNameSpecifier * getQualifier() const
QualType getPointeeType() const
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Linkage getLinkage() const
Determine the linkage of this type.
bool hasNonTrivialObjCLifetime() const
bool isObjCGCStrong() const
isObjCGCStrong true when Type is objc's strong.
const Type * getClass() const
Reading or writing from this object requires a barrier call.
Expr * NoexceptExpr
Noexcept expression, if this is EST_ComputedNoexcept.
static void Profile(llvm::FoldingSetNodeID &ID, QualType Pointee, const Type *Class)
bool hasAddressSpace() const
bool isBlockCompatibleObjCPointerType(ASTContext &ctx) const
bool isObjCClassType() const
bool isCARCBridgableType() const
Determine whether the given type T is a "bridgeable" C type.
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
std::pair< const Type *, Qualifiers > asPair() const
Represents a C++ struct/union/class.
void removeLocalRestrict()
bool hasQualifiers() const
hasQualifiers - Return true if the set contains any qualifiers.
bool isObjCObjectPointerType() const
bool isPlaceholderType() const
static bool classof(const Type *T)
bool isObjCUnqualifiedClass() const
SplitQualType(const Type *ty, Qualifiers qs)
void removeFastQualifiers()
bool isImage2dArrayT() const
bool isCompoundType() const
Tests whether the type is categorized as a compound type.
The parameter type of a method or function.
ArraySizeModifier getSizeModifier() const
ElaboratedTypeKeyword getKeyword() const
bool hasDynamicExceptionSpec() const
Return whether this function has a dynamic (throw) exception spec.
bool isOverloadableType() const
Determines whether this is a type for which one can define an overloaded operator.
void Profile(llvm::FoldingSetNodeID &ID)
unsigned kind
All of the diagnostics that can be emitted by the frontend.
bool isImage1dBufferT() const
exception_iterator exception_end() const
Writes an AST file containing the contents of a translation unit.
SourceLocation getLBracketLoc() const
QualType getAdjustedType() const
void Profile(llvm::FoldingSetNodeID &ID)
static bool classof(const Type *T)
void removeLocalFastQualifiers(unsigned Mask)
QualType getPattern() const
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated w...
bool isSpecializedAsWritten() const
Whether this type is specialized, meaning that it has type arguments.
QualType getDecayedType() const
static Qualifiers fromCVRMask(unsigned CVR)
QualType getPointeeTypeAsWritten() const
bool getHasRegParm() const
TagDecl * getDecl() const
bool isObjCIndirectLifetimeType() const
bool isIncompleteArrayType() const
SourceLocation getRBracketLoc() const
Qualifiers getQualifiers() const
void Profile(llvm::FoldingSetNodeID &ID) const
Represents a type template specialization; the template must be a class template, a type alias templa...
QualType getElementType() const
static void Profile(llvm::FoldingSetNodeID &ID, QualType Element)
bool hasQualifiers() const
Determine whether this type has any qualifiers.
SplitQualType getSingleStepDesugaredType() const
RecordType(const RecordDecl *D)
bool hasExceptionSpec() const
Return whether this function has any kind of exception spec.
static void Profile(llvm::FoldingSetNodeID &ID, QualType ET, ArraySizeModifier SizeMod, unsigned TypeQuals)
static SimpleType getSimplifiedValue(::clang::QualType Val)
IdentifierInfo * getIdentifier() const
static StringRef getNameForCallConv(CallingConv CC)
bool isObjCARCBridgableType() const
Determine whether the given type T is a "bridgable" Objective-C type, which is either an Objective-C ...
BuiltinTypeBitfields BuiltinTypeBits
static int getNumericAccessorIdx(char c)
bool isInterfaceType() const
A trivial tuple used to represent a source range.
VectorType(QualType vecType, unsigned nElements, QualType canonType, VectorKind vecKind)
static void * getAsVoidPointer(::clang::Type *P)
bool isNonOverloadPlaceholderType() const
void addFastQualifiers(unsigned mask)
StringRef getName(const PrintingPolicy &Policy) const
bool isObjCIdOrObjectKindOfType(const ASTContext &ctx, const ObjCObjectType *&bound) const
bool isArithmeticType() const
No keyword precedes the qualified type name.
bool isSignedIntegerType() const
void Profile(llvm::FoldingSetNodeID &ID)
bool isConstQualified() const
Determine whether this type is const-qualified.
bool hasSignedIntegerRepresentation() const
Determine whether this type has an signed integer representation of some sort, e.g., it is an signed integer type or a vector.
bool isUnspecializedAsWritten() const
bool isNull() const
isNull - Return true if this QualType doesn't point to a type yet.
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context)
const ObjCObjectPointerType * getAsObjCInterfacePointerType() const
friend bool operator==(SplitQualType a, SplitQualType b)
bool isObjCIdType() const
The noexcept specifier is dependent.
bool isSugared() const
Returns whether this type directly provides sugar.
static void Profile(llvm::FoldingSetNodeID &ID, UnresolvedUsingTypenameDecl *D)
void removeAddressSpace()
Optional< NullabilityKind > getNullability(const ASTContext &context) const
QualType getSingleStepDesugaredType(const ASTContext &Context) const
Return the specified type with one level of "sugar" removed from the type.
QualifierCollector(Qualifiers Qs=Qualifiers())
The "__interface" keyword introduces the elaborated-type-specifier.
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
ArrayRef< QualType > exceptions() const
The superclass of a type.
bool isIntegralType(ASTContext &Ctx) const
Determine whether this type is an integral type.
ExceptionSpecInfo ExceptionSpec
static bool classof(const Type *T)
bool isObjCQualifiedInterfaceType() const
static bool classof(const Type *T)
ScalarTypeKind getScalarTypeKind() const
getScalarTypeKind - Given that this is a scalar type, classify it.
bool hasPointerRepresentation() const
static void Profile(llvm::FoldingSetNodeID &ID, unsigned Depth, unsigned Index, bool ParameterPack, TemplateTypeParmDecl *TTPDecl)
void Profile(llvm::FoldingSetNodeID &ID)
bool isIntegerType() const
const ObjCObjectPointerType * getAsObjCQualifiedIdType() const
StreamedQualTypeHelper stream(const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine()) const
void Profile(llvm::FoldingSetNodeID &ID) const
bool hasAddressSpace() const
bool isAddressSpaceSupersetOf(Qualifiers other) const
Returns true if this address space is a superset of the other one. OpenCL v2.0 defines conversion rul...
Qualifiers getQualifiers() const
Retrieve the set of qualifiers applied to this type.
bool isPointerType() const
unsigned getNumExceptions() const
bool isIncompleteOrObjectType() const
QualType getDeducedType() const
Get the type deduced for this auto type, or null if it's either not been deduced or was deduced to a ...