clang 10.0.0git

Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
clang::ObjCObjectType Class Reference

Represents a class type in Objective C. More...

`#include "clang/AST/Type.h"`

Inheritance diagram for clang::ObjCObjectType:
[legend]
Collaboration diagram for clang::ObjCObjectType:
[legend]

## Public Member Functions
QualType | getBaseType () const
| Gets the base type of this object type. More...
bool | isObjCId () const
bool | isObjCClass () const
bool | isObjCUnqualifiedId () const
bool | isObjCUnqualifiedClass () const
bool | isObjCUnqualifiedIdOrClass () const
bool | isObjCQualifiedId () const
bool | isObjCQualifiedClass () const
ObjCInterfaceDecl * | getInterface () const
| Gets the interface declaration for this object type, if the base type really is an interface. More...
bool | isSpecialized () const
| Determine whether this object type is "specialized", meaning that it has type arguments. More...
bool | isSpecializedAsWritten () const
| Determine whether this object type was written with type arguments. More...
bool | isUnspecialized () const
| Determine whether this object type is "unspecialized", meaning that it has no type arguments. More...
bool | isUnspecializedAsWritten () const
| Determine whether this object type is "unspecialized" as written, meaning that it has no type arguments. More...
ArrayRef< QualType > | getTypeArgs () const
| Retrieve the type arguments of this object type (semantically). More...
ArrayRef< QualType > | getTypeArgsAsWritten () const
| Retrieve the type arguments of this object type as they were written. More...
bool | isKindOfTypeAsWritten () const
| Whether this is a "__kindof" type as written. More...
bool | isKindOfType () const
| Whether this ia a "__kindof" type (semantically). More...
QualType | getSuperClassType () const
| Retrieve the type of the superclass of this object type. More...
QualType | stripObjCKindOfTypeAndQuals (const ASTContext &ctx) const
| Strip off the Objective-C "kindof" type and (with it) any protocol qualifiers. More...
bool | isSugared () const
QualType | desugar () const
Public Member Functions inherited from clang::Type
| Type (const Type &)=delete
| Type (Type &&)=delete
Type & | operator= (const Type &)=delete
Type & | operator= (Type &&)=delete
TypeClass | getTypeClass () const
bool | isFromAST () const
| Whether this type comes from an AST file. More...
bool | containsUnexpandedParameterPack () const
| Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates. More...
bool | isCanonicalUnqualified () const
| Determines if this type would be canonical if it had no further qualification. More...
QualType | getLocallyUnqualifiedSingleStepDesugaredType () const
| Pull a single level of sugar off of this locally-unqualified type. More...
bool | isIncompleteType (NamedDecl **Def=nullptr) const
| Types are partitioned into 3 broad categories (C99 6.2.5p1): object types, function types, and incomplete types. More...
bool | isIncompleteOrObjectType () const
| Return true if this is an incomplete or object type, in other words, not a function type. More...
bool | isObjectType () const
| Determine whether this type is an object type. More...
bool | isLiteralType (const ASTContext &Ctx) const
| Return true if this is a literal type (C++11 [basic.types]p10) More...
bool | isStandardLayoutType () const
| Test if this type is a standard-layout type. More...
bool | isBuiltinType () const
| Helper methods to distinguish type categories. More...
bool | isSpecificBuiltinType (unsigned K) const
| Test for a particular builtin type. More...
bool | isPlaceholderType () const
| 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. More...
const BuiltinType * | getAsPlaceholderType () const
bool | isSpecificPlaceholderType (unsigned K) const
| Test for a specific placeholder type. More...
bool | isNonOverloadPlaceholderType () const
| Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType. More...
bool | isIntegerType () const
| isIntegerType() does not include complex integers (a GCC extension). More...
bool | isEnumeralType () const
bool | isScopedEnumeralType () const
| Determine whether this type is a scoped enumeration type. More...
bool | isBooleanType () const
bool | isCharType () const
bool | isWideCharType () const
bool | isChar8Type () const
bool | isChar16Type () const
bool | isChar32Type () const
bool | isAnyCharacterType () const
| Determine whether this type is any of the built-in character types. More...
bool | isIntegralType (const ASTContext &Ctx) const
| Determine whether this type is an integral type. More...
bool | isIntegralOrEnumerationType () const
| Determine whether this type is an integral or enumeration type. More...
bool | isIntegralOrUnscopedEnumerationType () const
| Determine whether this type is an integral or unscoped enumeration type. More...
bool | isUnscopedEnumerationType () const
bool | isRealFloatingType () const
| Floating point categories. More...
bool | isComplexType () const
| isComplexType() does not include complex integers (a GCC extension). More...
bool | isAnyComplexType () const
bool | isFloatingType () const
bool | isHalfType () const
bool | isFloat16Type () const
bool | isFloat128Type () const
bool | isRealType () const
bool | isArithmeticType () const
bool | isVoidType () const
bool | isScalarType () const
bool | isAggregateType () const
| Determines whether the type is a C++ aggregate type or C aggregate or union type. More...
bool | isFundamentalType () const
| Tests whether the type is categorized as a fundamental type. More...
bool | isCompoundType () const
| Tests whether the type is categorized as a compound type. More...
bool | isFunctionType () const
bool | isFunctionNoProtoType () const
bool | isFunctionProtoType () const
bool | isPointerType () const
bool | isAnyPointerType () const
bool | isBlockPointerType () const
bool | isVoidPointerType () const
bool | isReferenceType () const
bool | isLValueReferenceType () const
bool | isRValueReferenceType () const
bool | isObjectPointerType () const
bool | isFunctionPointerType () const
bool | isFunctionReferenceType () const
bool | isMemberPointerType () const
bool | isMemberFunctionPointerType () const
bool | isMemberDataPointerType () const
bool | isArrayType () const
bool | isConstantArrayType () const
bool | isIncompleteArrayType () const
bool | isVariableArrayType () const
bool | isDependentSizedArrayType () const
bool | isRecordType () const
bool | isClassType () const
bool | isStructureType () const
bool | isObjCBoxableRecordType () const
bool | isInterfaceType () const
bool | isStructureOrClassType () const
bool | isUnionType () const
bool | isComplexIntegerType () const
bool | isVectorType () const
bool | isExtVectorType () const
bool | isDependentAddressSpaceType () const
bool | isObjCObjectPointerType () const
bool | isObjCRetainableType () const
bool | isObjCLifetimeType () const
| Returns true if objects of this type have lifetime semantics under ARC. More...
bool | isObjCIndirectLifetimeType () const
bool | isObjCNSObjectType () const
bool | isObjCIndependentClassType () const
bool | isObjCObjectType () const
bool | isObjCQualifiedInterfaceType () const
bool | isObjCQualifiedIdType () const
bool | isObjCQualifiedClassType () const
bool | isObjCObjectOrInterfaceType () const
bool | isObjCIdType () const
bool | isDecltypeType () const
bool | isObjCInertUnsafeUnretainedType () const
| Was this type written with the special inert-in-ARC __unsafe_unretained qualifier? More...
bool | isObjCIdOrObjectKindOfType (const ASTContext &ctx, const ObjCObjectType *&bound) const
| Whether the type is Objective-C 'id' or a __kindof type of an object type, e.g., __kindof NSView * or __kindof id <NSCopying>. More...
bool | isObjCClassType () const
bool | isObjCClassOrClassKindOfType () const
| Whether the type is Objective-C 'Class' or a __kindof type of an Class type, e.g., __kindof Class <NSCopying>. More...
bool | isBlockCompatibleObjCPointerType (ASTContext &ctx) const
bool | isObjCSelType () const
bool | isObjCBuiltinType () const
bool | isObjCARCBridgableType () const
| Determine whether the given type T is a "bridgable" Objective-C type, which is either an Objective-C object pointer type or an. More...
bool | isCARCBridgableType () const
| Determine whether the given type T is a "bridgeable" C type. More...
bool | isTemplateTypeParmType () const
bool | isNullPtrType () const
bool | isNothrowT () const
bool | isAlignValT () const
bool | isStdByteType () const
bool | isAtomicType () const
bool | isUndeducedAutoType () const
bool | isImageType () const
bool | isSamplerT () const
bool | isEventT () const
bool | isClkEventT () const
bool | isQueueT () const
bool | isReserveIDT () const
bool | isOCLIntelSubgroupAVCType () const
bool | isOCLExtOpaqueType () const
bool | isPipeType () const
bool | isOpenCLSpecificType () const
bool | isObjCARCImplicitlyUnretainedType () const
| Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong. More...
Qualifiers::ObjCLifetime | getObjCARCImplicitLifetime () const
| Return the implicit lifetime for this type, which must not be dependent. More...
ScalarTypeKind | getScalarTypeKind () const
| Given that this is a scalar type, classify it. More...
bool | isDependentType () const
| Whether this type is a dependent type, meaning that its definition somehow depends on a template parameter (C++ [temp.dep.type]). More...
bool | isInstantiationDependentType () const
| 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). More...
bool | isUndeducedType () const
| 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. More...
bool | isVariablyModifiedType () const
| Whether this type is a variably-modified type (C99 6.7.5). More...
bool | hasSizedVLAType () const
| Whether this type involves a variable-length array type with a definite size. More...
bool | hasUnnamedOrLocalType () const
| Whether this type is or contains a local or unnamed type. More...
bool | isOverloadableType () const
| Determines whether this is a type for which one can define an overloaded operator. More...
bool | isElaboratedTypeSpecifier () const
| Determine wither this type is a C++ elaborated-type-specifier. More...
bool | canDecayToPointerType () const
| Determines whether this type can decay to a pointer type. More...
bool | hasPointerRepresentation () const
| Whether this type is represented natively as a pointer. More...
bool | hasObjCPointerRepresentation () const
| Whether this type can represent an objective pointer type for the purpose of GC'ability. More...
bool | hasIntegerRepresentation () const
| Determine whether this type has an integer representation of some sort, e.g., it is an integer type or a vector. More...
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. More...
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. More...
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. More...
const RecordType * | getAsStructureType () const
const RecordType * | getAsUnionType () const
| NOTE: getAs*ArrayType are methods on ASTContext. More...
const ComplexType * | getAsComplexIntegerType () const
const ObjCObjectType * | getAsObjCInterfaceType () const
const ObjCObjectPointerType * | getAsObjCInterfacePointerType () const
const ObjCObjectPointerType * | getAsObjCQualifiedIdType () const
const ObjCObjectPointerType * | getAsObjCQualifiedClassType () const
const ObjCObjectType * | getAsObjCQualifiedInterfaceType () const
CXXRecordDecl * | getAsCXXRecordDecl () const
| 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. More...
RecordDecl * | getAsRecordDecl () const
| Retrieves the RecordDecl this type refers to. More...
TagDecl * | getAsTagDecl () const
| 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. More...
const CXXRecordDecl * | getPointeeCXXRecordDecl () const
| If this is a pointer or reference to a RecordType, return the CXXRecordDecl that the type refers to. More...
DeducedType * | getContainedDeducedType () const
| Get the DeducedType whose type will be deduced for a variable with an initializer of this type. More...
AutoType * | getContainedAutoType () const
| Get the AutoType whose type will be deduced for a variable with an initializer of this type. More...
bool | hasAutoForTrailingReturnType () const
| 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). More...
template<typename T >
const T * | getAs () const
| Member-template getAs<specific type>'. More...
template<typename T >
const T * | getAsAdjusted () const
| Member-template getAsAdjusted<specific type>. More...
const ArrayType * | getAsArrayTypeUnsafe () const
| A variant of getAs<> for array types which silently discards qualifiers from the outermost type. More...
template<typename T >
const T * | castAs () const
| Member-template castAs<specific type>. More...
const ArrayType * | castAsArrayTypeUnsafe () const
| A variant of castAs<> for array type which silently discards qualifiers from the outermost type. More...
bool | hasAttr (attr::Kind AK) const
| Determine whether this type had the specified attribute applied to it (looking through top-level type sugar). More...
const Type * | getBaseElementTypeUnsafe () const
| Get the base element type of this type, potentially discarding type qualifiers. More...
const Type * | getArrayElementTypeNoTypeQual () const
| If this is an array type, return the element type of the array, potentially with type qualifiers missing. More...
const Type * | getPointeeOrArrayElementType () const
| If this is a pointer type, return the pointee type. More...
QualType | getPointeeType () const
| If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee. More...
const Type * | getUnqualifiedDesugaredType () const
| Return the specified type with any "sugar" removed from the type, removing any typedefs, typeofs, etc., as well as any qualifiers. More...
bool | isPromotableIntegerType () const
| More type predicates useful for type checking/promotion. More...
bool | isSignedIntegerType () const
| 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. More...
bool | isUnsignedIntegerType () const
| 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. More...
bool | isSignedIntegerOrEnumerationType () const
| Determines whether this is an integer type that is signed or an enumeration types whose underlying type is a signed integer type. More...
bool | isUnsignedIntegerOrEnumerationType () const
| Determines whether this is an integer type that is unsigned or an enumeration types whose underlying type is a unsigned integer type. More...
bool | isFixedPointType () const
| Return true if this is a fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. More...
bool | isFixedPointOrIntegerType () const
| Return true if this is a fixed point or integer type. More...
bool | isSaturatedFixedPointType () const
| Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. More...
bool | isUnsaturatedFixedPointType () const
| Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. More...
bool | isSignedFixedPointType () const
| Return true if this is a fixed point type that is signed according to ISO/IEC JTC1 SC22 WG14 N1169. More...
bool | isUnsignedFixedPointType () const
| Return true if this is a fixed point type that is unsigned according to ISO/IEC JTC1 SC22 WG14 N1169. More...
bool | isConstantSizeType () const
| Return true if this is not a variable sized type, according to the rules of C99 6.7.5p3. More...
bool | isSpecifierType () const
| Returns true if this type can be represented by some set of type specifiers. More...
Linkage | getLinkage () const
| Determine the linkage of this type. More...
Visibility | getVisibility () const
| Determine the visibility of this type. More...
bool | isVisibilityExplicit () const
| Return true if the visibility was explicitly set is the code. More...
LinkageInfo | getLinkageAndVisibility () const
| Determine the linkage and visibility of this type. More...
bool | isLinkageValid () const
| True if the computed linkage is valid. More...
Optional< NullabilityKind > | getNullability (const ASTContext &context) const
| Determine the nullability of the given type. More...
bool | canHaveNullability (bool ResultIfUnknown=true) const
| Determine whether the given type can have a nullability specifier applied to it, i.e., if it is any kind of pointer type. More...
Optional< ArrayRef< QualType > > | getObjCSubstitutions (const DeclContext *dc) const
| Retrieve the set of substitutions required when accessing a member of the Objective-C receiver type that is declared in the given context. More...
bool | acceptsObjCTypeParams () const
| Determines if this is an ObjC interface type that may accept type parameters. More...
const char * | getTypeClassName () const
QualType | getCanonicalTypeInternal () const
CanQualType | getCanonicalTypeUnqualified () const
void | dump () const
void | dump (llvm::raw_ostream &OS) const
template<>
const TypedefType * | getAs () const
| This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type. More...
template<>
const TemplateSpecializationType * | getAs () const
| This will check for a TemplateSpecializationType by removing any existing sugar until it reaches a TemplateSpecializationType or a non-sugared type. More...
template<>
const AttributedType * | getAs () const
| This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type. More...
Public Member Functions inherited from clang::ObjCProtocolQualifiers< ObjCObjectType >
qual_range | quals () const
qual_iterator | qual_begin () const
qual_iterator | qual_end () const
bool | qual_empty () const
unsigned | getNumProtocols () const
| Return the number of qualifying protocols in this type, or 0 if there are none. More...
ObjCProtocolDecl * | getProtocol (unsigned I) const
| Fetch a protocol by index. More...
ArrayRef< ObjCProtocolDecl *> | getProtocols () const
| Retrieve all of the protocol qualifiers. More...

