class Type

Declaration

class Type : public ExtQualsTypeCommonBase { /* full declaration omitted */ };

Description

The base class of the type hierarchy. A central concept with types is that each type always has a canonical type. A canonical type is the type with any typedef names stripped out of it or the types it references. For example, consider: typedef int foo; typedef foo* bar; 'int *' 'foo *' 'bar' There will be a Type object created for 'int'. Since int is canonical, its CanonicalType pointer points to itself. There is also a Type for 'foo' (a TypedefType). Its CanonicalType pointer points to the 'int' Type. Next there is a PointerType that represents 'int*', which, like 'int', is canonical. Finally, there is a PointerType type for 'foo*' whose canonical type is 'int*', and there is a TypedefType for 'bar', whose canonical type is also 'int*'. Non-canonical types are useful for emitting diagnostics, without losing information about typedefs being used. Canonical types are useful for type comparisons (they allow by-pointer equality tests) and useful for reasoning about whether something has a particular form (e.g. is a function type), because they implicitly, recursively, strip all typedefs out of a type. Types, once created, are immutable.

Declared at: clang/include/clang/AST/Type.h:1556

Inherits from: ExtQualsTypeCommonBase

Member Variables

protected anonymous struct / union

Method Overview

Inherited from ExtQualsTypeCommonBase:

    Methods

    Type(clang::Type::TypeClass tc,
         clang::QualType canon,
         clang::TypeDependence Dependence)

    Declared at: clang/include/clang/AST/Type.h:1892

    Parameters

    clang::Type::TypeClass tc
    clang::QualType canon
    clang::TypeDependence Dependence

    Type(const clang::Type&)

    Declared at: clang/include/clang/AST/Type.h:1922

    Parameters

    const clang::Type&

    Type(clang::Type&&)

    Declared at: clang/include/clang/AST/Type.h:1923

    Parameters

    clang::Type&&

    bool acceptsObjCTypeParams() const

    Description

    Determines if this is an ObjC interface type that may accept type parameters.

    Declared at: clang/include/clang/AST/Type.h:2523

    void addDependence(clang::TypeDependence D)

    Declared at: clang/include/clang/AST/Type.h:1914

    Parameters

    clang::TypeDependence D

    bool canDecayToPointerType() const

    Description

    Determines whether this type can decay to a pointer type.

    Declared at: clang/include/clang/AST/Type.h:2278

    bool canHaveNullability(
        bool ResultIfUnknown = true) const

    Description

    Determine whether the given type can have a nullability specifier applied to it, i.e., if it is any kind of pointer type.

    Declared at: clang/include/clang/AST/Type.h:2501

    Parameters

    bool ResultIfUnknown = true
    The value to return if we don't yet know whether this type can have nullability because it is dependent.

    template <typename T>
    const T* castAs() const

    Description

    Member-template castAs <specific type>. Look through sugar for the underlying instance of < specific type>. This method has the same relationship to getAs <T > as cast <T > has to dyn_cast <T >; which is to say, the underlying type *must* have the intended type, and this method will never return null.

    Declared at: clang/include/clang/AST/Type.h:2383

    Templates

    T

    const clang::ArrayType* castAsArrayTypeUnsafe()
        const

    Description

    A variant of castAs < > for array type which silently discards qualifiers from the outermost type.

    Declared at: clang/include/clang/AST/Type.h:2387

    bool containsErrors() const

    Description

    Whether this type is an error type.

    Declared at: clang/include/clang/AST/Type.h:2238

    bool containsUnexpandedParameterPack() const

    Description

    Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates. A type that contains a parameter pack shall be expanded by the ellipsis operator at some point. For example, the typedef in the following example contains an unexpanded parameter pack 'T': Note that this routine does not specify which

    Declared at: clang/include/clang/AST/Type.h:1947

    void dump(llvm::raw_ostream& OS,
              const clang::ASTContext& Context) const

    Declared at: clang/include/clang/AST/Type.h:2533

    Parameters

    llvm::raw_ostream& OS
    const clang::ASTContext& Context

    void dump() const

    Declared at: clang/include/clang/AST/Type.h:2532

    const clang::Type* getArrayElementTypeNoTypeQual()
        const

    Description

    If this is an array type, return the element type of the array, potentially with type qualifiers missing. This should never be used when type qualifiers are meaningful.

    Declared at: clang/include/clang/AST/Type.h:2401

    template <typename T>
    const T* getAs() const

    Description

    Member-template getAs <specific type>'. Look through sugar for an instance of < specific type>. This scheme will eventually replace the specific getAsXXXX methods above. There are some specializations of this member template listed immediately following this class.

    Declared at: clang/include/clang/AST/Type.h:2364

    Templates

    T

    template <typename T>
    const T* getAsAdjusted() const

    Description

    Member-template getAsAdjusted <specific type>. Look through specific kinds of sugar (parens, attributes, etc) for an instance of < specific type>. This is used when you need to walk over sugar nodes that represent some kind of type adjustment from a type that was written as a < specific type> to another type that is still canonically a < specific type>.

    Declared at: clang/include/clang/AST/Type.h:2371

    Templates

    T

    const clang::ArrayType* getAsArrayTypeUnsafe()
        const

    Description

    A variant of getAs < > for array types which silently discards qualifiers from the outermost type.

    Declared at: clang/include/clang/AST/Type.h:2375

    clang::CXXRecordDecl* getAsCXXRecordDecl() const

    Description

    Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or because it is the injected-class-name type of a class template or class template partial specialization.

    Declared at: clang/include/clang/AST/Type.h:2324

    const clang::ComplexType*
    getAsComplexIntegerType() const

    Declared at: clang/include/clang/AST/Type.h:2311

    const clang::ObjCObjectPointerType*
    getAsObjCInterfacePointerType() const

    Declared at: clang/include/clang/AST/Type.h:2316

    const clang::ObjCObjectType*
    getAsObjCInterfaceType() const

    Declared at: clang/include/clang/AST/Type.h:2312

    const clang::ObjCObjectPointerType*
    getAsObjCQualifiedClassType() const

    Declared at: clang/include/clang/AST/Type.h:2318

    const clang::ObjCObjectPointerType*
    getAsObjCQualifiedIdType() const

    Declared at: clang/include/clang/AST/Type.h:2317

    const clang::ObjCObjectType*
    getAsObjCQualifiedInterfaceType() const

    Declared at: clang/include/clang/AST/Type.h:2319

    const clang::BuiltinType* getAsPlaceholderType()
        const

    Declared at: clang/include/clang/AST/Type.h:2032

    clang::RecordDecl* getAsRecordDecl() const

    Description

    Retrieves the RecordDecl this type refers to.

    Declared at: clang/include/clang/AST/Type.h:2327

    const clang::RecordType* getAsStructureType()
        const

    Declared at: clang/include/clang/AST/Type.h:2308

    clang::TagDecl* getAsTagDecl() const

    Description

    Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is the injected-class-name type of a class template or class template partial specialization.

    Declared at: clang/include/clang/AST/Type.h:2332

    const clang::RecordType* getAsUnionType() const

    Description

    NOTE: getAs*ArrayType are methods on ASTContext.

    Declared at: clang/include/clang/AST/Type.h:2310

    const clang::Type* getBaseElementTypeUnsafe()
        const

    Description

    Get the base element type of this type, potentially discarding type qualifiers. This should never be used when type qualifiers are meaningful.

    Declared at: clang/include/clang/AST/Type.h:2396

    clang::QualType getCanonicalTypeInternal() const

    Declared at: clang/include/clang/AST/Type.h:2527

    clang::CanQualType getCanonicalTypeUnqualified()
        const

    Declared at: clang/include/clang/AST/Type.h:2531

    clang::AutoType* getContainedAutoType() const

    Description

    Get the AutoType whose type will be deduced for a variable with an initializer of this type. This looks through declarators like pointer types, but not through decltype or typedefs.

    Declared at: clang/include/clang/AST/Type.h:2349

    clang::DeducedType* getContainedDeducedType()
        const

    Description

    Get the DeducedType whose type will be deduced for a variable with an initializer of this type. This looks through declarators like pointer types, but not through decltype or typedefs.

    Declared at: clang/include/clang/AST/Type.h:2344

    clang::TypeDependence getDependence() const

    Declared at: clang/include/clang/AST/Type.h:2233

    clang::Linkage getLinkage() const

    Description

    Determine the linkage of this type.

    Declared at: clang/include/clang/AST/Type.h:2470

    clang::LinkageInfo getLinkageAndVisibility() const

    Description

    Determine the linkage and visibility of this type.

    Declared at: clang/include/clang/AST/Type.h:2483

    clang::QualType
    getLocallyUnqualifiedSingleStepDesugaredType()
        const

    Description

    Pull a single level of sugar off of this locally-unqualified type. Users should generally prefer SplitQualType::getSingleStepDesugaredType() or QualType::getSingleStepDesugaredType(const ASTContext & ).

    Declared at: clang/include/clang/AST/Type.h:1960

    Optional<clang::NullabilityKind> getNullability(
        const clang::ASTContext& context) const

    Description

    Determine the nullability of the given type. Note that nullability is only captured as sugar within the type system, not as part of the canonical type, so nullability will be lost by canonicalization and desugaring.

    Declared at: clang/include/clang/AST/Type.h:2494

    Parameters

    const clang::ASTContext& context

    Qualifiers::ObjCLifetime
    getObjCARCImplicitLifetime() const

    Description

    Return the implicit lifetime for this type, which must not be dependent.

    Declared at: clang/include/clang/AST/Type.h:2215

    Optional<ArrayRef<clang::QualType>>
    getObjCSubstitutions(
        const clang::DeclContext* dc) const

    Description

    Retrieve the set of substitutions required when accessing a member of the Objective-C receiver type that is declared in the given context. \c *this is the type of the object we're operating on, e.g., the receiver for a message send or the base of a property access, and is expected to be of some object or object pointer type.

    Declared at: clang/include/clang/AST/Type.h:2519

    Parameters

    const clang::DeclContext* dc
    The declaration context for which we are building up a substitution mapping, which should be an Objective-C class, extension, category, or method within.

    Returns

    an array of type arguments that can be substituted for the type parameters of the given declaration context in any type described within that context, or an empty optional to indicate that no substitution is required.

    const clang::CXXRecordDecl*
    getPointeeCXXRecordDecl() const

    Description

    If this is a pointer or reference to a RecordType, return the CXXRecordDecl that the type refers to. If this is not a pointer or reference, or the type being pointed to does not refer to a CXXRecordDecl, returns NULL.

    Declared at: clang/include/clang/AST/Type.h:2339

    const clang::Type* getPointeeOrArrayElementType()
        const

    Description

    If this is a pointer type, return the pointee type. If this is an array type, return the array element type. This should never be used when type qualifiers are meaningful.

    Declared at: clang/include/clang/AST/Type.h:2406

    clang::QualType getPointeeType() const

    Description

    If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.

    Declared at: clang/include/clang/AST/Type.h:2410

    clang::Type::ScalarTypeKind getScalarTypeKind()
        const

    Description

    Given that this is a scalar type, classify it.

    Declared at: clang/include/clang/AST/Type.h:2231

    clang::QualType getSveEltType(
        const clang::ASTContext& Ctx) const

    Description

    Returns the representative type for the element of an SVE builtin type. This is used to represent fixed-length SVE vectors created with the 'arm_sve_vector_bits' type attribute as VectorType.

    Declared at: clang/include/clang/AST/Type.h:1979

    Parameters

    const clang::ASTContext& Ctx

    clang::Type::TypeClass getTypeClass() const

    Declared at: clang/include/clang/AST/Type.h:1927

    const char* getTypeClassName() const

    Declared at: clang/include/clang/AST/Type.h:2525

    const clang::Type* getUnqualifiedDesugaredType()
        const

    Description

    Return the specified type with any "sugar" removed from the type, removing any typedefs, typeofs, etc., as well as any qualifiers.

    Declared at: clang/include/clang/AST/Type.h:2414

    clang::Visibility getVisibility() const

    Description

    Determine the visibility of this type.

    Declared at: clang/include/clang/AST/Type.h:2473

    bool hasAttr(attr::Kind AK) const

    Description

    Determine whether this type had the specified attribute applied to it (looking through top-level type sugar).

    Declared at: clang/include/clang/AST/Type.h:2391

    Parameters

    attr::Kind AK

    bool hasAutoForTrailingReturnType() const

    Description

    Determine whether this type was written with a leading 'auto' corresponding to a trailing return type (possibly for a nested function type within a pointer to function type or similar).

    Declared at: clang/include/clang/AST/Type.h:2356

    bool hasFloatingRepresentation() const

    Description

    Determine whether this type has a floating-point representation of some sort, e.g., it is a floating-point type or a vector thereof.

    Declared at: clang/include/clang/AST/Type.h:2303

    bool hasIntegerRepresentation() const

    Description

    Determine whether this type has an integer representation of some sort, e.g., it is an integer type or a vector.

    Declared at: clang/include/clang/AST/Type.h:2291

    bool hasObjCPointerRepresentation() const

    Description

    Whether this type can represent an objective pointer type for the purpose of GC'ability

    Declared at: clang/include/clang/AST/Type.h:2287

    bool hasPointerRepresentation() const

    Description

    Whether this type is represented natively as a pointer. This includes pointers, references, block pointers, and Objective-C interface, qualified id, and qualified interface types, as well as nullptr_t.

    Declared at: clang/include/clang/AST/Type.h:2283

    bool hasSignedIntegerRepresentation() const

    Description

    Determine whether this type has an signed integer representation of some sort, e.g., it is an signed integer type or a vector.

    Declared at: clang/include/clang/AST/Type.h:2295

    bool hasSizedVLAType() const

    Description

    Whether this type involves a variable-length array type with a definite size.

    Declared at: clang/include/clang/AST/Type.h:2268

    bool hasUnnamedOrLocalType() const

    Description

    Whether this type is or contains a local or unnamed type.

    Declared at: clang/include/clang/AST/Type.h:2271

    bool hasUnsignedIntegerRepresentation() const

    Description

    Determine whether this type has an unsigned integer representation of some sort, e.g., it is an unsigned integer type or a vector.

    Declared at: clang/include/clang/AST/Type.h:2299

    bool isAggregateType() const

    Declared at: clang/include/clang/AST/Type.h:2080

    bool isAlignValT() const

    Declared at: clang/include/clang/AST/Type.h:2174

    bool isAnyCharacterType() const

    Declared at: clang/include/clang/AST/Type.h:2054

    bool isAnyComplexType() const

    Declared at: clang/include/clang/AST/Type.h:2069

    bool isAnyPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2090

    bool isArithmeticType() const

    Declared at: clang/include/clang/AST/Type.h:2077

    bool isArrayType() const

    Declared at: clang/include/clang/AST/Type.h:2102

    bool isAtomicType() const

    Declared at: clang/include/clang/AST/Type.h:2176

    bool isBFloat16Type() const

    Declared at: clang/include/clang/AST/Type.h:2073

    bool isBitIntType() const

    Declared at: clang/include/clang/AST/Type.h:2201

    bool isBlockCompatibleObjCPointerType(
        clang::ASTContext& ctx) const

    Declared at: clang/include/clang/AST/Type.h:2166

    Parameters

    clang::ASTContext& ctx

    bool isBlockPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2091

    bool isBooleanType() const

    Declared at: clang/include/clang/AST/Type.h:2048

    bool isBuiltinType() const

    Description

    Returns true if the type is a builtin type.

    Declared at: clang/include/clang/AST/Type.h:2023

    bool isCARCBridgableType() const

    Declared at: clang/include/clang/AST/Type.h:2170

    bool isCUDADeviceBuiltinSurfaceType() const

    Description

    Check if the type is the CUDA device builtin surface type.

    Declared at: clang/include/clang/AST/Type.h:2210

    bool isCUDADeviceBuiltinTextureType() const

    Description

    Check if the type is the CUDA device builtin texture type.

    Declared at: clang/include/clang/AST/Type.h:2212

    bool isCanonicalUnqualified() const

    Description

    Determines if this type would be canonical if it had no further qualification.

    Declared at: clang/include/clang/AST/Type.h:1953

    bool isChar16Type() const

    Declared at: clang/include/clang/AST/Type.h:2052

    bool isChar32Type() const

    Declared at: clang/include/clang/AST/Type.h:2053

    bool isChar8Type() const

    Declared at: clang/include/clang/AST/Type.h:2051

    bool isCharType() const

    Declared at: clang/include/clang/AST/Type.h:2049

    bool isClassType() const

    Declared at: clang/include/clang/AST/Type.h:2108

    bool isClkEventT() const

    Declared at: clang/include/clang/AST/Type.h:2189

    bool isComplexIntegerType() const

    Declared at: clang/include/clang/AST/Type.h:2114

    bool isComplexType() const

    Description

    isComplexType() does *not* include complex integers (a GCC extension). isComplexIntegerType() can be used to test for complex integers.

    Declared at: clang/include/clang/AST/Type.h:2068

    bool isCompoundType() const

    Description

    Tests whether the type is categorized as a compound type.

    Declared at: clang/include/clang/AST/Type.h:2082

    Returns

    True for types specified in C++0x [basic.compound].

    bool isConstantArrayType() const

    Declared at: clang/include/clang/AST/Type.h:2103

    bool isConstantMatrixType() const

    Declared at: clang/include/clang/AST/Type.h:2119

    bool isConstantSizeType() const

    Description

    Return true if this is not a variable sized type, according to the rules of C99 6.7.5p3. It is not legal to call this on incomplete types.

    Declared at: clang/include/clang/AST/Type.h:2463

    bool isDecltypeType() const

    Declared at: clang/include/clang/AST/Type.h:2135

    bool isDependentAddressSpaceType() const

    Declared at: clang/include/clang/AST/Type.h:2120

    bool isDependentSizedArrayType() const

    Declared at: clang/include/clang/AST/Type.h:2106

    bool isDependentType() const

    Description

    Whether this type is a dependent type, meaning that its definition somehow depends on a template parameter (C++ [temp.dep.type]).

    Declared at: clang/include/clang/AST/Type.h:2244

    bool isElaboratedTypeSpecifier() const

    Description

    Determine wither this type is a C++ elaborated-type-specifier.

    Declared at: clang/include/clang/AST/Type.h:2276

    bool isEnumeralType() const

    Declared at: clang/include/clang/AST/Type.h:2044

    bool isEventT() const

    Declared at: clang/include/clang/AST/Type.h:2188

    bool isExtVectorBoolType() const

    Declared at: clang/include/clang/AST/Type.h:2117

    bool isExtVectorType() const

    Declared at: clang/include/clang/AST/Type.h:2116

    bool isFixedPointOrIntegerType() const

    Description

    Return true if this is a fixed point or integer type.

    Declared at: clang/include/clang/AST/Type.h:2442

    bool isFixedPointType() const

    Description

    Return true if this is a fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169.

    Declared at: clang/include/clang/AST/Type.h:2439

    bool isFloat128Type() const

    Declared at: clang/include/clang/AST/Type.h:2074

    bool isFloat16Type() const

    Declared at: clang/include/clang/AST/Type.h:2072

    bool isFloatingType() const

    Declared at: clang/include/clang/AST/Type.h:2070

    bool isFromAST() const

    Description

    Whether this type comes from an AST file.

    Declared at: clang/include/clang/AST/Type.h:1930

    bool isFunctionNoProtoType() const

    Declared at: clang/include/clang/AST/Type.h:2087

    bool isFunctionPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2097

    bool isFunctionProtoType() const

    Declared at: clang/include/clang/AST/Type.h:2088

    bool isFunctionReferenceType() const

    Declared at: clang/include/clang/AST/Type.h:2098

    bool isFunctionType() const

    Declared at: clang/include/clang/AST/Type.h:2086

    bool isFundamentalType() const

    Description

    Tests whether the type is categorized as a fundamental type.

    Declared at: clang/include/clang/AST/Type.h:2081

    Returns

    True for types specified in C++0x [basic.fundamental].

    bool isHalfType() const

    Declared at: clang/include/clang/AST/Type.h:2071

    bool isIbm128Type() const

    Declared at: clang/include/clang/AST/Type.h:2075

    bool isImageType() const

    Declared at: clang/include/clang/AST/Type.h:2185

    bool isIncompleteArrayType() const

    Declared at: clang/include/clang/AST/Type.h:2104

    bool isIncompleteOrObjectType() const

    Description

    Return true if this is an incomplete or object type, in other words, not a function type.

    Declared at: clang/include/clang/AST/Type.h:1996

    bool isIncompleteType(
        clang::NamedDecl** Def = nullptr) const

    Description

    Return true if this is an incomplete type. A type that can describe objects, but which lacks information needed to determine its size (e.g. void, or a fwd declared struct). Clients of this routine will need to determine if the size is actually required. Def If non-null, and the type refers to some kind of declaration that can be completed (such as a C struct, C++ class, or Objective-C class), will be set to the declaration.

    Declared at: clang/include/clang/AST/Type.h:1992

    Parameters

    clang::NamedDecl** Def = nullptr

    bool isInstantiationDependentType() const

    Description

    Determine whether this type is an instantiation-dependent type, meaning that the type involves a template parameter (even if the definition does not actually depend on the type substituted for that template parameter).

    Declared at: clang/include/clang/AST/Type.h:2252

    bool isIntegerType() const

    Description

    isIntegerType() does *not* include complex integers (a GCC extension). isComplexIntegerType() can be used to test for complex integers.

    Declared at: clang/include/clang/AST/Type.h:2043

    bool isIntegralOrEnumerationType() const

    Description

    Determine whether this type is an integral or enumeration type.

    Declared at: clang/include/clang/AST/Type.h:2058

    bool isIntegralOrUnscopedEnumerationType() const

    Description

    Determine whether this type is an integral or unscoped enumeration type.

    Declared at: clang/include/clang/AST/Type.h:2061

    bool isIntegralType(
        const clang::ASTContext& Ctx) const

    Declared at: clang/include/clang/AST/Type.h:2055

    Parameters

    const clang::ASTContext& Ctx

    bool isInterfaceType() const

    Declared at: clang/include/clang/AST/Type.h:2111

    bool isLValueReferenceType() const

    Declared at: clang/include/clang/AST/Type.h:2094

    bool isLinkageValid() const

    Description

    True if the computed linkage is valid. Used for consistency checking. Should always return true.

    Declared at: clang/include/clang/AST/Type.h:2487

    bool isLiteralType(
        const clang::ASTContext& Ctx) const

    Description

    Return true if this is a literal type (C++11 [basic.types]p10)

    Declared at: clang/include/clang/AST/Type.h:2010

    Parameters

    const clang::ASTContext& Ctx

    bool isMatrixType() const

    Declared at: clang/include/clang/AST/Type.h:2118

    bool isMemberDataPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2101

    bool isMemberFunctionPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2100

    bool isMemberPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2099

    bool isNonOverloadPlaceholderType() const

    Description

    Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType.

    Declared at: clang/include/clang/AST/Type.h:2039

    bool isNothrowT() const

    Declared at: clang/include/clang/AST/Type.h:2173

    bool isNullPtrType() const

    Declared at: clang/include/clang/AST/Type.h:2172

    bool isOCLExtOpaqueType() const

    Declared at: clang/include/clang/AST/Type.h:2198

    bool isOCLIntelSubgroupAVCType() const

    Declared at: clang/include/clang/AST/Type.h:2197

    bool isObjCARCBridgableType() const

    Declared at: clang/include/clang/AST/Type.h:2169

    bool isObjCARCImplicitlyUnretainedType() const

    Description

    Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong.

    Declared at: clang/include/clang/AST/Type.h:2207

    bool isObjCBoxableRecordType() const

    Declared at: clang/include/clang/AST/Type.h:2110

    bool isObjCBuiltinType() const

    Declared at: clang/include/clang/AST/Type.h:2168

    bool isObjCClassOrClassKindOfType() const

    Description

    Whether the type is Objective-C 'Class' or a __kindof type of an Class type, e.g., __kindof Class <NSCopying >. Unlike \c isObjCIdOrObjectKindOfType, there is no relevant bound here because Objective-C's type system cannot express "a class object for a subclass of NSFoo".

    Declared at: clang/include/clang/AST/Type.h:2164

    bool isObjCClassType() const

    Declared at: clang/include/clang/AST/Type.h:2156

    bool isObjCIdOrObjectKindOfType(
        const clang::ASTContext& ctx,
        const clang::ObjCObjectType*& bound) const

    Description

    Whether the type is Objective-C 'id' or a __kindof type of an object type, e.g., __kindof NSView * or __kindof id <NSCopying >.

    Declared at: clang/include/clang/AST/Type.h:2153

    Parameters

    const clang::ASTContext& ctx
    const clang::ObjCObjectType*& bound
    Will be set to the bound on non-id subtype types, which will be (possibly specialized) Objective-C class type, or null for 'id.

    bool isObjCIdType() const

    Declared at: clang/include/clang/AST/Type.h:2134

    bool isObjCIndependentClassType() const

    Declared at: clang/include/clang/AST/Type.h:2126

    bool isObjCIndirectLifetimeType() const

    Declared at: clang/include/clang/AST/Type.h:2124

    bool isObjCInertUnsafeUnretainedType() const

    Description

    Was this type written with the special inert-in-ARC __unsafe_unretained qualifier? This approximates the answer to the following question: if this translation unit were compiled in ARC, would this type be qualified with __unsafe_unretained?

    Declared at: clang/include/clang/AST/Type.h:2142

    bool isObjCLifetimeType() const

    Declared at: clang/include/clang/AST/Type.h:2123

    bool isObjCNSObjectType() const

    Declared at: clang/include/clang/AST/Type.h:2125

    bool isObjCObjectOrInterfaceType() const

    Declared at: clang/include/clang/AST/Type.h:2133

    bool isObjCObjectPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2121

    bool isObjCObjectType() const

    Declared at: clang/include/clang/AST/Type.h:2129

    bool isObjCQualifiedClassType() const

    Declared at: clang/include/clang/AST/Type.h:2132

    bool isObjCQualifiedIdType() const

    Declared at: clang/include/clang/AST/Type.h:2131

    bool isObjCQualifiedInterfaceType() const

    Declared at: clang/include/clang/AST/Type.h:2130

    bool isObjCRetainableType() const

    Declared at: clang/include/clang/AST/Type.h:2122

    bool isObjCSelType() const

    Declared at: clang/include/clang/AST/Type.h:2167

    bool isObjectPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2096

    bool isObjectType() const

    Description

    Determine whether this type is an object type.

    Declared at: clang/include/clang/AST/Type.h:2001

    bool isOpenCLSpecificType() const

    Declared at: clang/include/clang/AST/Type.h:2202

    bool isOverloadableType() const

    Description

    Determines whether this is a type for which one can define an overloaded operator.

    Declared at: clang/include/clang/AST/Type.h:2273

    bool isPipeType() const

    Declared at: clang/include/clang/AST/Type.h:2200

    bool isPlaceholderType() const

    Description

    Test for a type which does not represent an actual type-system type but is instead used as a placeholder for various convenient purposes within Clang. All such types are BuiltinTypes.

    Declared at: clang/include/clang/AST/Type.h:2031

    bool isPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2089

    bool isPromotableIntegerType() const

    Description

    More type predicates useful for type checking/promotion

    Declared at: clang/include/clang/AST/Type.h:2417

    bool isQueueT() const

    Declared at: clang/include/clang/AST/Type.h:2190

    bool isRValueReferenceType() const

    Declared at: clang/include/clang/AST/Type.h:2095

    bool isRealFloatingType() const

    Description

    Floating point categories.

    Declared at: clang/include/clang/AST/Type.h:2065

    bool isRealType() const

    Declared at: clang/include/clang/AST/Type.h:2076

    bool isRecordType() const

    Declared at: clang/include/clang/AST/Type.h:2107

    bool isReferenceType() const

    Declared at: clang/include/clang/AST/Type.h:2093

    bool isReserveIDT() const

    Declared at: clang/include/clang/AST/Type.h:2191

    bool isSamplerT() const

    Declared at: clang/include/clang/AST/Type.h:2187

    bool isSaturatedFixedPointType() const

    Description

    Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. This type can be signed or unsigned.

    Declared at: clang/include/clang/AST/Type.h:2446

    bool isScalarType() const

    Declared at: clang/include/clang/AST/Type.h:2079

    bool isScopedEnumeralType() const

    Description

    Determine whether this type is a scoped enumeration type.

    Declared at: clang/include/clang/AST/Type.h:2047

    bool isSignedFixedPointType() const

    Description

    Return true if this is a fixed point type that is signed according to ISO/IEC JTC1 SC22 WG14 N1169. This type can also be saturated.

    Declared at: clang/include/clang/AST/Type.h:2454

    bool isSignedIntegerOrEnumerationType() const

    Description

    Determines whether this is an integer type that is signed or an enumeration types whose underlying type is a signed integer type.

    Declared at: clang/include/clang/AST/Type.h:2431

    bool isSignedIntegerType() const

    Description

    Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation.

    Declared at: clang/include/clang/AST/Type.h:2422

    bool isSizelessBuiltinType() const

    Declared at: clang/include/clang/AST/Type.h:1969

    bool isSizelessType() const

    Description

    As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other. Standard types are all sized; sizeless types are purely an extension. Sizeless types contain data with no specified size, alignment, or layout.

    Declared at: clang/include/clang/AST/Type.h:1968

    bool isSpecificBuiltinType(unsigned int K) const

    Description

    Test for a particular builtin type.

    Declared at: clang/include/clang/AST/Type.h:2026

    Parameters

    unsigned int K

    bool isSpecificPlaceholderType(
        unsigned int K) const

    Description

    Test for a specific placeholder type.

    Declared at: clang/include/clang/AST/Type.h:2035

    Parameters

    unsigned int K

    bool isSpecifierType() const

    Description

    Returns true if this type can be represented by some set of type specifiers.

    Declared at: clang/include/clang/AST/Type.h:2467

    bool isStandardLayoutType() const

    Description

    Test if this type is a standard-layout type. (C++0x [basic.type]p9)

    Declared at: clang/include/clang/AST/Type.h:2017

    bool isStdByteType() const

    Declared at: clang/include/clang/AST/Type.h:2175

    bool isStructuralType() const

    Description

    Determine if this type is a structural type, per C++20 [temp.param]p7.

    Declared at: clang/include/clang/AST/Type.h:2013

    bool isStructureOrClassType() const

    Declared at: clang/include/clang/AST/Type.h:2112

    bool isStructureType() const

    Declared at: clang/include/clang/AST/Type.h:2109

    bool isTemplateTypeParmType() const

    Declared at: clang/include/clang/AST/Type.h:2171

    bool isTypedefNameType() const

    Description

    Determines whether this type is written as a typedef-name.

    Declared at: clang/include/clang/AST/Type.h:2179

    bool isUndeducedAutoType() const

    Declared at: clang/include/clang/AST/Type.h:2177

    bool isUndeducedType() const

    Description

    Determine whether this type is an undeduced type, meaning that it somehow involves a C++11 'auto' type or similar which has not yet been deduced.

    Declared at: clang/include/clang/AST/Type.h:2259

    bool isUnionType() const

    Declared at: clang/include/clang/AST/Type.h:2113

    bool isUnsaturatedFixedPointType() const

    Description

    Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. This type can be signed or unsigned.

    Declared at: clang/include/clang/AST/Type.h:2450

    bool isUnscopedEnumerationType() const

    Declared at: clang/include/clang/AST/Type.h:2062

    bool isUnsignedFixedPointType() const

    Description

    Return true if this is a fixed point type that is unsigned according to ISO/IEC JTC1 SC22 WG14 N1169. This type can also be saturated.

    Declared at: clang/include/clang/AST/Type.h:2458

    bool isUnsignedIntegerOrEnumerationType() const

    Description

    Determines whether this is an integer type that is unsigned or an enumeration types whose underlying type is a unsigned integer type.

    Declared at: clang/include/clang/AST/Type.h:2435

    bool isUnsignedIntegerType() const

    Description

    Return true if this is an integer type that is unsigned, according to C99 6.2.5p6 [which returns true for _Bool], or an enum decl which has an unsigned representation.

    Declared at: clang/include/clang/AST/Type.h:2427

    bool isVLSTBuiltinType() const

    Description

    Determines if this is a sizeless type supported by the 'arm_sve_vector_bits' type attribute, which can be applied to a single SVE vector or predicate, excluding tuple types such as svint32x4_t.

    Declared at: clang/include/clang/AST/Type.h:1974

    bool isVariableArrayType() const

    Declared at: clang/include/clang/AST/Type.h:2105

    bool isVariablyModifiedType() const

    Description

    Whether this type is a variably-modified type (C99 6.7.5).

    Declared at: clang/include/clang/AST/Type.h:2262

    bool isVectorType() const

    Declared at: clang/include/clang/AST/Type.h:2115

    bool isVisibilityExplicit() const

    Description

    Return true if the visibility was explicitly set is the code.

    Declared at: clang/include/clang/AST/Type.h:2478

    bool isVoidPointerType() const

    Declared at: clang/include/clang/AST/Type.h:2092

    bool isVoidType() const

    Declared at: clang/include/clang/AST/Type.h:2078

    bool isWideCharType() const

    Declared at: clang/include/clang/AST/Type.h:2050

    void setDependence(clang::TypeDependence D)

    Declared at: clang/include/clang/AST/Type.h:1910

    Parameters

    clang::TypeDependence D

    void setFromAST(bool V = true) const

    Description

    Set whether this type comes from an AST file.

    Declared at: clang/include/clang/AST/Type.h:1885

    Parameters

    bool V = true

    clang::Type* this_()

    Declared at: clang/include/clang/AST/Type.h:1908