class ObjCObjectType
Declaration
class ObjCObjectType : public Type, public ObjCProtocolQualifiers { /* full declaration omitted */ };
Description
Represents a class type in Objective C. Every Objective C type is a combination of a base type, a set of type arguments (optional, for parameterized classes) and a list of protocols. Given the following declarations: 'C' is an ObjCInterfaceType C. It is sugar for an ObjCObjectType with base C and no protocols. 'C <P >' is an unspecialized ObjCObjectType with base C and protocol list [P]. 'C <C *>' is a specialized ObjCObjectType with type arguments 'C*' and no protocol list. 'C <C *> <P >' is a specialized ObjCObjectType with base C, type arguments 'C*', and protocol list [P]. 'id' is a TypedefType which is sugar for an ObjCObjectPointerType whose pointee is an ObjCObjectType with base BuiltinType::ObjCIdType and no protocols. 'id <P >' is an ObjCObjectPointerType whose pointee is an ObjCObjectType with base BuiltinType::ObjCIdType and protocol list [P]. Eventually this should get its own sugar class to better represent the source.
Declared at: clang/include/clang/AST/Type.h:5951
Inherits from: Type, ObjCProtocolQualifiers
Member Variables
- private clang::QualType BaseType
- Either a BuiltinType or an InterfaceType or sugar for either.
- private llvm:: PointerIntPair<const ObjCObjectType*, 1, bool> CachedSuperClassType
- Cached superclass type.
Inherited from Type:
Method Overview
- protected ObjCObjectType(clang::QualType Canonical, clang::QualType Base, ArrayRef<clang::QualType> typeArgs, ArrayRef<clang::ObjCProtocolDecl *> protocols, bool isKindOf)
- protected ObjCObjectType(enum Nonce_ObjCInterface)
- public static bool classof(const clang::Type * T)
- protected void computeSuperClassTypeSlow() const
- public clang::QualType desugar() const
- public clang::QualType getBaseType() const
- public clang::ObjCInterfaceDecl * getInterface() const
- private unsigned int getNumProtocolsImpl() const
- private clang::ObjCProtocolDecl ** getProtocolStorageImpl()
- public clang::QualType getSuperClassType() const
- private const clang::QualType * getTypeArgStorage() const
- private clang::QualType * getTypeArgStorage()
- public ArrayRef<clang::QualType> getTypeArgs() const
- public ArrayRef<clang::QualType> getTypeArgsAsWritten() const
- public bool isKindOfType() const
- public bool isKindOfTypeAsWritten() const
- public bool isObjCClass() const
- public bool isObjCId() const
- public bool isObjCQualifiedClass() const
- public bool isObjCQualifiedId() const
- public bool isObjCUnqualifiedClass() const
- public bool isObjCUnqualifiedId() const
- public bool isObjCUnqualifiedIdOrClass() const
- public bool isSpecialized() const
- public bool isSpecializedAsWritten() const
- public bool isSugared() const
- public bool isUnspecialized() const
- public bool isUnspecializedAsWritten() const
- private void setNumProtocolsImpl(unsigned int N)
- public clang::QualType stripObjCKindOfTypeAndQuals(const clang::ASTContext & ctx) const
Inherited from Type:
- public acceptsObjCTypeParams
- protected addDependence
- public canDecayToPointerType
- public canHaveNullability
- public castAs
- public castAsArrayTypeUnsafe
- public containsErrors
- public containsUnexpandedParameterPack
- public dump
- public dump
- public getArrayElementTypeNoTypeQual
- public getAs
- public getAsAdjusted
- public getAsArrayTypeUnsafe
- public getAsCXXRecordDecl
- public getAsComplexIntegerType
- public getAsObjCInterfacePointerType
- public getAsObjCInterfaceType
- public getAsObjCQualifiedClassType
- public getAsObjCQualifiedIdType
- public getAsObjCQualifiedInterfaceType
- public getAsPlaceholderType
- public getAsRecordDecl
- public getAsStructureType
- public getAsTagDecl
- public getAsUnionType
- public getBaseElementTypeUnsafe
- public getCanonicalTypeInternal
- public getCanonicalTypeUnqualified
- public getContainedAutoType
- public getContainedDeducedType
- public getDependence
- public getLinkage
- public getLinkageAndVisibility
- public getLocallyUnqualifiedSingleStepDesugaredType
- public getNullability
- public getObjCARCImplicitLifetime
- public getObjCSubstitutions
- public getPointeeCXXRecordDecl
- public getPointeeOrArrayElementType
- public getPointeeType
- public getScalarTypeKind
- public getSveEltType
- public getTypeClass
- public getTypeClassName
- public getUnqualifiedDesugaredType
- public getVisibility
- public hasAttr
- public hasAutoForTrailingReturnType
- public hasFloatingRepresentation
- public hasIntegerRepresentation
- public hasObjCPointerRepresentation
- public hasPointerRepresentation
- public hasSignedIntegerRepresentation
- public hasSizedVLAType
- public hasUnnamedOrLocalType
- public hasUnsignedIntegerRepresentation
- public isAggregateType
- public isAlignValT
- public isAnyCharacterType
- public isAnyComplexType
- public isAnyPointerType
- public isArithmeticType
- public isArrayType
- public isAtomicType
- public isBFloat16Type
- public isBitIntType
- public isBlockCompatibleObjCPointerType
- public isBlockPointerType
- public isBooleanType
- public isBuiltinType
- public isCARCBridgableType
- public isCUDADeviceBuiltinSurfaceType
- public isCUDADeviceBuiltinTextureType
- public isCanonicalUnqualified
- public isChar16Type
- public isChar32Type
- public isChar8Type
- public isCharType
- public isClassType
- public isClkEventT
- public isComplexIntegerType
- public isComplexType
- public isCompoundType
- public isConstantArrayType
- public isConstantMatrixType
- public isConstantSizeType
- public isDecltypeType
- public isDependentAddressSpaceType
- public isDependentSizedArrayType
- public isDependentType
- public isElaboratedTypeSpecifier
- public isEnumeralType
- public isEventT
- public isExtVectorBoolType
- public isExtVectorType
- public isFixedPointOrIntegerType
- public isFixedPointType
- public isFloat128Type
- public isFloat16Type
- public isFloatingType
- public isFromAST
- public isFunctionNoProtoType
- public isFunctionPointerType
- public isFunctionProtoType
- public isFunctionReferenceType
- public isFunctionType
- public isFundamentalType
- public isHalfType
- public isIbm128Type
- public isImageType
- public isIncompleteArrayType
- public isIncompleteOrObjectType
- public isIncompleteType
- public isInstantiationDependentType
- public isIntegerType
- public isIntegralOrEnumerationType
- public isIntegralOrUnscopedEnumerationType
- public isIntegralType
- public isInterfaceType
- public isLValueReferenceType
- public isLinkageValid
- public isLiteralType
- public isMatrixType
- public isMemberDataPointerType
- public isMemberFunctionPointerType
- public isMemberPointerType
- public isNonOverloadPlaceholderType
- public isNothrowT
- public isNullPtrType
- public isOCLExtOpaqueType
- public isOCLIntelSubgroupAVCType
- public isObjCARCBridgableType
- public isObjCARCImplicitlyUnretainedType
- public isObjCBoxableRecordType
- public isObjCBuiltinType
- public isObjCClassOrClassKindOfType
- public isObjCClassType
- public isObjCIdOrObjectKindOfType
- public isObjCIdType
- public isObjCIndependentClassType
- public isObjCIndirectLifetimeType
- public isObjCInertUnsafeUnretainedType
- public isObjCLifetimeType
- public isObjCNSObjectType
- public isObjCObjectOrInterfaceType
- public isObjCObjectPointerType
- public isObjCObjectType
- public isObjCQualifiedClassType
- public isObjCQualifiedIdType
- public isObjCQualifiedInterfaceType
- public isObjCRetainableType
- public isObjCSelType
- public isObjectPointerType
- public isObjectType
- public isOpenCLSpecificType
- public isOverloadableType
- public isPipeType
- public isPlaceholderType
- public isPointerType
- public isPromotableIntegerType
- public isQueueT
- public isRValueReferenceType
- public isRealFloatingType
- public isRealType
- public isRecordType
- public isReferenceType
- public isReserveIDT
- public isSamplerT
- public isSaturatedFixedPointType
- public isScalarType
- public isScopedEnumeralType
- public isSignedFixedPointType
- public isSignedIntegerOrEnumerationType
- public isSignedIntegerType
- public isSizelessBuiltinType
- public isSizelessType
- public isSpecificBuiltinType
- public isSpecificPlaceholderType
- public isSpecifierType
- public isStandardLayoutType
- public isStdByteType
- public isStructuralType
- public isStructureOrClassType
- public isStructureType
- public isTemplateTypeParmType
- public isTypedefNameType
- public isUndeducedAutoType
- public isUndeducedType
- public isUnionType
- public isUnsaturatedFixedPointType
- public isUnscopedEnumerationType
- public isUnsignedFixedPointType
- public isUnsignedIntegerOrEnumerationType
- public isUnsignedIntegerType
- public isVLSTBuiltinType
- public isVariableArrayType
- public isVariablyModifiedType
- public isVectorType
- public isVisibilityExplicit
- public isVoidPointerType
- public isVoidType
- public isWideCharType
- protected setDependence
- protected this_
Inherited from ExtQualsTypeCommonBase:
Methods
¶ObjCObjectType(
clang::QualType Canonical,
clang::QualType Base,
ArrayRef<clang::QualType> typeArgs,
ArrayRef<clang::ObjCProtocolDecl*> protocols,
bool isKindOf)
ObjCObjectType(
clang::QualType Canonical,
clang::QualType Base,
ArrayRef<clang::QualType> typeArgs,
ArrayRef<clang::ObjCProtocolDecl*> protocols,
bool isKindOf)
Declared at: clang/include/clang/AST/Type.h:5992
Parameters
- clang::QualType Canonical
- clang::QualType Base
- ArrayRef<clang::QualType> typeArgs
- ArrayRef<clang::ObjCProtocolDecl*> protocols
- bool isKindOf
¶ObjCObjectType(enum Nonce_ObjCInterface)
ObjCObjectType(enum Nonce_ObjCInterface)
Declared at: clang/include/clang/AST/Type.h:5997
Parameters
- enum Nonce_ObjCInterface
¶static bool classof(const clang::Type* T)
static bool classof(const clang::Type* T)
Declared at: clang/include/clang/AST/Type.h:6094
Parameters
- const clang::Type* T
¶void computeSuperClassTypeSlow() const
void computeSuperClassTypeSlow() const
Declared at: clang/include/clang/AST/Type.h:6005
¶clang::QualType desugar() const
clang::QualType desugar() const
Declared at: clang/include/clang/AST/Type.h:6092
¶clang::QualType getBaseType() const
clang::QualType getBaseType() const
Description
Gets the base type of this object type. This is always (possibly sugar for) one of: - the 'id' builtin type (as opposed to the 'id' type visible to the user, which is a typedef for an ObjCObjectPointerType) - the 'Class' builtin type (same caveat) - an ObjCObjectType (currently always an ObjCInterfaceType)
Declared at: clang/include/clang/AST/Type.h:6014
¶clang::ObjCInterfaceDecl* getInterface() const
clang::ObjCInterfaceDecl* getInterface() const
Description
Gets the interface declaration for this object type, if the base type really is an interface.
Declared at: clang/include/clang/AST/Type.h:6038
¶unsigned int getNumProtocolsImpl() const
unsigned int getNumProtocolsImpl() const
Description
Return the number of qualifying protocols in this interface type, or 0 if there are none.
Declared at: clang/include/clang/AST/Type.h:5982
¶clang::ObjCProtocolDecl** getProtocolStorageImpl()
clang::ObjCProtocolDecl** getProtocolStorageImpl()
Declared at: clang/include/clang/AST/Type.h:5979
¶clang::QualType getSuperClassType() const
clang::QualType getSuperClassType() const
Description
Retrieve the type of the superclass of this object type. This operation substitutes any type arguments into the superclass of the current class type, potentially producing a specialization of the superclass type. Produces a null type if there is no superclass.
Declared at: clang/include/clang/AST/Type.h:6079
¶const clang::QualType* getTypeArgStorage() const
const clang::QualType* getTypeArgStorage() const
Declared at: clang/include/clang/AST/Type.h:5975
¶clang::QualType* getTypeArgStorage()
clang::QualType* getTypeArgStorage()
Declared at: clang/include/clang/AST/Type.h:5974
¶ArrayRef<clang::QualType> getTypeArgs() const
ArrayRef<clang::QualType> getTypeArgs() const
Description
Retrieve the type arguments of this object type (semantically).
Declared at: clang/include/clang/AST/Type.h:6058
¶ArrayRef<clang::QualType> getTypeArgsAsWritten()
const
ArrayRef<clang::QualType> getTypeArgsAsWritten()
const
Description
Retrieve the type arguments of this object type as they were written.
Declared at: clang/include/clang/AST/Type.h:6062
¶bool isKindOfType() const
bool isKindOfType() const
Description
Whether this ia a "__kindof" type (semantically).
Declared at: clang/include/clang/AST/Type.h:6071
¶bool isKindOfTypeAsWritten() const
bool isKindOfTypeAsWritten() const
Description
Whether this is a "__kindof" type as written.
Declared at: clang/include/clang/AST/Type.h:6068
¶bool isObjCClass() const
bool isObjCClass() const
Declared at: clang/include/clang/AST/Type.h:6020
¶bool isObjCId() const
bool isObjCId() const
Declared at: clang/include/clang/AST/Type.h:6016
¶bool isObjCQualifiedClass() const
bool isObjCQualifiedClass() const
Declared at: clang/include/clang/AST/Type.h:6034
¶bool isObjCQualifiedId() const
bool isObjCQualifiedId() const
Declared at: clang/include/clang/AST/Type.h:6033
¶bool isObjCUnqualifiedClass() const
bool isObjCUnqualifiedClass() const
Declared at: clang/include/clang/AST/Type.h:6025
¶bool isObjCUnqualifiedId() const
bool isObjCUnqualifiedId() const
Declared at: clang/include/clang/AST/Type.h:6024
¶bool isObjCUnqualifiedIdOrClass() const
bool isObjCUnqualifiedIdOrClass() const
Declared at: clang/include/clang/AST/Type.h:6026
¶bool isSpecialized() const
bool isSpecialized() const
Description
Determine whether this object type is "specialized", meaning that it has type arguments.
Declared at: clang/include/clang/AST/Type.h:6042
¶bool isSpecializedAsWritten() const
bool isSpecializedAsWritten() const
Description
Determine whether this object type was written with type arguments.
Declared at: clang/include/clang/AST/Type.h:6045
¶bool isSugared() const
bool isSugared() const
Declared at: clang/include/clang/AST/Type.h:6091
¶bool isUnspecialized() const
bool isUnspecialized() const
Description
Determine whether this object type is "unspecialized", meaning that it has no type arguments.
Declared at: clang/include/clang/AST/Type.h:6051
¶bool isUnspecializedAsWritten() const
bool isUnspecializedAsWritten() const
Description
Determine whether this object type is "unspecialized" as written, meaning that it has no type arguments.
Declared at: clang/include/clang/AST/Type.h:6055
¶void setNumProtocolsImpl(unsigned int N)
void setNumProtocolsImpl(unsigned int N)
Declared at: clang/include/clang/AST/Type.h:5985
Parameters
- unsigned int N
¶clang::QualType stripObjCKindOfTypeAndQuals(
const clang::ASTContext& ctx) const
clang::QualType stripObjCKindOfTypeAndQuals(
const clang::ASTContext& ctx) const
Description
Strip off the Objective-C "kindof" type and (with it) any protocol qualifiers.
Declared at: clang/include/clang/AST/Type.h:6089
Parameters
- const clang::ASTContext& ctx