## Static Public Member Functions
static bool | classof (const Type *T)

## Protected Types
enum | Nonce_ObjCInterface { Nonce_ObjCInterface }
Protected Types inherited from clang::Type
enum | { NumTypeWithKeywordBits = 8 }

## Protected Member Functions
| ObjCObjectType (QualType Canonical, QualType Base, ArrayRef< QualType > typeArgs, ArrayRef< ObjCProtocolDecl *> protocols, bool isKindOf)
| ObjCObjectType (enum Nonce_ObjCInterface)
void | computeSuperClassTypeSlow () const
Protected Member Functions inherited from clang::Type
| Type (TypeClass tc, QualType canon, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack)
Type * | this_ ()
void | setDependent (bool D=true)
void | setInstantiationDependent (bool D=true)
void | setVariablyModified (bool VM=true)
void | setContainsUnexpandedParameterPack (bool PP=true)
Protected Member Functions inherited from clang::ObjCProtocolQualifiers< ObjCObjectType >
| ObjCProtocolQualifiers ()=default
ObjCProtocolDecl *const * | getProtocolStorage () const
ObjCProtocolDecl ** | getProtocolStorage ()
void | setNumProtocols (unsigned N)
void | initialize (ArrayRef< ObjCProtocolDecl * > protocols)

