Home | History | Annotate | Download | only in AST

Lines Matching defs:QualType

46   class QualType;
72 struct isPodLike<clang::QualType> { static const bool value = true; };
347 // on a QualType object.
594 /// pointer. To handle the packing/unpacking, we make QualType be a
598 class QualType {
621 QualType() {}
623 QualType(const Type *Ptr, unsigned Quals)
625 QualType(const ExtQuals *Ptr, unsigned Quals)
642 /// Divides a QualType into its unqualified type and a set of local
647 static QualType getFromOpaquePtr(const void *Ptr) {
648 QualType T;
664 /// Return true if this QualType doesn't point to a type yet.
669 /// \brief Determine whether this particular QualType instance has the
679 /// \brief Determine whether this particular QualType instance has the
689 /// \brief Determine whether this particular QualType instance has the
699 /// \brief Determine whether this particular QualType instance has any
709 /// \brief Determine whether this particular QualType instance has any
716 /// \brief Retrieve the set of qualifiers local to this particular QualType
725 /// local to this particular QualType instance, not including any qualifiers
736 return QualType::isConstant(*this, Ctx);
760 /// Add the `const` type qualifier to this QualType.
764 QualType withConst() const {
768 /// Add the `volatile` type qualifier to this QualType.
772 QualType withVolatile() const {
776 /// Add the `restrict` qualifier to this QualType.
780 QualType withRestrict() const {
784 QualType withCVRQualifiers(unsigned CVR) const {
807 QualType withFastQualifiers(unsigned TQs) const {
808 QualType T = *this;
815 QualType withExactLocalFastQualifiers(unsigned TQs) const {
820 QualType withoutLocalFastQualifiers() const {
821 QualType T = *this;
826 QualType getCanonicalType() const;
831 QualType getLocalUnqualifiedType() const { return QualType(getTypePtr(), 0); }
851 inline QualType getUnqualifiedType() const;
866 bool isMoreQualifiedThan(QualType Other) const;
870 bool isAtLeastAsQualifiedAs(QualType Other) const;
872 QualType getNonReferenceType() const;
882 QualType getNonLValueExprType(const ASTContext &Context) const;
892 QualType getDesugaredType(const ASTContext &Context) const {
905 QualType getSingleStepDesugaredType(const ASTContext &Context) const {
911 QualType IgnoreParens() const {
913 return QualType::IgnoreParens(*this);
918 friend bool operator==(const QualType &LHS, const QualType &RHS) {
921 friend bool operator!=(const QualType &LHS, const QualType &RHS) {
962 const QualType &T;
967 StreamedQualTypeHelper(const QualType &T, const PrintingPolicy &Policy,
1062 QualType substObjCTypeArgs(ASTContext &ctx,
1063 ArrayRef<QualType> typeArgs,
1071 /// substitution (\c QualType::substObjCTypeArgs) for the convenience of
1086 QualType substObjCMemberType(QualType objectType,
1091 QualType stripObjCKindOfType(const ASTContext &ctx) const;
1094 QualType getAtomicUnqualifiedType() const;
1100 static bool isConstant(QualType T, const ASTContext& Ctx);
1101 static QualType getDesugaredType(QualType T, const ASTContext &Context);
1102 static SplitQualType getSplitDesugaredType(QualType T);
1103 static SplitQualType getSplitUnqualifiedTypeImpl(QualType type);
1104 static QualType getSingleStepDesugaredTypeImpl(QualType type,
1106 static QualType IgnoreParens(QualType T);
1107 static DestructionKind isDestructedTypeImpl(QualType type);
1113 /// Implement simplify_type for QualType, so that we can dyn_cast from QualType
1115 template<> struct simplify_type< ::clang::QualType> {
1117 static SimpleType getSimplifiedValue(::clang::QualType Val) {
1122 // Teach SmallPtrSet that QualType is "basically a pointer".
1124 class PointerLikeTypeTraits<clang::QualType> {
1126 static inline void *getAsVoidPointer(clang::QualType P) {
1129 static inline clang::QualType getFromVoidPointer(void *P) {
1130 return clang::QualType::getFromOpaquePtr(P);
1141 /// classes, which allows \c QualType to access the common fields between the
1145 ExtQualsTypeCommonBase(const Type *baseType, QualType canon)
1151 /// This pointer allows an efficient mapping from a QualType to its
1155 /// \brief The canonical type of this type. A QualType.
1156 QualType CanonicalType;
1158 friend class QualType;
1166 /// struct, intended to be heap-allocated and used by QualType to
1170 /// in three low bits on the QualType pointer; a fourth bit records whether
1180 // 2. QualType:
1194 ExtQuals(const Type *baseType, QualType canon, Qualifiers quals)
1196 canon.isNull() ? QualType(this_(), 0) : canon),
1502 Type(TypeClass tc, QualType canon, bool Dependent,
1506 canon.isNull() ? QualType(this_(), 0) : canon) {
1560 return CanonicalType == QualType(this, 0);
1565 /// or QualType::getSingleStepDesugaredType(const ASTContext&).
1566 QualType getLocallyUnqualifiedSingleStepDesugaredType() const;
1908 QualType getPointeeType() const;
1992 Optional<ArrayRef<QualType>>
2001 QualType getCanonicalTypeInternal() const {
2053 : Type(Builtin, QualType(), /*Dependent=*/(K == Dependent),
2070 QualType desugar() const { return QualType(this, 0); }
2120 QualType ElementType;
2121 ComplexType(QualType Element, QualType CanonicalPtr) :
2131 QualType getElementType() const { return ElementType; }
2134 QualType desugar() const { return QualType(this, 0); }
2139 static void Profile(llvm::FoldingSetNodeID &ID, QualType Element) {
2149 QualType Inner;
2151 ParenType(QualType InnerType, QualType CanonType) :
2162 QualType getInnerType() const { return Inner; }
2165 QualType desugar() const { return getInnerType(); }
2170 static void Profile(llvm::FoldingSetNodeID &ID, QualType Inner) {
2180 QualType PointeeType;
2182 PointerType(QualType Pointee, QualType CanonicalPtr) :
2193 QualType getPointeeType() const { return PointeeType; }
2212 QualType desugar() const { return QualType(this, 0); }
2217 static void Profile(llvm::FoldingSetNodeID &ID, QualType Pointee) {
2228 QualType OriginalTy;
2229 QualType AdjustedTy;
2232 AdjustedType(TypeClass TC, QualType OriginalTy, QualType AdjustedTy,
2233 QualType CanonicalPtr)
2243 QualType getOriginalType() const { return OriginalTy; }
2244 QualType getAdjustedType() const { return AdjustedTy; }
2247 QualType desugar() const { return AdjustedTy; }
2252 static void Profile(llvm::FoldingSetNodeID &ID, QualType Orig, QualType New) {
2265 DecayedType(QualType OriginalType, QualType DecayedPtr, QualType CanonicalPtr)
2273 QualType
2275 QualType getPointeeType() const {
2287 QualType PointeeType; // Block is some kind of pointer type
2288 BlockPointerType(QualType Pointee, QualType CanonicalCls) :
2300 QualType getPointeeType() const { return PointeeType; }
2303 QualType desugar() const { return QualType(this, 0); }
2308 static void Profile(llvm::FoldingSetNodeID &ID, QualType Pointee) {
2320 QualType PointeeType;
2323 ReferenceType(TypeClass tc, QualType Referencee, QualType CanonicalRef,
2339 QualType getPointeeTypeAsWritten() const { return PointeeType; }
2340 QualType getPointeeType() const {
2352 QualType Referencee,
2367 LValueReferenceType(QualType Referencee, QualType CanonicalRef,
2374 QualType desugar() const { return QualType(this, 0); }
2384 RValueReferenceType(QualType Referencee, QualType CanonicalRef) :
2390 QualType desugar() const { return QualType(this, 0); }
2402 QualType PointeeType;
2407 MemberPointerType(QualType Pointee, const Type *Cls, QualType CanonicalPtr) :
2420 QualType getPointeeType() const { return PointeeType; }
2438 QualType desugar() const { return QualType(this, 0); }
2443 static void Profile(llvm::FoldingSetNodeID &ID, QualType Pointee,
2467 QualType ElementType;
2475 ArrayType(TypeClass tc, QualType et, QualType can,
2490 QualType getElementType() const { return ElementType; }
2515 ConstantArrayType(QualType et, QualType can, const llvm::APInt &size,
2521 ConstantArrayType(TypeClass tc, QualType et, QualType can,
2529 QualType desugar() const { return QualType(this, 0); }
2535 QualType ElementType,
2546 static void Profile(llvm::FoldingSetNodeID &ID, QualType ET,
2564 IncompleteArrayType(QualType et, QualType can,
2571 QualType desugar() const { return QualType(this, 0); }
2584 static void Profile(llvm::FoldingSetNodeID &ID, QualType ET,
2614 VariableArrayType(QualType et, QualType can, Expr *e,
2633 QualType desugar() const { return QualType(this, 0); }
2672 DependentSizedArrayType(const ASTContext &Context, QualType et, QualType can,
2689 QualType desugar() const { return QualType(this, 0); }
2704 QualType ET, ArraySizeModifier SizeMod,
2722 QualType ElementType;
2725 DependentSizedExtVectorType(const ASTContext &Context, QualType ElementType,
2726 QualType can, Expr *SizeExpr, SourceLocation loc);
2732 QualType getElementType() const { return ElementType; }
2736 QualType desugar() const { return QualType(this, 0); }
2747 QualType ElementType, Expr *SizeExpr);
2768 QualType ElementType;
2770 VectorType(QualType vecType, unsigned nElements, QualType canonType,
2773 VectorType(TypeClass tc, QualType vecType, unsigned nElements,
2774 QualType canonType, VectorKind vecKind);
2780 QualType getElementType() const { return ElementType; }
2787 QualType desugar() const { return QualType(this, 0); }
2797 static void Profile(llvm::FoldingSetNodeID &ID, QualType ElementType,
2818 ExtVectorType(QualType vecType, unsigned nElements, QualType canonType) :
2872 QualType desugar() const { return QualType(this, 0); }
2884 QualType ResultType;
2999 FunctionType(TypeClass tc, QualType res,
3000 QualType Canonical, bool Dependent,
3012 QualType getReturnType() const { return ResultType; }
3028 QualType getCallResultType(const ASTContext &Context) const {
3043 FunctionNoProtoType(QualType Result, QualType Canonical, ExtInfo Info)
3055 QualType desugar() const { return QualType(this, 0); }
3060 static void Profile(llvm::FoldingSetNodeID &ID, QualType ResultType,
3158 ArrayRef<QualType> Exceptions;
3197 static bool containsAnyUnexpandedParameterPack(const QualType *ArgArray,
3206 FunctionProtoType(QualType result, ArrayRef<QualType> params,
3207 QualType canonical, const ExtProtoInfo &epi);
3265 case EST_Dynamic: return getNumExceptions() * sizeof(QualType);
3275 QualType getParamType(unsigned i) const {
3279 ArrayRef<QualType> getParamTypes() const {
3335 QualType getExceptionType(unsigned i) const {
3389 typedef const QualType *param_type_iterator;
3396 return reinterpret_cast<const QualType *>(this+1);
3402 typedef const QualType *exception_iterator;
3404 ArrayRef<QualType> exceptions() const {
3456 QualType desugar() const { return QualType(this, 0); }
3466 static void Profile(llvm::FoldingSetNodeID &ID, QualType Result,
3480 : Type(UnresolvedUsing, QualType(), true, true, false,
3489 QualType desugar() const { return QualType(this, 0); }
3508 TypedefType(TypeClass tc, const TypedefNameDecl *D, QualType can)
3522 QualType desugar() const;
3532 TypeOfExprType(Expr *E, QualType can = QualType());
3538 QualType desugar() const;
3570 QualType TOType;
3571 TypeOfType(QualType T, QualType can)
3581 QualType getUnderlyingType() const { return TOType; }
3584 QualType desugar() const { return getUnderlyingType(); }
3595 QualType UnderlyingType;
3598 DecltypeType(Expr *E, QualType underlyingType, QualType can = QualType());
3602 QualType getUnderlyingType() const { return UnderlyingType; }
3605 QualType desugar() const;
3642 QualType BaseType;
3644 QualType UnderlyingType;
3648 UnaryTransformType(QualType BaseTy, QualType UnderlyingTy, UTTKind UKind,
3649 QualType CanonicalTy);
3653 QualType desugar() const { return UnderlyingType; }
3655 QualType getUnderlyingType() const { return UnderlyingType; }
3656 QualType getBaseType() const { return BaseType; }
3674 DependentUnaryTransformType(const ASTContext &C, QualType BaseType,
3680 static void Profile(llvm::FoldingSetNodeID &ID, QualType BaseType,
3695 TagType(TypeClass TC, const TagDecl *D, QualType can);
3713 : TagType(Record, reinterpret_cast<const TagDecl*>(D), QualType()) { }
3715 : TagType(TC, reinterpret_cast<const TagDecl*>(D), QualType()) { }
3723 // FIXME: This predicate is a helper to QualType/Type. It needs to
3729 QualType desugar() const { return QualType(this, 0); }
3738 : TagType(Enum, reinterpret_cast<const TagDecl*>(D), QualType()) { }
3747 QualType desugar() const { return QualType(this, 0); }
3814 QualType ModifiedType;
3815 QualType EquivalentType;
3819 AttributedType(QualType canon, Kind attrKind,
3820 QualType modified, QualType equivalent)
3834 QualType getModifiedType() const { return ModifiedType; }
3835 QualType getEquivalentType() const { return EquivalentType; }
3838 QualType desugar() const { return getEquivalentType(); }
3888 static Optional<NullabilityKind> stripOuterNullability(QualType &T);
3895 QualType modified, QualType equivalent) {
3922 TemplateTypeParmType(TemplateTypeParmDecl *TTPDecl, QualType Canon)
3931 : Type(TemplateTypeParm, QualType(this, 0),
3943 QualType Can = getCanonicalTypeInternal();
3959 QualType desugar() const { return QualType(this, 0); }
3990 SubstTemplateTypeParmType(const TemplateTypeParmType *Param, QualType Canon)
4007 QualType getReplacementType() const {
4012 QualType desugar() const { return getReplacementType(); }
4019 QualType Replacement) {
4053 QualType Canon,
4067 QualType desugar() const { return QualType(this, 0); }
4088 AutoType(QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent)
4089 : Type(Auto, DeducedType.isNull() ? QualType(this, 0) : DeducedType,
4110 QualType desugar() const { return getCanonicalTypeInternal(); }
4114 QualType getDeducedType() const {
4115 return !isCanonicalUnqualified() ? getCanonicalTypeInternal() : QualType();
4125 static void Profile(llvm::FoldingSetNodeID &ID, QualType Deduced,
4154 /// TemplateArguments, followed by a QualType representing the
4178 QualType Canon,
4179 QualType Aliased);
4231 QualType getAliasedType() const {
4233 return *reinterpret_cast<const QualType*>(end());
4263 QualType desugar() const { return getCanonicalTypeInternal(); }
4309 QualType InjectedType;
4317 InjectedClassNameType(CXXRecordDecl *D, QualType TST)
4318 : Type(InjectedClassName, QualType(), /*Dependent=*/true,
4329 QualType getInjectedSpecializationType() const { return InjectedType; }
4337 QualType desugar() const { return QualType(this, 0); }
4385 QualType Canonical, bool Dependent,
4439 QualType NamedType;
4442 QualType NamedType, QualType CanonType)
4463 QualType getNamedType() const { return NamedType; }
4466 QualType desugar() const { return getNamedType(); }
4476 NestedNameSpecifier *NNS, QualType NamedType) {
4508 const IdentifierInfo *Name, QualType CanonType)
4531 QualType desugar() const { return QualType(this, 0); }
4577 QualType Canon);
4604 QualType desugar() const { return QualType(this, 0); }
4646 QualType Pattern;
4656 PackExpansionType(QualType Pattern, QualType Canon,
4671 QualType getPattern() const { return Pattern; }
4683 QualType desugar() const { return isSugared() ? Pattern : QualType(this, 0); }
4689 static void Profile(llvm::FoldingSetNodeID &ID, QualType Pattern,
4744 QualType BaseType;
4754 QualType *getTypeArgStorage();
4755 const QualType *getTypeArgStorage() const {
4762 ObjCObjectType(QualType Canonical, QualType Base,
4763 ArrayRef<QualType> typeArgs,
4769 : Type(ObjCInterface, QualType(), false, false, false, false),
4770 BaseType(QualType(this_(), 0)) {
4785 QualType getBaseType() const { return BaseType; }
4827 ArrayRef<QualType> getTypeArgs() const;
4831 ArrayRef<QualType> getTypeArgsAsWritten() const {
4872 QualType getSuperClassType() const {
4877 return QualType(CachedSuperClassType.getPointer(), 0);
4882 QualType stripObjCKindOfTypeAndQuals(const ASTContext &ctx) const;
4885 QualType desugar() const { return QualType(this, 0); }
4903 ObjCObjectTypeImpl(QualType Canonical, QualType Base,
4904 ArrayRef<QualType> typeArgs,
4912 QualType Base,
4913 ArrayRef<QualType> typeArgs,
4918 inline QualType *ObjCObjectType::getTypeArgStorage() {
4919 return reinterpret_cast<QualType *>(static_cast<ObjCObjectTypeImpl*>(this)+1);
4938 /// T->getBaseType() == QualType(T, 0).
4954 QualType desugar() const { return QualType(this, 0); }
4974 QualType baseType = getBaseType();
4995 QualType PointeeType;
4997 ObjCObjectPointerType(QualType Canonical, QualType Pointee)
5009 QualType getPointeeType() const { return PointeeType; }
5101 ArrayRef<QualType> getTypeArgs() const {
5106 ArrayRef<QualType> getTypeArgsAsWritten() const {
5136 QualType desugar() const { return QualType(this, 0); }
5144 QualType getSuperClassType() const;
5154 static void Profile(llvm::FoldingSetNodeID &ID, QualType T) {
5163 QualType ValueType;
5165 AtomicType(QualType ValTy, QualType Canonical)
5176 QualType getValueType() const { return ValueType; }
5179 QualType desugar() const { return QualType(this, 0); }
5184 static void Profile(llvm::FoldingSetNodeID &ID, QualType T) {
5194 QualType ElementType;
5196 PipeType(QualType elemType, QualType CanonicalPtr) :
5206 QualType getElementType() const { return ElementType; }
5210 QualType desugar() const { return QualType(this, 0); }
5216 static void Profile(llvm::FoldingSetNodeID &ID, QualType T) {
5235 const Type *strip(QualType type) {
5246 QualType apply(const ASTContext &Context, QualType QT) const;
5249 QualType apply(const ASTContext &Context, const Type* T) const;
5262 inline const Type *QualType::getTypePtr() const {
5266 inline const Type *QualType::getTypePtrOrNull() const {
5270 inline SplitQualType QualType::split() const {
5281 inline Qualifiers QualType::getLocalQualifiers() const {
5289 inline Qualifiers QualType::getQualifiers() const {
5295 inline unsigned QualType::getCVRQualifiers() const {
5301 inline QualType QualType::getCanonicalType() const {
5302 QualType canon = getCommonPtr()->CanonicalType;
5306 inline bool QualType::isCanonical() const {
5310 inline bool QualType::isCanonicalAsParam() const {
5321 inline bool QualType::isConstQualified() const {
5326 inline bool QualType::isRestrictQualified() const {
5332 inline bool QualType::isVolatileQualified() const {
5337 inline bool QualType::hasQualifiers() const {
5342 inline QualType QualType::getUnqualifiedType() const {
5344 return QualType(getTypePtr(), 0);
5346 return QualType(getSplitUnqualifiedTypeImpl(*this).Ty, 0);
5349 inline SplitQualType QualType::getSplitUnqualifiedType() const {
5356 inline void QualType::removeLocalConst() {
5360 inline void QualType::removeLocalRestrict() {
5364 inline void QualType::removeLocalVolatile() {
5368 inline void QualType::removeLocalCVRQualifiers(unsigned Mask) {
5378 inline unsigned QualType::getAddressSpace() const {
5383 inline Qualifiers::GC QualType::getObjCGCAttr() const {
5397 inline FunctionType::ExtInfo getFunctionExtInfo(QualType t) {
5406 inline bool QualType::isMoreQualifiedThan(QualType other) const {
5416 inline bool QualType::isAtLeastAsQualifiedAs(QualType other) const {
5435 inline QualType QualType::getNonReferenceType() const {
5442 inline bool QualType::isCForbiddenLValueType() const {
5793 /// Insertion operator for diagnostics. This allows sending QualType's into a
5796 QualType T) {
5802 /// Insertion operator for partial diagnostics. This allows sending QualType's
5805 QualType T) {