## Friends
class | ObjCProtocolQualifiers< ObjCObjectType >

## Additional Inherited Members
Public Types inherited from clang::Type
enum | TypeClass
enum | ScalarTypeKind { STK_CPointer, STK_BlockPointer, STK_ObjCObjectPointer, STK_MemberPointer, STK_Bool, STK_Integral, STK_Floating, STK_IntegralComplex, STK_FloatingComplex, STK_FixedPoint }
Public Types inherited from clang::ObjCProtocolQualifiers< ObjCObjectType >
using | qual_iterator = ObjCProtocolDecl *const *
using | qual_range = llvm::iterator_range< qual_iterator >
Protected Attributes inherited from clang::Type
union {
TypeBitfields TypeBits
ArrayTypeBitfields ArrayTypeBits
ConstantArrayTypeBitfields ConstantArrayTypeBits
AttributedTypeBitfields AttributedTypeBits
AutoTypeBitfields AutoTypeBits
BuiltinTypeBitfields BuiltinTypeBits
FunctionTypeBitfields FunctionTypeBits
ObjCObjectTypeBitfields ObjCObjectTypeBits
ReferenceTypeBitfields ReferenceTypeBits
TypeWithKeywordBitfields TypeWithKeywordBits
ElaboratedTypeBitfields ElaboratedTypeBits
VectorTypeBitfields VectorTypeBits
SubstTemplateTypeParmPackTypeBitfields SubstTemplateTypeParmPackTypeBits
TemplateSpecializationTypeBitfields TemplateSpecializationTypeBits
DependentTemplateSpecializationTypeBitfields DependentTemplateSpecializationTypeBits
PackExpansionTypeBitfields PackExpansionTypeBits
}; |

## Detailed 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:

\@class C<T>;
\@protocol P;

'C' is an ObjCInterfaceType C. It is sugar for an ObjCObjectType with base C and no protocols.

'C

' 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*>

' 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

' 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.

Definition at line 5694 of file Type.h.

## Member Enumeration Documentation

## ◆ Nonce_ObjCInterface

enum clang::ObjCObjectType::Nonce_ObjCInterface
| protected

Enumerator
Nonce_ObjCInterface |

Definition at line 5733 of file Type.h.

## Constructor & Destructor Documentation

## ◆ ObjCObjectType() [1/2]

ObjCObjectType::ObjCObjectType | ( | QualType | Canonical,
|  | QualType | Base,
|  | ArrayRef< QualType > | typeArgs,
|  | ArrayRef< ObjCProtocolDecl *> | protocols,
|  | bool | isKindOf
| ) |  |
| protected

Definition at line 666 of file Type.cpp.

References getTypeArgsAsWritten(), clang::ObjCProtocolQualifiers< ObjCObjectType >::initialize(), memcpy(), clang::Type::ObjCObjectTypeBits, clang::ExtQualsTypeCommonBase::QualType, clang::Type::setContainsUnexpandedParameterPack(), clang::Type::setDependent(), and clang::Type::setInstantiationDependent().

## ◆ ObjCObjectType() [2/2]

clang::ObjCObjectType::ObjCObjectType | ( | enum | Nonce_ObjCInterface | ) |
| inline protected

Definition at line 5740 of file Type.h.

## Member Function Documentation

## ◆ classof()

static bool clang::ObjCObjectType::classof | ( | const Type * | T | ) |
| inline static

Definition at line 5837 of file Type.h.

References clang::Type::getTypeClass().

## ◆ computeSuperClassTypeSlow()

void ObjCObjectType::computeSuperClassTypeSlow | ( |  | ) | const
| protected

Definition at line 1537 of file Type.cpp.

References clang::Type::castAs(), clang::Decl::getASTContext(), getInterface(), clang::ASTContext::getObjCInterfaceType(), clang::ObjCInterfaceDecl::getSuperClassType(), getTypeArgs(), clang::ObjCInterfaceDecl::getTypeParamList(), isUnspecialized(), clang::ObjCTypeParamList::size(), clang::QualType::substObjCTypeArgs(), and clang::Superclass.

## ◆ desugar()

QualType clang::ObjCObjectType::desugar | ( |  | ) | const
| inline

Definition at line 5835 of file Type.h.

## ◆ getBaseType()

QualType clang::ObjCObjectType::getBaseType | ( |  | ) | const
| inline

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)

Definition at line 5757 of file Type.h.

Referenced by clang::ASTContext::applyObjCProtocolQualifiers(), clang::CodeGen::CGDebugInfo::completeRequiredType(), getTypeArgs(), clang::Type::isIncompleteType(), isKindOfType(), isSpecialized(), mangleAArch64VectorBase(), stripObjCKindOfTypeAndQuals(), and clang::ASTNodeImporter::VisitObjCObjectType().

## ◆ getInterface()

ObjCInterfaceDecl * clang::ObjCObjectType::getInterface | ( |  | ) | const
| inline

Gets the interface declaration for this object type, if the base type really is an interface.

Definition at line 5930 of file Type.h.

References clang::Type::getAs().

Referenced by clang::Sema::ActOnCompatibilityAlias(), clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), clang::Sema::checkInitMethod(), clang::Sema::CheckObjCForCollectionOperand(), computeSuperClassTypeSlow(), EvaluateBinaryTypeTrait(), FilterMethodsByTypeBound(), clang::ObjCObjectPointerType::getInterfaceType(), clang::Type::getObjCSubstitutions(), isNSStringType(), clang::Sema::LookupMethodInObjectType(), maybeAdjustInterfaceForSubscriptingCheck(), ShouldTryAgainWithRedefinitionType(), and tryEmitSpecializedAllocInit().

## ◆ getSuperClassType()

QualType clang::ObjCObjectType::getSuperClassType | ( |  | ) | const
| inline

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.

Definition at line 5822 of file Type.h.

Referenced by clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), getMostInformativeDerivedClassImpl(), and clang::Type::getObjCSubstitutions().

## ◆ getTypeArgs()

ArrayRef< QualType > ObjCObjectType::getTypeArgs | ( |  | ) | const

Retrieve the type arguments of this object type (semantically).

Definition at line 716 of file Type.cpp.

References getBaseType(), getTypeArgsAsWritten(), and isSpecializedAsWritten().

Referenced by clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), computeSuperClassTypeSlow(), clang::Type::getObjCSubstitutions(), and mangleAArch64VectorBase().

## ◆ getTypeArgsAsWritten()

ArrayRef<QualType> clang::ObjCObjectType::getTypeArgsAsWritten | ( |  | ) | const
| inline

Retrieve the type arguments of this object type as they were written.

Definition at line 5805 of file Type.h.

Referenced by clang::ASTContext::applyObjCProtocolQualifiers(), clang::ASTContext::areCommonBaseCompatible(), getTypeArgs(), ObjCObjectType(), stripObjCKindOfTypeAndQuals(), and clang::ASTNodeImporter::VisitObjCObjectType().

## ◆ isKindOfType()

bool ObjCObjectType::isKindOfType | ( |  | ) | const

Whether this ia a "__kindof" type (semantically).

Definition at line 734 of file Type.cpp.

References getBaseType(), and isKindOfTypeAsWritten().

Referenced by clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), mangleAArch64VectorBase(), stripObjCKindOfTypeAndQuals(), and clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals().

## ◆ isKindOfTypeAsWritten()

bool clang::ObjCObjectType::isKindOfTypeAsWritten | ( |  | ) | const
| inline

Whether this is a "__kindof" type as written.

Definition at line 5811 of file Type.h.

Referenced by clang::ASTContext::applyObjCProtocolQualifiers(), isKindOfType(), and clang::ASTNodeImporter::VisitObjCObjectType().

## ◆ isObjCClass()

bool clang::ObjCObjectType::isObjCClass | ( |  | ) | const
| inline

Definition at line 5763 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces(), clang::Sema::checkInitMethod(), LookupMemberExpr(), and ShouldTryAgainWithRedefinitionType().

## ◆ isObjCId()

bool clang::ObjCObjectType::isObjCId | ( |  | ) | const
| inline

Definition at line 5759 of file Type.h.

Referenced by clang::Sema::checkInitMethod(), FilterMethodsByTypeBound(), LookupMemberExpr(), and ShouldTryAgainWithRedefinitionType().

## ◆ isObjCQualifiedClass()

bool clang::ObjCObjectType::isObjCQualifiedClass | ( |  | ) | const
| inline

Definition at line 5777 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces().

## ◆ isObjCQualifiedId()

bool clang::ObjCObjectType::isObjCQualifiedId | ( |  | ) | const
| inline

Definition at line 5776 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces().

## ◆ isObjCUnqualifiedClass()

bool clang::ObjCObjectType::isObjCUnqualifiedClass | ( |  | ) | const
| inline

Definition at line 5768 of file Type.h.

## ◆ isObjCUnqualifiedId()

bool clang::ObjCObjectType::isObjCUnqualifiedId | ( |  | ) | const
| inline

Definition at line 5767 of file Type.h.

Referenced by clang::ASTContext::canAssignObjCInterfaces().

## ◆ isObjCUnqualifiedIdOrClass()

bool clang::ObjCObjectType::isObjCUnqualifiedIdOrClass | ( |  | ) | const
| inline

Definition at line 5769 of file Type.h.

## ◆ isSpecialized()

bool ObjCObjectType::isSpecialized | ( |  | ) | const

Determine whether this object type is "specialized", meaning that it has type arguments.

Definition at line 698 of file Type.cpp.

References getBaseType(), and clang::Type::ObjCObjectTypeBits.

Referenced by clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::canAssignObjCInterfaces(), and mangleAArch64VectorBase().

## ◆ isSpecializedAsWritten()

bool clang::ObjCObjectType::isSpecializedAsWritten | ( |  | ) | const
| inline

Determine whether this object type was written with type arguments.

Definition at line 5788 of file Type.h.

Referenced by getTypeArgs().

## ◆ isSugared()

bool clang::ObjCObjectType::isSugared | ( |  | ) | const
| inline

Definition at line 5834 of file Type.h.

## ◆ isUnspecialized()

bool clang::ObjCObjectType::isUnspecialized | ( |  | ) | const
| inline

Determine whether this object type is "unspecialized", meaning that it has no type arguments.

Definition at line 5794 of file Type.h.

Referenced by computeSuperClassTypeSlow(), and clang::Type::getObjCSubstitutions().

## ◆ isUnspecializedAsWritten()

bool clang::ObjCObjectType::isUnspecializedAsWritten | ( |  | ) | const
| inline

Determine whether this object type is "unspecialized" as written, meaning that it has no type arguments.

Definition at line 5798 of file Type.h.

## ◆ stripObjCKindOfTypeAndQuals()

QualType ObjCObjectType::stripObjCKindOfTypeAndQuals | ( | const ASTContext & | ctx | ) | const

Strip off the Objective-C "kindof" type and (with it) any protocol qualifiers.

Definition at line 751 of file Type.cpp.

References clang::Type::getAs(), getBaseType(), clang::ASTContext::getObjCObjectType(), clang::ASTContext::getQualifiedType(), getTypeArgsAsWritten(), isKindOfType(), clang::ObjCProtocolQualifiers< ObjCObjectType >::qual_empty(), clang::SplitQualType::Quals, clang::ExtQualsTypeCommonBase::QualType, clang::QualType::split(), and clang::SplitQualType::Ty.

Referenced by clang::Type::isObjCIdOrObjectKindOfType().

## Friends And Related Function Documentation

## ◆ ObjCProtocolQualifiers< ObjCObjectType >

friend class ObjCProtocolQualifiers< ObjCObjectType >
| friend

Definition at line 5696 of file Type.h.

The documentation for this class was generated from the following files:

- include/clang/AST/Type.h
- lib/AST/Type.cpp