clang  8.0.0svn
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
clang::Type Class Reference

The base class of the type hierarchy. More...

#include "clang/AST/Type.h"

Inheritance diagram for clang::Type:
Inheritance graph
[legend]
Collaboration diagram for clang::Type:
Collaboration graph
[legend]

Classes

class  ArrayTypeBitfields
 
class  AttributedTypeBitfields
 
class  AutoTypeBitfields
 
class  BuiltinTypeBitfields
 
class  DependentTemplateSpecializationTypeBitfields
 
class  ElaboratedTypeBitfields
 
class  FunctionTypeBitfields
 FunctionTypeBitfields store various bits belonging to FunctionProtoType. More...
 
class  ObjCObjectTypeBitfields
 
class  PackExpansionTypeBitfields
 
class  ReferenceTypeBitfields
 
class  SubstTemplateTypeParmPackTypeBitfields
 
class  TemplateSpecializationTypeBitfields
 
class  TypeWithKeywordBitfields
 
class  VectorTypeBitfields
 

Public Types

enum  TypeClass { TagFirst = Record, TagLast = Enum }
 
enum  ScalarTypeKind {
  STK_CPointer, STK_BlockPointer, STK_ObjCObjectPointer, STK_MemberPointer,
  STK_Bool, STK_Integral, STK_Floating, STK_IntegralComplex,
  STK_FloatingComplex, STK_FixedPoint
}
 

Public Member Functions

 Type (const Type &)=delete
 
Typeoperator= (const 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 BuiltinTypegetAsPlaceholderType () 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 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 isFunctionPointerType () 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 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 isAlignValT () const
 
bool isStdByteType () const
 
bool isAtomicType () 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 RecordTypegetAsStructureType () const
 
const RecordTypegetAsUnionType () const
 NOTE: getAs*ArrayType are methods on ASTContext. More...
 
const ComplexTypegetAsComplexIntegerType () const
 
const ObjCObjectTypegetAsObjCInterfaceType () const
 
const ObjCObjectPointerTypegetAsObjCInterfacePointerType () const
 
const ObjCObjectPointerTypegetAsObjCQualifiedIdType () const
 
const ObjCObjectPointerTypegetAsObjCQualifiedClassType () const
 
const ObjCObjectTypegetAsObjCQualifiedInterfaceType () const
 
CXXRecordDeclgetAsCXXRecordDecl () 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...
 
RecordDeclgetAsRecordDecl () const
 Retrieves the RecordDecl this type refers to. More...
 
TagDeclgetAsTagDecl () 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 CXXRecordDeclgetPointeeCXXRecordDecl () const
 If this is a pointer or reference to a RecordType, return the CXXRecordDecl that the type refers to. More...
 
DeducedTypegetContainedDeducedType () const
 Get the DeducedType whose type will be deduced for a variable with an initializer of this type. More...
 
AutoTypegetContainedAutoType () 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 ArrayTypegetAsArrayTypeUnsafe () 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 ArrayTypecastAsArrayTypeUnsafe () 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 TypegetBaseElementTypeUnsafe () const
 Get the base element type of this type, potentially discarding type qualifiers. More...
 
const TypegetArrayElementTypeNoTypeQual () const
 If this is an array type, return the element type of the array, potentially with type qualifiers missing. More...
 
const TypegetPointeeOrArrayElementType () 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 TypegetUnqualifiedDesugaredType () 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 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< NullabilityKindgetNullability (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 TypedefTypegetAs () 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 TemplateSpecializationTypegetAs () 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 AttributedTypegetAs () const
 This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type. More...
 

Protected Types

enum  { NumTypeWithKeywordBits = 8 }
 

Protected Member Functions

 Type (TypeClass tc, QualType canon, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack)
 
Typethis_ ()
 
void setDependent (bool D=true)
 
void setInstantiationDependent (bool D=true)
 
void setVariablyModified (bool VM=true)
 
void setContainsUnexpandedParameterPack (bool PP=true)
 

Protected Attributes

union {
   TypeBitfields   TypeBits
 
   ArrayTypeBitfields   ArrayTypeBits
 
   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
 
}; 
 

Friends

template<class T >
class TypePropertyCache
 
class ASTContext
 
class ASTReader
 
class ASTWriter
 

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

Definition at line 1415 of file Type.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NumTypeWithKeywordBits 

Definition at line 1597 of file Type.h.

◆ ScalarTypeKind

Enumerator
STK_CPointer 
STK_BlockPointer 
STK_ObjCObjectPointer 
STK_MemberPointer 
STK_Bool 
STK_Integral 
STK_Floating 
STK_IntegralComplex 
STK_FloatingComplex 
STK_FixedPoint 

Definition at line 2067 of file Type.h.

◆ TypeClass

Enumerator
TagFirst 
TagLast 

Definition at line 1417 of file Type.h.

Constructor & Destructor Documentation

◆ Type() [1/2]

clang::Type::Type ( TypeClass  tc,
QualType  canon,
bool  Dependent,
bool  InstantiationDependent,
bool  VariablyModified,
bool  ContainsUnexpandedParameterPack 
)
inlineprotected

◆ Type() [2/2]

clang::Type::Type ( const Type )
delete

Member Function Documentation

◆ acceptsObjCTypeParams()

bool Type::acceptsObjCTypeParams ( ) const

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

Definition at line 1449 of file Type.cpp.

References getAsObjCInterfaceType().

Referenced by takeDeclAttributes().

◆ canDecayToPointerType()

bool clang::Type::canDecayToPointerType ( ) const
inline

Determines whether this type can decay to a pointer type.

Definition at line 6661 of file Type.h.

Referenced by CheckImplicitConversion().

◆ canHaveNullability()

bool Type::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.

Parameters
ResultIfUnknownThe value to return if we don't yet know whether this type can have nullability because it is dependent.

Definition at line 3694 of file Type.cpp.

References clang::Auto, getCanonicalTypeInternal(), getKind(), getTypeClass(), and clang::QualType::getTypePtr().

Referenced by checkNullabilityTypeSpecifier(), clang::Sema::getMessageSendResultType(), processTypeAttrs(), and clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType().

◆ castAs()

template<typename T >
const T * clang::Type::castAs ( ) const

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.

Definition at line 6779 of file Type.h.

Referenced by clang::Sema::adjustCCAndNoReturn(), clang::ASTContext::adjustDeducedFunctionResultType(), clang::ASTContext::applyObjCProtocolQualifiers(), clang::ASTContext::areCommonBaseCompatible(), clang::Sema::BuildMemberReferenceExpr(), clang::ASTContext::canAssignObjCInterfaces(), clang::canCalleeThrow(), clang::CapturedStmt::Capture::Capture(), checkConditionalPointerCompatibility(), CheckConstantExpression(), CheckConstexprCtorInitializer(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMemberOperatorAccess(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::checkOpenCLDisabledTypeDeclSpec(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CodeCompleteCase(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CGDebugInfo::completeClass(), completeFunctionType(), clang::CodeGen::CGDebugInfo::completeType(), clang::ObjCObjectType::computeSuperClassTypeSlow(), convertToComplexValue(), clang::Sema::DeduceReturnType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), DiagnoseCallingConvCast(), clang::Sema::DiagnoseSentinelCalls(), clang::CodeGen::CodeGenFunction::emitAddrOfImagComponent(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), emitDeclTargetLinkVarDeclLValue(), emitDestructorsFunction(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenModule::EmitNullConstant(), emitOutlinedFunctionPrologue(), emitParallelOrTeamsOutlinedFunction(), emitPointerArithmetic(), emitProxyTaskFunction(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), emitWritebackArg(), EvalAndBitcastToAPInt(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), clang::Sema::EvaluateImplicitExceptionSpec(), evaluateLValueAsAllocSize(), EvaluateMemberPointer(), EvaluatePointer(), EvaluateTemporary(), EvaluateVector(), clang::exceptionSpecNotKnownYet(), clang::CXXRecordDecl::FindBaseClass(), clang::Expr::findBoundMemberType(), FindDesignatorMismatch(), findPeephole(), clang::CXXRecordDecl::FindVirtualBaseClass(), GetAlignOfExpr(), clang::Expr::getBestDynamicClassType(), getCallingConvMangling(), clang::FunctionDecl::getCallResultType(), clang::CallExpr::getCallReturnType(), getCXXRecord(), clang::FunctionDecl::getDeclaredReturnType(), clang::CXXMethodDecl::getDevirtualizedMethod(), getFieldSize(), clang::BlockExpr::getFunctionType(), clang::ObjCObjectPointerType::getInterfaceType(), getObjCSubstitutions(), clang::ObjCObjectPointerType::getObjectType(), clang::getParameterABISpelling(), clang::ReferenceType::getPointeeType(), clang::FunctionDecl::getReturnType(), clang::ObjCInterfaceDecl::getSuperClassType(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), getUsualDeleteParams(), clang::AtomicExpr::getValueType(), handleCompoundAssignment(), HandleConstructorCall(), hasDeducedReturnType(), hasDefaultCXXMethodCC(), clang::Sema::InstantiateExceptionSpec(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::CXXDynamicCastExpr::isAlwaysNull(), isDesignatorAtObjectEnd(), isIdiomaticBraceElisionEntity(), isNoexcept(), clang::Sema::isOpenMPCapturedByRef(), clang::CodeGen::CodeGenModule::isPaddedAtomicType(), isRecordEmpty(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSimpleZero(), isStructEmpty(), clang::Sema::LookupMethodInObjectType(), LookupMethodInReceiverType(), clang::MangleContext::mangleName(), mangleThunkThisAdjustment(), ObjCEncodingForEnumType(), clang::Sema::PerformImplicitConversion(), clang::Sema::prepareVectorSplat(), clang::Sema::ResolveExceptionSpec(), clang::CXXNewExpr::shouldNullCheckAllocation(), clang::Sema::startLambdaDefinition(), clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals(), clang::QualType::substObjCTypeArgs(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), and clang::ASTDeclReader::VisitFunctionDecl().

◆ castAsArrayTypeUnsafe()

const ArrayType * clang::Type::castAsArrayTypeUnsafe ( ) const
inline

◆ containsUnexpandedParameterPack()

bool clang::Type::containsUnexpandedParameterPack ( ) const
inline

◆ dump() [1/2]

LLVM_DUMP_METHOD void Type::dump ( ) const

Definition at line 2459 of file ASTDumper.cpp.

References dump().

◆ dump() [2/2]

LLVM_DUMP_METHOD void Type::dump ( llvm::raw_ostream &  OS) const

Definition at line 2461 of file ASTDumper.cpp.

References clang::QualType::dump().

◆ getArrayElementTypeNoTypeQual()

const Type * Type::getArrayElementTypeNoTypeQual ( ) const

If this is an array type, return the element type of the array, potentially with type qualifiers missing.

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

This method should never be used when type qualifiers are meaningful.

Definition at line 261 of file Type.cpp.

References clang::VectorType::desugar(), clang::QualType::getDesugaredType(), clang::VectorType::getElementType(), getLocallyUnqualifiedSingleStepDesugaredType(), clang::ASTContext::getQualifiedType(), clang::QualType::getTypePtr(), getUnqualifiedDesugaredType(), clang::SplitQualType::Quals, clang::QualType::split(), and clang::SplitQualType::Ty.

Referenced by checkNullabilityTypeSpecifier(), and evenFlexibleArraySize().

◆ getAs() [1/4]

template<typename T >
const T * clang::Type::getAs ( ) const

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.

Definition at line 6716 of file Type.h.

Referenced by clang::Sema::ActOnCompatibilityAlias(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::ActOnTypedefedProtocols(), addBaseAndFieldSizes(), AddClassMessageCompletions(), AddFunctionParameterChunks(), AddFunctionTypeQualsToCompletionString(), clang::Sema::AddMethodCandidate(), clang::Sema::AddOverloadCandidate(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::Sema::adjustCCAndNoReturn(), AdjustFunctionParmAndArgTypesForDeduction(), AnalyzeBitFieldAssignment(), AnalyzeCompoundAssignment(), appendFunctionType(), appendType(), clang::ASTContext::areComparableObjCPointerTypes(), clang::ASTContext::areCompatibleVectorTypes(), assignInheritanceModel(), clang::ASTDeclReader::attachPreviousDeclImpl(), breakDownVectorType(), clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualCall(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDeclarationNameExpr(), buildDeclareReductionRef(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::BuildMemberReferenceExpr(), buildMemcpyForAssignmentOp(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildQualifiedType(), buildSingleCopyAssignRecursively(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildUnaryTransformType(), BuildUniqueMethodName(), clang::Sema::BuildVectorLiteral(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::arcmt::trans::canApplyWeak(), canAssignObjCObjectTypes(), clang::canCalleeThrow(), clang::Sema::canThrow(), CanThrow(), clang::canTypeidThrow(), CanUseSingleInheritance(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticOpPointerOperand(), checkArithmeticOrEnumeralThreeWayCompare(), CheckArrow(), CheckASTMemory(), clang::Sema::CheckBaseClassAccess(), checkBuiltinArgument(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompatibleReinterpretCast(), checkConditionalObjectPointersCompatibility(), clang::Sema::CheckConditionalOperands(), checkConditionalPointerCompatibility(), CheckConstantExpression(), CheckConstexprParameterTypes(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), CheckCXX98CompatAccessibleCopy(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckDistantExceptionSpec(), checkEnumComparison(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckFallThroughForBody(), checkFormatStringExpr(), checkFoundationAPI(), clang::Sema::CheckFriendTypeDecl(), CheckIdentityFieldAssignment(), clang::Sema::checkIllFormedTrivialABIStruct(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), CheckKeyForObjCARCConversion(), checkLiteralOperatorTemplateParameterList(), CheckMemaccessSize(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckMessageArgumentTypes(), CheckNonNullArguments(), checkNullabilityTypeSpecifier(), checkObjCArrayLiteral(), checkObjCCollectionLiteralElement(), clang::Sema::CheckObjCConversion(), checkObjCDictionaryLiteral(), clang::Sema::CheckObjCForCollectionOperand(), checkObjCKindOfType(), checkObjCPointerTypesForAssignment(), checkOpenCLConditionVector(), checkOpenCLEnqueueVariadicArgs(), checkOpenCLPipePacketType(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverridingFunctionAttributes(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubscriptingKind(), CheckTautologicalComparison(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckUnresolvedMemberAccess(), checkVAStartIsInVariadicFunction(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorLogicalOperands(), clang::Sema::CheckVectorOperands(), checkVectorResult(), checkVectorShift(), ClassifyDiagnostic(), classifyPointerDeclarator(), classifyReturnType(), classifyTypeForARCConversion(), ClassifyUnnamed(), clang::Sema::CodeCompleteMemberReferenceExpr(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), clang::Sema::CompleteConstructorCall(), clang::Sema::computeDeclContext(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), ComputeVMIClassTypeInfoFlags(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::Sema::ConversionToObjCStringLiteralCheck(), clang::CodeGen::CodeGenTypes::ConvertFunctionType(), convertVector(), CopyObject(), create_dispatch_once(), create_OSAtomicCompareAndSwap(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), decomposeTypeForEH(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefaultArgumentPromotion(), defaultedSpecialMemberIsConstexpr(), clang::Sema::DefineImplicitCopyAssignment(), dereference(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadFunctionCast(), DiagnoseCastOfObjCSEL(), diagnoseListInit(), DiagnoseNarrowingInInitList(), clang::Sema::DiagnosePropertyAccessorMismatch(), DiagnoseRecursiveConstFields(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSentinelCalls(), diagReturnOnAllocFailure(), doesUsualArrayDeleteWantSize(), doRewriteToUTF8StringBoxedExpressionHelper(), dumpBasePath(), dumpPreviousDecl(), dumpRecord(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), EmitBaseInitializer(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementLValue(), clang::CodeGen::ConstantEmitter::emitForMemory(), EmitFunctionDeclPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfExtVectorElementLValue(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CodeGen::CodeGenFunction::EmitNVPTXDevicePrintfCallExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), clang::CodeGen::CGDebugInfo::EmitUsingDecl(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheckForCast(), EmitX86_64VAArgFromMemory(), EvaluateBinaryTypeTrait(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), EvaluateUnaryTypeTrait(), EvaluateVector(), evenFlexibleArraySize(), extractPBaseFlags(), clang::Sema::ExtractUnqualifiedFunctionType(), FieldHasTrivialDestructorBody(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindCompositePointerType(), FindConversionForRefInit(), findEnumForBlockReturn(), findMethodDecl(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CXXRecordDecl::forallBases(), GeneralizeFunctionType(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), GetAlignOfType(), clang::CXXNewExpr::getAllocatedType(), clang::TypedefNameDecl::getAnonDeclWithTypedefName(), getArrayIndexingBound(), GetAssumedMessageSendExprType(), getBadTypeidFn(), GetBaseType(), clang::QualType::getBaseTypeIdentifier(), clang::Expr::getBestDynamicClassType(), getBlockLayoutInfoString(), clang::Sema::getCallingConvAttributedType(), clang::CallExpr::getCallReturnType(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getCanonicalTypeInternal(), getCastAwayConstnessCastKind(), clang::ASTContext::getCommentForDecl(), clang::CXXConversionDecl::getConversionType(), clang::CXXMethodDecl::getCorrespondingMethodInClass(), clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getCorrespondingUnsignedType(), getCXXRecord(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ASTContext::getDeclAlign(), clang::ento::CallEvent::getDeclaredResultType(), clang::getDeclUsageType(), clang::CXXDeleteExpr::getDestroyedType(), clang::CFGImplicitDtor::getDestructorDecl(), GetExprType(), clang::ASTContext::getFixedPointIBits(), clang::ASTContext::getFixedPointScale(), getFloatingRank(), clang::ASTContext::getFloatTypeSemantics(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedNestedNameSpecifier(), clang::getFunctionExtInfo(), clang::CodeCompleteConsumer::OverloadCandidate::getFunctionType(), clang::Decl::getFunctionType(), clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(), GetGCAttrTypeForType(), getIncrementedVar(), clang::ASTContext::getInnerObjCOwnership(), clang::ObjCObjectType::getInterface(), GetIntrinsic(), clang::ASTContext::getIntWidth(), clang::ASTContext::getLegacyIntegralTypeEncoding(), getLocallyUnqualifiedSingleStepDesugaredType(), clang::ento::TypedValueRegion::getLocationType(), clang::ASTContext::getLValueReferenceType(), getMaxAtomicAccessSize(), getMostInformativeDerivedClassImpl(), clang::UnresolvedMemberExpr::getNamingClass(), clang::StandardConversionSequence::getNarrowingKind(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), getNonMemoryType(), getNonNullAttrs(), clang::NSAPI::GetNSIntegralKind(), clang::NSAPI::getNSNumberFactoryMethodKind(), getNullability(), clang::ento::getNullabilityAnnotation(), GetNumNonZeroBytesInInit(), clang::OverloadCandidate::getNumParams(), clang::FunctionDecl::getNumParams(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getObjCGCQualType(), clang::ASTContext::getObjCObjectType(), clang::TemplateArgument::getPackExpansionPattern(), clang::getParameterABISpelling(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), getPointeeCXXRecordDecl(), clang::ASTContext::getPreferredTypeAlign(), getPrettyTypeName(), clang::ASTContext::getPromotedIntegerType(), getRangeForType(), clang::ObjCMessageExpr::getReceiverInterface(), getRecordArgABI(), GetReturnType(), getReturnTypeForMethod(), clang::ASTContext::getRValueReferenceType(), clang::Sema::GetSignedVectorType(), getThrowFn(), clang::ASTContext::getTypeAlignIfKnown(), getTypeExpansion(), clang::ASTContext::getTypeInfoDataSizeInChars(), getTypeString(), clang::ASTContext::getTypeUnadjustedAlign(), clang::GetUnderlyingFunction(), clang::FunctionDecl::getUnusedResultAttr(), getUsualDeleteParams(), clang::Expr::getValueKindForType(), clang::AtomicExpr::getValueType(), clang::ento::MemRegionManager::getVarRegion(), clang::CodeGen::CodeGenTBAA::getVTablePtrAccessInfo(), GetX86_64ByValArgumentPair(), handleAssignment(), HandleBaseToDerivedCast(), handleCompoundAssignment(), HandleConstructorCall(), clang::Sema::HandleFunctionTypeMismatch(), HandleMemberPointerAccess(), handleObjCOwnershipTypeAttr(), HandleOpenCLAccessAttr(), clang::Sema::handlerCanCatch(), hasAttr(), hasBooleanRepresentation(), clang::RecordType::hasConstFields(), hasDefaultCXXMethodCC(), hasDefaultSetterName(), hasDefinition(), clang::hasImplicitExceptionSpec(), hasIsEqualMethod(), hasMangledSubstitutionQualifiers(), HasNonDllImportDtor(), hasSizedVLAType(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::CodeGen::CodeGenFunction::hasVolatileMember(), hasWeakMember(), clang::Sema::IgnoredValueConversions(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), is32Or64BitBasicType(), IsAddressSpaceConversion(), clang::CXXDynamicCastExpr::isAlwaysNull(), isAtLeastAsSpecializedAs(), clang::Sema::IsBlockPointerConversion(), isBooleanType(), isCanonicalExceptionSpecification(), IsCFError(), isCFStringType(), isCharSpecialization(), clang::ento::cocoa::isCocoaObjectRef(), clang::Sema::IsComplexPromotion(), clang::Expr::isConstantInitializer(), clang::CodeGen::CodeGenFunction::IsConstructorDelegationValid(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::QualType::isCXX11PODType(), IsDerivedFromInclusive(), isDispatchBlock(), isEmptyField(), isEmptyRecord(), llvm::DenseMapInfo< DecompositionDeclName >::isEqual(), clang::Sema::IsFloatingPointPromotion(), isForwardingReference(), clang::CodeGen::CodeGenTypes::isFuncParamTypeConvertible(), isFunctionLocalClass(), clang::comments::Sema::isFunctionOrBlockPointerVarLikeDecl(), clang::comments::Sema::isFunctionOrMethodVariadic(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isInitializerOfDynamicClass(), clang::Sema::isInitListConstructor(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), isKnownNonNilCollectionType(), isLiteralType(), IsLLVMStringRef(), clang::Sema::IsMemberPointerConversion(), IsNSError(), isNSStringType(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::Expr::isNullPointerConstant(), isObjCIdOrObjectKindOfType(), clang::Sema::isObjCPointerConversion(), isOSObjectRelated(), IsPartOfAST(), isPermittedNeonBaseType(), isPointerToRecordType(), isRecordEmpty(), isRecordWithSSEVectorType(), isSafeForCXXConstantCapture(), isSafeToConvert(), IsSameCharType(), isSameEntity(), isScopedEnumerationType(), isSimpleTemplateIdType(), isSingleElementStruct(), IsSmallVector(), isSSEVectorType(), IsStandardConversion(), isStandardLayoutType(), clang::Sema::isStdInitializerList(), IsStdString(), IsStdVector(), isStreamCharSpecialization(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), clang::NSAPI::isSubclassOfNSClass(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), IsUserDefinedConversion(), isValidBaseType(), isValidOrderingForOp(), isVarDeclStrongDefinition(), IsVariableSizedType(), isVector(), isVoidPointerToNonConst(), IsVoidStarType(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), loadToBegin(), LookThroughTransitiveAssignmentsAndCommaOperators(), LookupDirect(), LookupMemberExpr(), LookupMethodInReceiverType(), mangleAArch64VectorBase(), clang::Sema::MarkFunctionReferenced(), MarkUsedTemplateParameters(), clang::analyze_format_string::ArgType::matchesType(), maybeAdjustInterfaceForSubscriptingCheck(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), ObjCEnumerationCollection(), clang::ASTContext::ObjCObjectAdoptsQTypeProtocols(), clang::ASTContext::ObjCQualifiedClassTypesAreCompatible(), clang::ASTContext::ObjCQualifiedIdTypesAreCompatible(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), PopulateKeysForFields(), printCXXConstructorDestructorName(), printExprAsWritten(), PrintFloatingLiteral(), printIntegral(), clang::APValue::printPretty(), clang::ento::ExprEngine::processSwitch(), PropertyMemoryAttribute(), pushTemporaryCleanup(), clang::ASTContext::QIdProtocolsAdoptObjCObjectProtocols(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), recordFixedType(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::Sema::RequireCompleteType(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFP2Ret(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFPRet(), rewriteInputConstraintReferences(), RewriteOneForwardClassDecl(), rewriteToNumericBoxedExpression(), roundUpSizeToCharAlignment(), scanToNextArgument(), clang::Sema::SemaBuiltinShuffleVector(), clang::Sema::SemaConvertVectorExpr(), SemaOpenCLBuiltinEnqueueKernel(), clang::CXXRecordDecl::setBases(), clang::ASTContext::setCFConstantStringType(), setObjCGCLValueClass(), ShouldDiagnoseUnusedDecl(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), ShouldTryAgainWithRedefinitionType(), clang::Expr::skipRValueSubobjectAdjustments(), skipTopLevelReferences(), clang::Sema::SpecialMemberIsTrivial(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::QualType::stripObjCKindOfType(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformExceptionSpec(), clang::TreeTransform< Derived >::TransformReferenceType(), clang::TreeTransform< Derived >::TransformTemplateSpecializationType(), clang::TransformTypeSpecType(), tryAtomicConversion(), TryClassUnification(), TryConstCast(), TryConstructorInitialization(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), clang::Sema::tryExprAsCall(), tryGCCVectorConvertAndSplat(), tryGetFunctionProtoType(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryLValueToRValueCast(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), TryUserDefinedConversion(), TryValueInitialization(), TypeIsInnerPointer(), clang::ASTContext::UnwrapSimilarTypes(), UseNSOptionsMacro(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::SValExplainer::VisitSymbolicRegion(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and Write_RethrowObject().

◆ getAs() [2/4]

const TypedefType * Type::getAs ( ) const

This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type.

Definition at line 404 of file Type.cpp.

◆ getAs() [3/4]

const TemplateSpecializationType * Type::getAs ( ) const

This will check for a TemplateSpecializationType by removing any existing sugar until it reaches a TemplateSpecializationType or a non-sugared type.

Definition at line 408 of file Type.cpp.

◆ getAs() [4/4]

const AttributedType * Type::getAs ( ) const

This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type.

Definition at line 412 of file Type.cpp.

◆ getAsAdjusted()

template<typename T >
const T * clang::Type::getAsAdjusted ( ) const

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

Definition at line 6733 of file Type.h.

References P.

◆ getAsArrayTypeUnsafe()

const ArrayType * clang::Type::getAsArrayTypeUnsafe ( ) const
inline

◆ getAsComplexIntegerType()

const ComplexType * Type::getAsComplexIntegerType ( ) const

Definition at line 498 of file Type.cpp.

References Complex.

Referenced by handleComplexIntConversion(), and isComplexIntegerType().

◆ getAsCXXRecordDecl()

CXXRecordDecl * Type::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.

Definition at line 1613 of file Type.cpp.

References getAsTagDecl().

Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::adjustTargetSpecificDataForLambdas(), assumeNoOverflow(), clang::ento::StoreManager::attemptDownCast(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildCXXConstructExpr(), buildFakeCtorCall(), BuildNonArrayForRange(), calculateOffset(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::checkAllowedCUDAInitializer(), clang::Sema::CheckBaseSpecifier(), CheckConstexprCtorInitializer(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDestructor(), clang::CheckEquivalentExceptionSpecImpl(), checkMoveAssignmentForRepeatedMove(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), checkTupleLikeDecomposition(), CheckUnaryTypeTraitTypeCompleteness(), computeBlockInfo(), clang::Sema::CreateBuiltinBinOp(), clang::ConstructionContext::createFromLayers(), clang::TypeName::createNestedNameSpecifierForScopeOf(), clang::CodeGen::CodeGenFunction::cxxDestructorCanThrow(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), DiagnoseReinterpretUpDownCast(), DiagnoseUninitializedReference(), diagnoseUnreadableFields(), clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitCXXConstructLValue(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitCXXMemberDataPointerAddress(), EmitDeclDestroy(), EmitDestroyingObjectDelete(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), emitRTtypeidCall(), clang::ento::StoreManager::evalDerivedToBase(), EvaluateMemberPointer(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), clang::Sema::FindAllocationFunctions(), findDecomposableBaseClass(), clang::Sema::FindInstantiatedDecl(), forConstantArrayExpansion(), clang::NestedNameSpecifier::getAsRecordDecl(), getBadTypeidFn(), clang::ASTContext::getCommentForDecl(), getConstructedRegion(), getContainedDynamicClass(), clang::CFGImplicitDtor::getDestructorDecl(), clang::CXXInstanceCall::getExtraInvalidatedValues(), clang::Sema::getFixItZeroInitializerForType(), clang::TypeName::getFullyQualifiedNestedNameSpecifier(), clang::ento::ProgramState::getLValue(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), getMSPropertyAttr(), clang::UnresolvedMemberExpr::getNamingClass(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), getPrettyTypeName(), clang::CXXMemberCallExpr::getRecordDecl(), clang::BlockCall::getRuntimeDefinition(), clang::CXXInstanceCall::getRuntimeDefinition(), HandleBaseToDerivedCast(), HandleLValueBase(), HandleLValueBasePath(), HandleMemberPointerAccess(), hasAccessibleDestructor(), hasNontrivialDestruction(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), InitializationHasSideEffects(), isAutoCastType(), isConsumableType(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), clang::Sema::IsDerivedFrom(), clang::FunctionDecl::isDestroyingOperatorDelete(), isImplicitThis(), isInAllocaArgument(), isOSObjectRelated(), isPointerToObject(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), isReadByLvalueToRvalueConversion(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::ConstructionContextLayer::isStrictlyMoreSpecificThan(), clang::Sema::isThisOutsideMemberFunctionBody(), clang::CXXRecordDecl::isTriviallyCopyable(), clang::CodeGen::CodeGenModule::isTypeConstant(), isTypeValid(), clang::Expr::isUnusedResultAWarning(), clang::CodeGen::CodeGenFunction::isVptrCheckRequired(), LeastDerivedClassWithSameLayout(), clang::ComparisonCategories::lookupInfo(), lookupStdTypeTraitMember(), mapConsumableAttrState(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), clang::consumed::ConsumedStateMap::operator!=(), PerformReturnAdjustment(), print_elem(), print_initializer(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::Sema::ProduceConstructorSignatureHelp(), clang::CodeGen::CodeGenFunction::PushDestructorCleanup(), regionMatchesCXXRecordType(), ResolveConstructorOverload(), clang::CXXRecordDecl::setBases(), treatUnusedNewEscaped(), TryListInitialization(), usesMultipleInheritanceModel(), visitLocalsRetainedByInitializer(), clang::tooling::RecursiveSymbolVisitor< T >::VisitTypeLoc(), clang::ASTDeclWriter::VisitVarDecl(), clang::ASTDeclReader::VisitVarDeclImpl(), and warnAboutRedundantParens().

◆ getAsObjCInterfacePointerType()

const ObjCObjectPointerType * Type::getAsObjCInterfacePointerType ( ) const

◆ getAsObjCInterfaceType()

const ObjCObjectType * Type::getAsObjCInterfaceType ( ) const

Definition at line 1582 of file Type.cpp.

Referenced by acceptsObjCTypeParams().

◆ getAsObjCQualifiedClassType()

const ObjCObjectPointerType * Type::getAsObjCQualifiedClassType ( ) const

Definition at line 1572 of file Type.cpp.

◆ getAsObjCQualifiedIdType()

const ObjCObjectPointerType * Type::getAsObjCQualifiedIdType ( ) const

Definition at line 1562 of file Type.cpp.

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

◆ getAsObjCQualifiedInterfaceType()

const ObjCObjectType * Type::getAsObjCQualifiedInterfaceType ( ) const

Definition at line 1548 of file Type.cpp.

Referenced by isObjCQualifiedInterfaceType().

◆ getAsPlaceholderType()

const BuiltinType * clang::Type::getAsPlaceholderType ( ) const
inline

◆ getAsRecordDecl()

RecordDecl * Type::getAsRecordDecl ( ) const

◆ getAsStructureType()

const RecordType * Type::getAsStructureType ( ) const

◆ getAsTagDecl()

TagDecl * Type::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.

Definition at line 1621 of file Type.cpp.

Referenced by createConstantGlobalStructAndAddToParent(), clang::CodeGen::emitDeclareSimdFunction(), emitDestructorsFunction(), emitProxyTaskFunction(), clang::CodeGen::emitTaskInit(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), getAsCXXRecordDecl(), getAsRecordDecl(), getUuidAttrOfType(), and clang::Sema::RequireCompleteDeclContext().

◆ getAsUnionType()

const RecordType * Type::getAsUnionType ( ) const

◆ getBaseElementTypeUnsafe()

const Type * clang::Type::getBaseElementTypeUnsafe ( ) const
inline

◆ getCanonicalTypeInternal()

QualType clang::Type::getCanonicalTypeInternal ( ) const
inline

◆ getCanonicalTypeUnqualified()

CanQualType clang::Type::getCanonicalTypeUnqualified ( ) const
inline

◆ getContainedAutoType()

AutoType* clang::Type::getContainedAutoType ( ) const
inline

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.

Definition at line 2186 of file Type.h.

References hasAttr().

Referenced by clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::DeduceTemplateArguments(), clang::Sema::InstantiateFunctionDefinition(), and clang::ASTDeclReader::VisitFunctionDecl().

◆ getContainedDeducedType()

DeducedType * Type::getContainedDeducedType ( ) const

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.

Definition at line 1723 of file Type.cpp.

Referenced by clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclaratorGroup(), clang::ExprWithCleanups::Create(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), GetDeclSpecTypeForDeclarator(), clang::isUndeducedReturnType(), LookupDirect(), and clang::TreeTransform< Derived >::RebuildDependentNameType().

◆ getLinkage()

Linkage Type::getLinkage ( ) const

◆ getLinkageAndVisibility()

LinkageInfo Type::getLinkageAndVisibility ( ) const

Determine the linkage and visibility of this type.

Definition at line 3676 of file Type.cpp.

References clang::LinkageComputer::getTypeLinkageAndVisibility().

◆ getLocallyUnqualifiedSingleStepDesugaredType()

QualType Type::getLocallyUnqualifiedSingleStepDesugaredType ( ) const

◆ getNullability()

Optional< NullabilityKind > Type::getNullability ( const ASTContext context) const

◆ getObjCARCImplicitLifetime()

Qualifiers::ObjCLifetime Type::getObjCARCImplicitLifetime ( ) const

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

Definition at line 3862 of file Type.cpp.

References isObjCARCImplicitlyUnretainedType(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Strong.

Referenced by clang::Sema::inferObjCARCLifetime().

◆ getObjCSubstitutions()

Optional< ArrayRef< QualType > > Type::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.

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

Parameters
dcThe 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.

Extract the class from the receiver object type.

Definition at line 1367 of file Type.cpp.

References castAs(), clang::ObjCObjectType::getInterface(), clang::ASTContext::getObjCObjectType(), clang::DeclContext::getParentASTContext(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::QualType::isNull(), clang::ObjCObjectType::isUnspecialized(), clang::None, and clang::ASTContext::ObjCBuiltinIdTy.

Referenced by clang::CodeCompletionResult::createCodeCompletionStringForDecl(), and clang::QualType::substObjCMemberType().

◆ getPointeeCXXRecordDecl()

const CXXRecordDecl * Type::getPointeeCXXRecordDecl ( ) const

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.

Definition at line 1598 of file Type.cpp.

References getAs(), and getPointeeType().

Referenced by adjustReturnValue(), DiagnoseReinterpretUpDownCast(), clang::ento::StoreManager::evalDerivedToBase(), isSetOnReadPtrType(), regionMatchesCXXRecordType(), and clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue().

◆ getPointeeOrArrayElementType()

const Type * clang::Type::getPointeeOrArrayElementType ( ) const
inline

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.

Definition at line 6681 of file Type.h.

References getBaseElementTypeUnsafe(), getPointeeType(), clang::QualType::getTypePtr(), isAnyPointerType(), isArrayType(), and clang::ast_matchers::type.

Referenced by getArrayIndexingBound(), IsTailPaddedMemberArray(), and SemaOpenCLBuiltinEnqueueKernel().

◆ getPointeeType()

QualType Type::getPointeeType ( ) const

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

Definition at line 505 of file Type.cpp.

References getPointeeType().

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnStartCXXMemberReference(), adjustCVQualifiersForCXXThisWithinLambda(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::ento::StoreManager::attemptDownCast(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildQualifiedType(), calculateOffset(), clang::arcmt::trans::canApplyWeak(), clang::canCalleeThrow(), captureThis(), clang::ento::StoreManager::castRegion(), castToBase(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticOpPointerOperand(), CheckArrow(), clang::Sema::CheckCompatibleReinterpretCast(), checkConditionalPointerCompatibility(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDistantExceptionSpec(), CheckFallThroughForBody(), CheckIndirectionOperand(), CheckKeyForObjCARCConversion(), checkMapClauseExpressionBase(), CheckMemaccessSize(), clang::ento::mpi::MPIChecker::checkMissingWaits(), CheckNonNullArguments(), checkNullabilityTypeSpecifier(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckVirtualDtorCall(), ClassifyDiagnostic(), classifyPointerDeclarator(), classifyTypeForARCConversion(), clang::Sema::CodeCompleteMemberReferenceExpr(), CompareStandardConversionSequences(), computeCachedProperties(), clang::LinkageComputer::computeTypeLinkageInfo(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), decomposeTypeForEH(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), dereference(), DereferenceInfo::DereferenceInfo(), describeUninitializedArgumentInCall(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseCastOfObjCSEL(), DiagnoseDivisionSizeofPointer(), clang::Sema::DiagnoseSentinelCalls(), diagnoseStringPlusChar(), clang::Sema::DiscardMisalignedMemberAddress(), doRewriteToUTF8StringBoxedExpressionHelper(), EmitAtomicCmpXchgForMSIntrin(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitCallee(), EmitCheckedMixedSignMultiply(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitISOVolatileLoad(), clang::CodeGen::CodeGenFunction::EmitISOVolatileStore(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), evalBinOpFieldRegionFieldRegion(), EvaluateComparisonBinaryOperator(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), GetAlignOfExpr(), GetAlignOfType(), clang::OMPArraySectionExpr::getBaseOriginalType(), GetBaseType(), clang::QualType::getBaseTypeIdentifier(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallReturnType(), getCanonicalParamType(), getCastAwayConstnessCastKind(), getCoreType(), getCXXRecord(), clang::ASTContext::getDeclAlign(), clang::getDeclUsageType(), getDeepPointeeType(), clang::MemberExpr::getEndLoc(), clang::CXXInstanceCall::getExtraInvalidatedValues(), clang::TypeName::getFullyQualifiedType(), clang::ASTContext::getInnerObjCOwnership(), clang::PointerLikeTypeLoc< ObjCObjectPointerTypeLoc, ObjCObjectPointerType >::getInnerType(), clang::DependentAddressSpaceTypeLoc::getInnerType(), clang::UnresolvedMemberExpr::getNamingClass(), clang::CodeGen::CodeGenFunction::getNaturalPointeeTypeAlignment(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::OverloadCandidate::getNumParams(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCQualType(), clang::getParameterABISpelling(), getPointeeCXXRecordDecl(), getPointeeOrArrayElementType(), getPointeeType(), getPrettyTypeName(), clang::CXXMemberCallExpr::getRecordDecl(), clang::CXXInstanceCall::getRuntimeDefinition(), clang::ASTContext::getTargetNullPointerValue(), clang::GetUnderlyingFunction(), getUuidAttrOfType(), handleAssignment(), HandleBaseToDerivedCast(), handleCompoundAssignment(), HandleConstructorCall(), HandleMemberPointerAccess(), handleObjCOwnershipTypeAttr(), clang::Sema::handlerCanCatch(), InitCatchParam(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Sema::IsBlockPointerConversion(), isCallback(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::comments::Sema::isFunctionOrMethodVariadic(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::Sema::isInitListConstructor(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Expr::isNullPointerConstant(), isOSObjectRelated(), isPointerToConst(), isPointerToObject(), isRecordEmpty(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), IsTypeModifiable(), isValidOrderingForOp(), isVoidPointer(), isVoidPointerToNonConst(), loadToBegin(), LookupMemberExpr(), MakeBinaryAtomicValue(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::MaybeBindToTemporary(), clang::Sema::PerformImplicitConversion(), PerformReturnAdjustment(), clang::ento::printDynamicTypeInfo(), clang::APValue::printPretty(), clang::Sema::RefersToMemberWithReducedAlignment(), RewriteOneForwardClassDecl(), roundUpSizeToCharAlignment(), scanToNextArgument(), SemaOpenCLBuiltinEnqueueKernel(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::TransformTypeSpecType(), treatUnusedNewEscaped(), tryEmitFMulAdd(), tryEvaluateBuiltinObjectSize(), clang::Sema::tryExprAsCall(), tryGetFunctionProtoType(), TryObjectArgumentInitialization(), TryStaticCast(), clang::ASTContext::UnwrapSimilarTypes(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), and wasRegionOfInterestModifiedAt().

◆ getScalarTypeKind()

Type::ScalarTypeKind Type::getScalarTypeKind ( ) const

◆ getTypeClass()

TypeClass clang::Type::getTypeClass ( ) const
inline

Definition at line 1817 of file Type.h.

Referenced by addAssociatedClassesAndNamespaces(), clang::TypoCorrectionConsumer::addNamespaces(), AppendTypeQualList(), canHaveNullability(), CanUseSingleInheritance(), clang::LocInfoType::classof(), clang::BuiltinType::classof(), clang::ComplexType::classof(), clang::ParenType::classof(), clang::PointerType::classof(), clang::AdjustedType::classof(), clang::DecayedType::classof(), clang::BlockPointerType::classof(), clang::ReferenceType::classof(), clang::LValueReferenceType::classof(), clang::RValueReferenceType::classof(), clang::MemberPointerType::classof(), clang::ArrayType::classof(), clang::ConstantArrayType::classof(), clang::IncompleteArrayType::classof(), clang::VariableArrayType::classof(), clang::DependentSizedArrayType::classof(), clang::DependentAddressSpaceType::classof(), clang::DependentSizedExtVectorType::classof(), clang::VectorType::classof(), clang::DependentVectorType::classof(), clang::ExtVectorType::classof(), clang::FunctionType::classof(), clang::FunctionNoProtoType::classof(), clang::FunctionProtoType::classof(), clang::UnresolvedUsingType::classof(), clang::TypedefType::classof(), clang::TypeOfExprType::classof(), clang::TypeOfType::classof(), clang::DecltypeType::classof(), clang::UnaryTransformType::classof(), clang::TagType::classof(), clang::RecordType::classof(), clang::EnumType::classof(), clang::AttributedType::classof(), clang::TemplateTypeParmType::classof(), clang::SubstTemplateTypeParmType::classof(), clang::SubstTemplateTypeParmPackType::classof(), clang::DeducedType::classof(), clang::AutoType::classof(), clang::DeducedTemplateSpecializationType::classof(), clang::TemplateSpecializationType::classof(), clang::InjectedClassNameType::classof(), clang::ElaboratedType::classof(), clang::DependentNameType::classof(), clang::DependentTemplateSpecializationType::classof(), clang::PackExpansionType::classof(), clang::ObjCTypeParamType::classof(), clang::ObjCObjectType::classof(), clang::ObjCInterfaceType::classof(), clang::ObjCObjectPointerType::classof(), clang::AtomicType::classof(), clang::PipeType::classof(), clang::CodeGen::CGDebugInfo::completeUnusedClass(), computeCachedProperties(), clang::LinkageComputer::computeTypeLinkageInfo(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CreateParsedType(), getAsSugar(), clang::QualType::getBaseTypeIdentifier(), clang::CodeGen::CodeGenFunction::getEvaluationKind(), clang::ast_type_traits::ASTNodeKind::getFromNode(), getLocallyUnqualifiedSingleStepDesugaredType(), clang::ASTContext::getTypeInfo(), clang::TypeLoc::getTypeLocClass(), clang::UnqualTypeLoc::getTypeLocClass(), getUnqualifiedDesugaredType(), clang::ASTContext::getVariableArrayDecayedType(), clang::QualType::isCXX98PODType(), isLayoutCompatible(), isObjCReceiverType(), IsPossiblyOpaquelyQualifiedType(), isSpecifierType(), isTypeSubstitutable(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeTypes(), clang::RecursiveASTVisitor< CallGraph >::TraverseType(), typeIsPostfix(), UnwrapTypeForDebugInfo(), clang::TypeVisitor< ASTNodeImporter, ExpectedType >::Visit(), and clang::ASTTypeWriter::Visit().

◆ getTypeClassName()

const char * Type::getTypeClassName ( ) const

Definition at line 2646 of file Type.cpp.

References TypeBits.

Referenced by clang::ASTNodeImporter::VisitType().

◆ getUnqualifiedDesugaredType()

const Type * Type::getUnqualifiedDesugaredType ( ) const

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

getUnqualifiedDesugaredType - Pull any qualifiers and syntactic sugar off the given type.

This should produce an object of the same dynamic type as the canonical type.

Definition at line 419 of file Type.cpp.

References getTypeClass().

Referenced by assumeNoOverflow(), getArrayElementTypeNoTypeQual(), getAsStructureType(), getAsUnionType(), clang::ASTContext::getTargetNullPointerValue(), clang::ASTContext::getTypeInfo(), and clang::ASTContext::getUnqualifiedArrayType().

◆ getVisibility()

Visibility clang::Type::getVisibility ( ) const
inline

Determine the visibility of this type.

Definition at line 2307 of file Type.h.

Referenced by extractPBaseFlags().

◆ hasAttr()

bool Type::hasAttr ( attr::Kind  AK) const

◆ hasAutoForTrailingReturnType()

bool Type::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).

Definition at line 1728 of file Type.cpp.

Referenced by hasDeducedAuto().

◆ hasFloatingRepresentation()

bool Type::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.

Definition at line 1930 of file Type.cpp.

References isFloatingType().

Referenced by checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), clang::Sema::CheckVectorLogicalOperands(), and diagnoseTautologicalComparison().

◆ hasIntegerRepresentation()

bool Type::hasIntegerRepresentation ( ) const

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

Definition at line 1733 of file Type.cpp.

References isIntegerType().

Referenced by clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::CheckShiftOperands(), and clang::Sema::SemaBuiltinShuffleVector().

◆ hasObjCPointerRepresentation()

bool clang::Type::hasObjCPointerRepresentation ( ) const
inline

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

Definition at line 6670 of file Type.h.

◆ hasPointerRepresentation()

bool clang::Type::hasPointerRepresentation ( ) const
inline

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.

Definition at line 6665 of file Type.h.

Referenced by Evaluate(), EvaluatePointer(), ignorePointerCastsAndParens(), is32Or64BitBasicType(), rewriteInputConstraintReferences(), and shouldEmitSeparateBlockRetain().

◆ hasSignedIntegerRepresentation()

bool Type::hasSignedIntegerRepresentation ( ) const

◆ hasSizedVLAType()

bool Type::hasSizedVLAType ( ) const

◆ hasUnnamedOrLocalType()

bool Type::hasUnnamedOrLocalType ( ) const

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

Definition at line 3579 of file Type.cpp.

References clang::TypePropertyCache< Private >::ensure(), and TypeBits.

◆ hasUnsignedIntegerRepresentation()

bool Type::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.

Definition at line 1914 of file Type.cpp.

References isUnsignedIntegerOrEnumerationType().

Referenced by AnalyzeComparison(), DiagnoseBadShiftValues(), and DiagnoseFloatingImpCast().

◆ isAggregateType()

bool Type::isAggregateType ( ) const

Determines whether the type is a C++ aggregate type or C aggregate or union type.

An aggregate type is an array or a class type (struct, union, or class) that has no user-declared constructors, no private or protected non-static data members, no base classes, and no virtual functions (C++ [dcl.init.aggr]p1). The notion of an aggregate type subsumes the notion of C aggregates (C99 6.2.5p21) because it also includes union types.

Definition at line 2007 of file Type.cpp.

Referenced by EmitX86_64VAArgFromMemory(), EvaluateUnaryTypeTrait(), TryListConversion(), and TryListInitialization().

◆ isAlignValT()

bool Type::isAlignValT ( ) const

◆ isAnyCharacterType()

bool Type::isAnyCharacterType ( ) const

◆ isAnyComplexType()

bool clang::Type::isAnyComplexType ( ) const
inline

◆ isAnyPointerType()

bool clang::Type::isAnyPointerType ( ) const
inline

Definition at line 6286 of file Type.h.

Referenced by clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPPrivateClause(), AreTypesCompatible(), AuditedType(), clang::Sema::BuildQualifiedType(), CastsAwayConstness(), clang::Sema::CheckAdditionOperands(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticOpPointerOperand(), checkBuiltinArgument(), checkConditionalNullPointer(), clang::Sema::checkInitializerLifetime(), checkMapClauseExpressionBase(), checkMapConflicts(), checkNullabilityTypeSpecifier(), clang::Sema::CheckPointerConversion(), computeConditionalNullability(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseBadFunctionCast(), DiagnoseCastQual(), DiagnoseNullConversion(), diagnosePointerIncompatibility(), diagnoseStringPlusChar(), clang::ento::SMTConv::doTypeConversion(), emitOutlinedFunctionPrologue(), evalBinOpFieldRegionFieldRegion(), clang::Sema::FindCompositePointerType(), clang::ento::SMTConv::fromCast(), clang::ento::SMTConv::getBinExpr(), getNonNullAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getObjCGCQualType(), getPointeeOrArrayElementType(), getReceiverNullability(), clang::CXXMemberCallExpr::getRecordDecl(), clang::ento::SMTConv::getZeroExpr(), isCallback(), clang::ento::isDereferencableType(), clang::ento::Loc::isLocType(), isPointerToConst(), clang::CodeGen::CodeGenTypes::isPointerZeroInitializable(), isRecordEmpty(), clang::ASTContext::isSentinelNullExpr(), IsStandardConversion(), TryReinterpretCast(), TypeIsInnerPointer(), and clang::FunctionCallFilterCCC::ValidateCandidate().

◆ isArithmeticType()

bool Type::isArithmeticType ( ) const

◆ isArrayType()

bool clang::Type::isArrayType ( ) const
inline

Definition at line 6331 of file Type.h.

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildAtomicType(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildSingleCopyAssign(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckFunctionReturnType(), checkMapClauseExpressionBase(), clang::Sema::CheckNonTypeTemplateParameterType(), checkNullabilityTypeSpecifier(), clang::Sema::CheckSpecifiedExceptionType(), ClassifyTemporary(), clang::CXXBindTemporaryExpr::Create(), DereferenceInfo::DereferenceInfo(), clang::Sema::DiagnoseAssignmentResult(), diagnoseTautologicalComparison(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::emitArrayDestroy(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::emitAutoVarTypeCleanup(), emitOMPArraySectionBase(), clang::CodeGen::CodeGenFunction::EmitOMPCopy(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), emitPrivatesInit(), clang::CodeGen::emitSingleReductionCombiner(), Evaluate(), EvaluateArray(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), EvaluateInPlace(), EvaluateUnaryTypeTrait(), FastEvaluateAsRValue(), FindDesignatorMismatch(), findSubobject(), clang::ASTContext::getAdjustedParameterType(), clang::QualType::getBaseTypeIdentifier(), getBlockLayoutInfoString(), clang::ASTContext::GetBuiltinType(), getCoreType(), clang::ASTContext::getDecayedType(), clang::ASTContext::getExceptionObjectType(), GetGCAttrTypeForType(), clang::ASTContext::getInnerObjCOwnership(), clang::ASTContext::getObjCEncodingTypeSize(), getPointeeOrArrayElementType(), getUuidAttrOfType(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::InitializationSequence::InitializeFrom(), clang::ento::NonLoc::isCompoundType(), clang::Expr::isConstantInitializer(), isDesignatorAtObjectEnd(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), isRecordEmpty(), isSimpleZero(), IsStandardConversion(), isValidBaseType(), isZeroSized(), clang::ento::SValBuilder::makeZeroVal(), clang::ento::ExprEngine::ProcessInitializer(), processTypeAttrs(), pushTemporaryCleanup(), scanToNextArgument(), setObjCGCLValueClass(), TryListConversion(), TryReferenceInit(), TryReferenceInitializationCore(), clang::ento::ExprEngine::VisitInitListExpr(), visitLocalsRetainedByInitializer(), and clang::ento::ExprEngine::VisitMemberExpr().

◆ isAtomicType()

bool clang::Type::isAtomicType ( ) const
inline

◆ isBlockCompatibleObjCPointerType()

bool Type::isBlockCompatibleObjCPointerType ( ASTContext ctx) const

◆ isBlockPointerType()

bool clang::Type::isBlockPointerType ( ) const
inline

Definition at line 6290 of file Type.h.

Referenced by AuditedType(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildObjCBridgedCast(), CanThrow(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), checkBlockType(), checkBuiltinArgument(), clang::Sema::CheckCompleteVariableDeclaration(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), clang::Sema::CheckConditionalOperands(), CheckObjCCollectionLiteralElement(), clang::Sema::CheckSubscriptingKind(), compareConversionFunctions(), computeCopyInfoForBlockCapture(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), DiagnoseBadFunctionCast(), DiagnoseNullConversion(), diagnoseObjCARCConversion(), diagnoseTautologicalComparison(), DiagnoseUninitializedUse(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitARCRetain(), clang::CodeGen::CodeGenFunction::EmitARCRetainAutorelease(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::ento::SValBuilder::evalCast(), FormatFunctionParameter(), clang::ento::SMTConv::fromCast(), getBlockFieldFlagsForObjCObjectPointer(), clang::ASTContext::getByrefLifetime(), clang::Decl::getFunctionType(), GetGCAttrTypeForType(), getNonNullAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::CallEventManager::getSimpleCall(), clang::Sema::getVariadicCallType(), clang::ento::SMTConv::getZeroExpr(), handleObjCGCTypeAttr(), is32Or64BitBasicType(), isBlockPointer(), isCallback(), clang::comments::Sema::isFunctionOrBlockPointerVarLikeDecl(), clang::comments::Sema::isFunctionOrMethodVariadic(), clang::ento::Loc::isLocType(), isObjCARCBridgableType(), isObjCRetainableType(), clang::CodeGen::CodeGenTypes::isPointerZeroInitializable(), clang::ento::isPrimitiveType(), IsStandardConversion(), clang::analyze_format_string::ArgType::matchesType(), clang::ASTContext::mergeTypes(), clang::Sema::PrepareCastToObjCObjectPointer(), PropertyMemoryAttribute(), rewriteInputConstraintReferences(), RewriteOneForwardClassDecl(), rewriteToObjCProperty(), shouldEmitSeparateBlockRetain(), SuggestInitializationFixit(), TryReinterpretCast(), TryStaticCast(), and TypeIsInnerPointer().

◆ isBooleanType()

bool clang::Type::isBooleanType ( ) const
inline

◆ isBuiltinType()

bool clang::Type::isBuiltinType ( ) const
inline

Helper methods to distinguish type categories.

All type predicates operate on the canonical type, ignoring typedefs and qualifiers. Returns true if the type is a builtin type.

Definition at line 6351 of file Type.h.

Referenced by clang::Sema::BuildVectorType(), EmitX86_64VAArgFromMemory(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getVectorType(), clang::ento::isPrimitiveType(), isRecordWithSSEVectorType(), isTypeSubstitutable(), and mangleAArch64VectorBase().

◆ isCanonicalUnqualified()

bool clang::Type::isCanonicalUnqualified ( ) const
inline

◆ isCARCBridgableType()

bool Type::isCARCBridgableType ( ) const

Determine whether the given type T is a "bridgeable" C type.

Definition at line 3940 of file Type.cpp.

References isRecordType(), isVoidType(), and Pointer.

Referenced by clang::Sema::BuildObjCBridgedCast().

◆ isChar16Type()

bool Type::isChar16Type ( ) const

Definition at line 1809 of file Type.cpp.

Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument().

◆ isChar32Type()

bool Type::isChar32Type ( ) const

Definition at line 1815 of file Type.cpp.

Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument().

◆ isChar8Type()

bool Type::isChar8Type ( ) const

Definition at line 1803 of file Type.cpp.

Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument().

◆ isCharType()

bool Type::isCharType ( ) const

◆ isClassType()

bool Type::isClassType ( ) const

Definition at line 437 of file Type.cpp.

Referenced by EvaluateUnaryTypeTrait().

◆ isClkEventT()

bool clang::Type::isClkEventT ( ) const
inline

Definition at line 6444 of file Type.h.

Referenced by SemaOpenCLBuiltinEnqueueKernel().

◆ isComplexIntegerType()

bool Type::isComplexIntegerType ( ) const

◆ isComplexType()

bool Type::isComplexType ( ) const

◆ isCompoundType()

bool clang::Type::isCompoundType ( ) const
inline

Tests whether the type is categorized as a compound type.

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

Definition at line 6256 of file Type.h.

References isRecordType().

Referenced by EvaluateUnaryTypeTrait().

◆ isConstantArrayType()

bool clang::Type::isConstantArrayType ( ) const
inline

Definition at line 6335 of file Type.h.

Referenced by hasCompatibleArrayTypes().

◆ isConstantSizeType()

bool Type::isConstantSizeType ( ) const

Return true if this is not a variable sized type, according to the rules of C99 6.7.5p3.

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

It is not legal to call this on incomplete types or dependent types.

Definition at line 2021 of file Type.cpp.

References isDependentType(), and isIncompleteType().

Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), HandleSizeof(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().

◆ isDependentAddressSpaceType()

bool clang::Type::isDependentAddressSpaceType ( ) const
inline

Definition at line 6375 of file Type.h.

Referenced by isTypeSubstitutable().

◆ isDependentSizedArrayType()

bool clang::Type::isDependentSizedArrayType ( ) const
inline

Definition at line 6347 of file Type.h.

◆ isDependentType()

bool clang::Type::isDependentType ( ) const
inline

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

Definition at line 2085 of file Type.h.

Referenced by clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnUninitializedDecl(), addExceptionSpec(), clang::Sema::AddInitializerToDecl(), AddRecordMembersCompletionResults(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildAtomicType(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXUuidof(), buildDeclareReductionRef(), clang::Sema::BuildExtVectorType(), clang::Sema::buildLambdaScope(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildQualifiedType(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildUnaryTransformType(), clang::Sema::BuildVectorType(), clang::Sema::canFullyTypeCheckRedeclaration(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::canThrow(), clang::Sema::CheckAllocatedType(), checkArithmeticIncompletePointerType(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckConstexprFunctionBody(), clang::Sema::CheckConstexprFunctionDecl(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEnumUnderlyingType(), CheckImplicitConversion(), clang::Sema::CheckNonDependentConversions(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckNonTypeTemplateParameterType(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckQualifiedMemberReference(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), classifyPointerDeclarator(), clang::Sema::computeDeclContext(), computeDeclRefDependence(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::ExprWithCleanups::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::OffsetOfExpr::CreateEmpty(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::CXXInheritedCtorInitExpr::CXXInheritedCtorInitExpr(), clang::Sema::DeduceAutoType(), clang::Sema::deduceClosureReturnType(), clang::DeducedType::DeducedType(), DeduceFromInitializerList(), deduceOpenCLImplicitAddrSpace(), clang::DependentCoawaitExpr::DependentCoawaitExpr(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseUnusedNestedTypedefs(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), EvaluateBuiltinClassifyType(), EvaluateUnaryTypeTrait(), clang::Sema::FillInlineAsmIdentifierInfo(), findTemplateParameter(), FormatFunctionParameter(), clang::Expr::getBestDynamicClassType(), clang::LambdaCapture::getCaptureKind(), clang::ASTContext::getConstantArrayType(), clang::ento::CallEvent::getDeclaredResultType(), clang::CXXDeleteExpr::getDestroyedType(), clang::DeclRefExpr::getEndLoc(), clang::ASTContext::getExtVectorType(), clang::FunctionType::getNameForCallConv(), clang::ObjCPropertyRefExpr::getReceiverType(), clang::ASTContext::getUnaryTransformType(), getVisibilityOf(), handleObjCOwnershipTypeAttr(), HandleSizeof(), hasDeducibleTemplateParameters(), hasDependentAlignment(), hasOnlyNonStaticMemberFunctions(), clang::InitializationSequence::InitializeFrom(), clang::Sema::isAcceptableNestedNameSpecifier(), isConstantSizeType(), clang::Sema::isCopyElisionCandidate(), clang::QualType::isCXX11PODType(), clang::NestedNameSpecifier::isDependent(), clang::TemplateArgument::isDependent(), clang::DeclarationName::isDependentName(), IsDerivedFromInclusive(), IsImplicitBoolFloatConversion(), isLiteralType(), isObjCClassOrClassKindOfType(), isObjCReceiverType(), isOverflowingIntegerType(), isPromotableIntegerType(), isStandardLayoutType(), clang::PackExpansionType::isSugared(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), isTypeSubstitutable(), LookupDirect(), clang::Sema::LookupInlineAsmIdentifier(), clang::Sema::LookupInlineAsmVarDeclField(), LookupMemberExpr(), mangleAArch64VectorBase(), MarkUsedTemplateParameters(), MatchTemplateParameterKind(), noteMemberDeclaredHere(), clang::InitializationSequence::Perform(), processTypeAttrs(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::Sema::RequireLiteralType(), clang::Sema::SemaConvertVectorExpr(), clang::CXXRecordDecl::setBases(), clang::MaterializeTemporaryExpr::setExtendingDecl(), clang::Sema::SubstAutoType(), clang::Sema::SubstAutoTypeSourceInfo(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), clang::TreeTransform< Derived >::TransformExceptionSpec(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), TryReinterpretCast(), clang::TypoExpr::TypoExpr(), VariableCanNeverBeAConstantExpression(), clang::Sema::VerifyBitField(), clang::ASTTypeWriter::VisitTagType(), and warnAboutRedundantParens().

◆ isElaboratedTypeSpecifier()

bool Type::isElaboratedTypeSpecifier ( ) const

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

Definition at line 2631 of file Type.cpp.

References clang::TypeWithKeyword::KeywordIsTagTypeKind().

Referenced by clang::Sema::ActOnFriendTypeDecl(), and clang::Sema::CheckFriendTypeDecl().

◆ isEnumeralType()

bool clang::Type::isEnumeralType ( ) const
inline

◆ isEventT()

bool clang::Type::isEventT ( ) const
inline

◆ isExtVectorType()

bool clang::Type::isExtVectorType ( ) const
inline

◆ isFixedPointType()

bool clang::Type::isFixedPointType ( ) const
inline

◆ isFloat128Type()

bool clang::Type::isFloat128Type ( ) const
inline

Definition at line 6549 of file Type.h.

Referenced by clang::CodeGen::ABIInfo::isHomogeneousAggregate().

◆ isFloat16Type()

bool clang::Type::isFloat16Type ( ) const
inline

Definition at line 6543 of file Type.h.

◆ isFloatingType()

bool Type::isFloatingType ( ) const

◆ isFromAST()

bool clang::Type::isFromAST ( ) const
inline

Whether this type comes from an AST file.

Definition at line 1820 of file Type.h.

◆ isFunctionNoProtoType()

bool clang::Type::isFunctionNoProtoType ( ) const
inline

Definition at line 1952 of file Type.h.

◆ isFunctionPointerType()

bool clang::Type::isFunctionPointerType ( ) const
inline

◆ isFunctionProtoType()

bool clang::Type::isFunctionProtoType ( ) const
inline

◆ isFunctionType()

bool clang::Type::isFunctionType ( ) const
inline

Definition at line 6278 of file Type.h.

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFriendFunctionDecl(), AdjustFunctionParmAndArgTypesForDeduction(), clang::Sema::BuildAtomicType(), clang::Sema::BuildBlockPointerType(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildPointerType(), clang::Sema::CallExprUnaryConversions(), clang::Sema::CheckAllocatedType(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckFunctionReturnType(), clang::Sema::CheckMain(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), CheckTemplateArgumentIsCompatibleWithParameter(), ClassifyBinaryOp(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefaultFunctionArrayConversion(), determineEndOffset(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::ento::SValBuilder::evalCast(), Evaluate(), EvaluateBinaryTypeTrait(), EvaluateLValue(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), clang::Sema::FillInlineAsmIdentifierInfo(), clang::Expr::findBoundMemberType(), FindConversionForRefInit(), clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getBlockPointerType(), clang::ASTContext::getDecayedType(), clang::ASTContext::getDeclAlign(), clang::ASTContext::getExceptionObjectType(), clang::getParameterABISpelling(), HandleAddressSpaceTypeAttribute(), HandleSizeof(), clang::Sema::IgnoredValueConversions(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), clang::Declarator::isDeclarationOfFunction(), IsModifiable(), clang::ento::isPrimitiveType(), IsStandardConversion(), clang::Sema::LookupInlineAsmIdentifier(), LookupMemberExpr(), maybeSynthesizeBlockSignature(), clang::ASTContext::mergeObjCGCQualifiers(), clang::Sema::PerformMemberExprBaseConversion(), clang::TreeTransform< Derived >::RebuildQualifiedType(), ResolveOverloadForDeduction(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue(), TryReferenceInit(), TryReferenceInitializationCore(), TryStaticCast(), clang::TemplateDeclInstantiator::VisitVarDecl(), and clang::TemplateDeclInstantiator::VisitVarTemplateSpecializationDecl().

◆ isFundamentalType()

bool clang::Type::isFundamentalType ( ) const
inline

Tests whether the type is categorized as a fundamental type.

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

Definition at line 6246 of file Type.h.

Referenced by EvaluateUnaryTypeTrait().

◆ isHalfType()

bool clang::Type::isHalfType ( ) const
inline

◆ isImageType()

bool clang::Type::isImageType ( ) const
inline

◆ isIncompleteArrayType()

bool clang::Type::isIncompleteArrayType ( ) const
inline

◆ isIncompleteOrObjectType()

bool clang::Type::isIncompleteOrObjectType ( ) const
inline

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

Definition at line 1867 of file Type.h.

Referenced by clang::Sema::BuildQualifiedType(), checkConditionalObjectPointersCompatibility(), and TryStaticCast().

◆ isIncompleteType()

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

Types are partitioned into 3 broad categories (C99 6.2.5p1): object types, function types, and incomplete types.

isIncompleteType - Return true if this is an incomplete type (C99 6.2.5p1)

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.

  • a type that can describe objects, but which lacks information needed to determine its size.

Definition at line 2031 of file Type.cpp.

References clang::Decl::getASTContext(), clang::ObjCObjectType::getBaseType(), clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getMostRecentNonInjectedDecl(), clang::ASTContext::getTargetInfo(), clang::Decl::hasAttr(), clang::ObjCInterfaceDecl::hasDefinition(), clang::EnumDecl::isComplete(), clang::TagDecl::isCompleteDefinition(), isIncompleteType(), clang::TargetCXXABI::isMicrosoft(), and isVoidType().

Referenced by addValue(), clang::Sema::BuildUnaryTransformType(), calculateOffset(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckCastAlign(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckSubscriptingKind(), checkTypeMappable(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), determineEndOffset(), DiagnoseForRangeVariableCopies(), clang::Sema::DiscardMisalignedMemberAddress(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), EvaluateComparisonBinaryOperator(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), evenFlexibleArraySize(), clang::CodeGen::CodeGenTBAA::getAccessInfo(), GetAlignOfExpr(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ASTContext::getConstantArrayType(), clang::ento::TypedValueRegion::getExtent(), clang::CodeGen::CodeGenFunction::getNaturalTypeAlignment(), clang::ASTContext::getObjCEncodingTypeSize(), clang::ASTContext::getTypeAlignIfKnown(), hasDefaultSetterName(), isConstantSizeType(), clang::QualType::isCXX11PODType(), isEnableIf(), clang::CodeGen::CodeGenTypes::isFuncParamTypeConvertible(), isIncompleteType(), isLiteralType(), isOnePastTheEndOfCompleteObject(), isPreferredLookupResult(), isStandardLayoutType(), clang::QualType::isTriviallyCopyableType(), clang::Sema::isValidVarArgType(), isZeroSized(), matchTypes(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), tryEvaluateBuiltinObjectSize(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().

◆ isInstantiationDependentType()

bool clang::Type::isInstantiationDependentType ( ) const
inline

◆ isIntegerType()

bool clang::Type::isIntegerType ( ) const
inline

isIntegerType() does not include complex integers (a GCC extension).

isComplexIntegerType() can be used to test for complex integers.

Definition at line 6564 of file Type.h.

References clang::IsEnumDeclComplete(), and clang::IsEnumDeclScoped().

Referenced by clang::Sema::ActOnSEHExceptBlock(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildVectorType(), castValueToType(), checkBuiltinArgument(), CheckImplicitConversion(), CheckIncrementDecrementOperand(), clang::Sema::CheckLoopHintExpr(), checkOpenCLConditionVector(), checkOpenCLEnqueueIntType(), clang::Sema::CheckRemainderOperands(), convertVector(), create_dispatch_once(), DiagnoseBadFunctionCast(), clang::Sema::DiscardMisalignedMemberAddress(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), EmitIntegerTruncationCheckHelper(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), EmitX86_64VAArgFromMemory(), EvaluateComplex(), EvaluateVector(), getIntegerWidthAndSignedness(), clang::UserDefinedLiteral::getLiteralOperatorKind(), getUsualDeleteParams(), handleAssignment(), handleCompoundAssignment(), hasIntegerRepresentation(), clang::IntegerLiteral::IntegerLiteral(), isAcceptableMethodMismatch(), isKnownToHaveUnsignedValue(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::InitListExpr::isStringLiteralInit(), isValidOrderingForOp(), OpenCLArithmeticConversions(), clang::Sema::PerformImplicitConversion(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), SemaOpenCLBuiltinEnqueueKernel(), and tryVectorConvertAndSplat().

◆ isIntegralOrEnumerationType()

bool clang::Type::isIntegralOrEnumerationType ( ) const
inline

Determine whether this type is an integral or enumeration type.

Definition at line 6630 of file Type.h.

References clang::IsEnumDeclComplete().

Referenced by clang::Sema::ActOnStartOfSwitchStmt(), clang::ento::RangedConstraintManager::assumeSymUnsupported(), checkArithmeticOrEnumeralThreeWayCompare(), clang::Sema::CheckConvertedConstantExpression(), CheckICE(), CheckKeyForObjCARCConversion(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckSubscriptingKind(), conjureOffsetSymbolOnLocation(), clang::ento::SMTConv::doTypeConversion(), emitReplacement(), clang::ento::SValBuilder::evalCast(), Evaluate(), EvaluateAsInt(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), EvaluateIntegerOrLValue(), findCompleteObject(), clang::ento::SMTConv::fromCast(), getAbsoluteValueKind(), clang::ento::BasicValueFactory::getAPSIntType(), GetCFNumberSize(), clang::CodeGen::ABIArgInfo::getExtend(), clang::ASTContext::getObjCEncodingTypeSize(), clang::CodeGen::ABIArgInfo::getSignExtend(), clang::ento::ProgramState::getSValAsScalarOrLoc(), GetX86_64ByValArgumentPair(), clang::ento::SMTConv::getZeroExpr(), clang::CodeGen::ABIArgInfo::getZeroExtend(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ento::SValBuilder::haveSameType(), clang::Expr::isKnownToHaveBooleanValue(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), isOnePastTheEndOfCompleteObject(), isRecordEmpty(), isRecordWithSSEVectorType(), clang::ento::SValBuilder::makeZeroVal(), clang::Sema::ICEConvertDiagnoser::match(), clang::Sema::prepareVectorSplat(), RecoverCastedSymbol(), TryListInitialization(), tryRearrange(), TryReinterpretCast(), TryStaticCast(), and clang::Sema::VerifyBitField().

◆ isIntegralOrUnscopedEnumerationType()

bool Type::isIntegralOrUnscopedEnumerationType ( ) const

◆ isIntegralType()

bool Type::isIntegralType ( const ASTContext Ctx) const

Determine whether this type is an integral type.

This routine determines whether the given type is an integral type per C++ [basic.fundamental]p7. Although the C standard does not define the term "integral type", it has a similar term "integer type", and in C++ the two terms are equivalent. However, C's "integer type" includes enumeration types, while C++'s "integer type" does not. The ASTContext parameter is used to determine whether we should be following the C or C++ rules when determining whether this type is an integral/integer type.

For cases where C permits "an integer type" and C++ permits "an integral type", use this routine.

For cases where C permits "an integer type" and C++ permits "an integral or enumeration type", use isIntegralOrEnumerationType() instead.

Parameters
CtxThe context in which this type occurs.
Returns
true if the type is considered an integral type, false otherwise.

Definition at line 1759 of file Type.cpp.

References clang::ASTContext::getLangOpts().

Referenced by AnalyzeComparison(), checkIntToPointerCast(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckVectorCast(), create_OSAtomicCompareAndSwap(), DiagnoseBadFunctionCast(), DiagnoseBinOpPrecedence(), EvaluateUnaryTypeTrait(), clang::StandardConversionSequence::getNarrowingKind(), clang::Expr::IgnoreParenNoopCasts(), IsStandardConversion(), tryGCCVectorConvertAndSplat(), TryReinterpretCast(), TryStaticCast(), and tryVectorConvertAndSplat().

◆ isInterfaceType()

bool Type::isInterfaceType ( ) const

Definition at line 455 of file Type.cpp.

Referenced by EvaluateUnaryTypeTrait().

◆ isLinkageValid()

bool Type::isLinkageValid ( ) const

True if the computed linkage is valid.

Used for consistency checking. Should always return true.

Definition at line 3657 of file Type.cpp.

References clang::LinkageComputer::computeTypeLinkageInfo(), getCanonicalTypeInternal(), clang::LinkageInfo::getLinkage(), and TypeBits.

Referenced by clang::TagDecl::setTypedefNameForAnonDecl().

◆ isLiteralType()

bool Type::isLiteralType ( const ASTContext Ctx) const

◆ isLValueReferenceType()

bool clang::Type::isLValueReferenceType ( ) const
inline

◆ isMemberDataPointerType()

bool clang::Type::isMemberDataPointerType ( ) const
inline

◆ isMemberFunctionPointerType()

bool clang::Type::isMemberFunctionPointerType ( ) const
inline

◆ isMemberPointerType()

bool clang::Type::isMemberPointerType ( ) const
inline

◆ isNonOverloadPlaceholderType()

bool clang::Type::isNonOverloadPlaceholderType ( ) const
inline

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

Definition at line 6524 of file Type.h.

Referenced by clang::Sema::ActOnOMPArraySectionExpr(), and clang::Sema::DeduceAutoType().

◆ isNullPtrType()

bool clang::Type::isNullPtrType ( ) const
inline

◆ isObjCARCBridgableType()

bool Type::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.

Definition at line 3935 of file Type.cpp.

References isBlockPointerType(), and isObjCObjectPointerType().

Referenced by clang::Sema::BuildObjCBridgedCast(), and classifyTypeForARCConversion().

◆ isObjCARCImplicitlyUnretainedType()

bool Type::isObjCARCImplicitlyUnretainedType ( ) const

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

Definition at line 3868 of file Type.cpp.

References getCanonicalTypeInternal(), clang::QualType::getTypePtr(), and isObjCLifetimeType().

Referenced by getObjCARCImplicitLifetime(), inferARCWriteback(), and clang::Sema::MaybeBindToTemporary().

◆ isObjCBoxableRecordType()

bool Type::isObjCBoxableRecordType ( ) const

Definition at line 449 of file Type.cpp.

◆ isObjCBuiltinType()

bool clang::Type::isObjCBuiltinType ( ) const
inline

◆ isObjCClassOrClassKindOfType()

bool Type::isObjCClassOrClassKindOfType ( ) const

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

Unlike isObjCIdOrObjectKindOfType, there is no relevant bound here because Objective-C's type system cannot express "a class object for a subclass of NSFoo".

Definition at line 586 of file Type.cpp.

References clang::initialize(), isDependentType(), isInstantiationDependentType(), isVariablyModifiedType(), and Type().

◆ isObjCClassType()

bool clang::Type::isObjCClassType ( ) const
inline

◆ isObjCIdOrObjectKindOfType()

bool Type::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>.

Parameters
boundWill be set to the bound on non-id subtype types, which will be (possibly specialized) Objective-C class type, or null for 'id.

Definition at line 560 of file Type.cpp.

References getAs(), and clang::ObjCObjectType::stripObjCKindOfTypeAndQuals().

◆ isObjCIdType()

bool clang::Type::isObjCIdType ( ) const
inline

◆ isObjCIndependentClassType()

bool Type::isObjCIndependentClassType ( ) const

Definition at line 3900 of file Type.cpp.

References clang::ast_matchers::typedefType.

◆ isObjCIndirectLifetimeType()

bool Type::isObjCIndirectLifetimeType ( ) const

Definition at line 3912 of file Type.cpp.

References isObjCLifetimeType().

◆ isObjCInertUnsafeUnretainedType()

bool clang::Type::isObjCInertUnsafeUnretainedType ( ) const
inline

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?

Definition at line 2002 of file Type.h.

References hasAttr().

Referenced by computeBlockInfo().

◆ isObjCLifetimeType()

bool Type::isObjCLifetimeType ( ) const

◆ isObjCNSObjectType()

bool Type::isObjCNSObjectType ( ) const

◆ isObjCObjectOrInterfaceType()

bool clang::Type::isObjCObjectOrInterfaceType ( ) const
inline

◆ isObjCObjectPointerType()

bool clang::Type::isObjCObjectPointerType ( ) const
inline

Definition at line 6379 of file Type.h.

Referenced by clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnStartCXXMemberReference(), AdjustFunctionParmAndArgTypesForDeduction(), adjustReturnValue(), AuditedType(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildQualifiedType(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckAdditionOperands(), checkFormatStringExpr(), CheckKeyForObjCARCConversion(), clang::Sema::CheckMessageArgumentTypes(), checkNullabilityTypeSpecifier(), CheckObjCCollectionLiteralElement(), checkObjCPointerIntrospection(), clang::Sema::CheckSubscriptingKind(), clang::Sema::CodeCompleteMemberReferenceExpr(), clang::Sema::DiagnoseAssignmentResult(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), emitBadConversionNotes(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::ASTContext::getByrefLifetime(), GetGCAttrTypeForType(), clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getUnqualifiedObjCPointerType(), handleObjCGCTypeAttr(), hasIsEqualMethod(), clang::ento::cocoa::isCocoaObjectRef(), isObjCARCBridgableType(), isObjCReceiverType(), isObjCRetainableType(), clang::Sema::IsPointerConversion(), LookThroughTransitiveAssignmentsAndCommaOperators(), clang::analyze_format_string::ArgType::matchesType(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), objectifyExpr(), clang::Sema::PerformImplicitConversion(), clang::Sema::PrepareCastToObjCObjectPointer(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), scanToNextArgument(), clang::Sema::SelectorsForTypoCorrection(), TryConstCast(), tryGenerateSpecializedMessageSend(), TryReinterpretCast(), TryStaticCast(), and TypeIsInnerPointer().

◆ isObjCObjectType()

bool clang::Type::isObjCObjectType ( ) const
inline

◆ isObjCQualifiedClassType()

bool clang::Type::isObjCQualifiedClassType ( ) const
inline

◆ isObjCQualifiedIdType()

bool clang::Type::isObjCQualifiedIdType ( ) const
inline

◆ isObjCQualifiedInterfaceType()

bool Type::isObjCQualifiedInterfaceType ( ) const

Definition at line 1558 of file Type.cpp.

References getAsObjCQualifiedInterfaceType().

Referenced by scanToNextArgument().

◆ isObjCRetainableType()

bool Type::isObjCRetainableType ( ) const

◆ isObjCSelType()

bool clang::Type::isObjCSelType ( ) const
inline

Definition at line 6420 of file Type.h.

Referenced by clang::ObjCMethodDecl::getMethodFamily(), isCallback(), and LookupMemberExpr().

◆ isObjectType()

bool clang::Type::isObjectType ( ) const
inline

Determine whether this type is an object type.

Definition at line 1872 of file Type.h.

References isBooleanType(), and isCharType().

Referenced by emitCXXDestructor(), EvaluateBinaryTypeTrait(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), and clang::Sema::handlerCanCatch().

◆ isOCLExtOpaqueType()

bool clang::Type::isOCLExtOpaqueType ( ) const
inline

Definition at line 6481 of file Type.h.

◆ isOCLIntelSubgroupAVCType()

bool clang::Type::isOCLIntelSubgroupAVCType ( ) const
inline

◆ isOpenCLSpecificType()

bool clang::Type::isOpenCLSpecificType ( ) const
inline

◆ isOverloadableType()

bool clang::Type::isOverloadableType ( ) const
inline

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

Definition at line 6656 of file Type.h.

References isRecordType().

Referenced by clang::Sema::BuildBinOp(), clang::Sema::BuildUnaryOp(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().

◆ isPipeType()

bool clang::Type::isPipeType ( ) const
inline

◆ isPlaceholderType()

bool clang::Type::isPlaceholderType ( ) const
inline

◆ isPointerType()

bool clang::Type::isPointerType ( ) const
inline

Definition at line 6282 of file Type.h.

Referenced by clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::AddFunctionCandidates(), AdjustFunctionParmAndArgTypesForDeduction(), assumeNoOverflow(), clang::Sema::BuildAnonymousStructUnionMemberReference(), buildCapture(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildPseudoDestructorExpr(), clang::ento::StoreManager::CastRetrievedVal(), castToBase(), clang::Sema::CheckAdditionOperands(), checkArrayExpressionDoesNotReferToWholeSize(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), CheckImplicitConversion(), clang::Sema::CheckNonTypeTemplateParameterType(), checkPointerIntegerMismatch(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckTransparentUnionArgumentConstraints(), ClassifyDiagnostic(), CompareDerivedToBaseConversions(), convertPointersToCompositeType(), decomposeTypeForEH(), describeUninitializedArgumentInCall(), DiagnoseDivisionSizeofPointer(), diagnoseObjCARCConversion(), clang::Sema::DiscardMisalignedMemberAddress(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicIncrementValue(), EmitBinaryAtomicPost(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitDynamicCastToNull(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), emitOutlinedFunctionPrologue(), emitParallelOrTeamsOutlinedFunction(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), EmitX86_64VAArgFromMemory(), clang::ento::SValBuilder::evalCast(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), EvaluateObjectArgument(), EvaluatePointer(), EvaluateUnaryTypeTrait(), ExprLooksBoolean(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), GeneralizeType(), clang::QualType::getBaseTypeIdentifier(), getCanonicalParamType(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), getCoreType(), clang::CXXDeleteExpr::getDestroyedType(), clang::CXXInstanceCall::getExtraInvalidatedValues(), clang::UserDefinedLiteral::getLiteralOperatorKind(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCAttrKind(), getUuidAttrOfType(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), clang::Sema::handlerCanCatch(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::Expr::IgnoreParenNoopCasts(), isAutoCastType(), isConsumableType(), isIntegerLikeType(), isLibstdcxxPointerReturnFalseHack(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::Expr::isOBJCGCCandidate(), isOSObjectRelated(), isPointerOrRef(), isRecordWithSSEVectorType(), IsTypeModifiable(), isValidBaseType(), isValidOrderingForOp(), IsVoidStarType(), loadToBegin(), LookThroughTransitiveAssignmentsAndCommaOperators(), MakeBinaryAtomicValue(), clang::analyze_format_string::ArgType::matchesType(), objectifyExpr(), peelOffPointerArithmetic(), clang::Sema::PerformImplicitConversion(), clang::Sema::PrepareCastToObjCObjectPointer(), ResolveOverloadForDeduction(), SemaOpenCLBuiltinEnqueueKernel(), setObjCGCLValueClass(), clang::CodeGen::CodeGenFunction::StartFunction(), TryConstCast(), and TypeIsInnerPointer().

◆ isPromotableIntegerType()

bool Type::isPromotableIntegerType ( ) const

◆ isQueueT()

bool clang::Type::isQueueT ( ) const
inline

◆ isRealFloatingType()

bool Type::isRealFloatingType ( ) const

◆ isRealType()

bool Type::isRealType ( ) const

Definition at line 1943 of file Type.cpp.

Referenced by breakDownVectorType(), and rewriteToObjCProperty().

◆ isRecordType()

bool clang::Type::isRecordType ( ) const
inline

Definition at line 6355 of file Type.h.

Referenced by clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemberPointerType(), buildMemcpyForAssignmentOp(), clang::Sema::BuildOverloadedArrowExpr(), checkFoundationAPI(), CheckMoveOnConstruction(), CheckObjCCollectionLiteralElement(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::checkVariadicArgument(), ClassifyTemporary(), classifyTypeForARCConversion(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::CXXBindTemporaryExpr::Create(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), DiagnoseRecursiveConstFields(), DiagnoseReinterpretUpDownCast(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), Evaluate(), evaluateCDTSize(), EvaluateInPlace(), EvaluateRecord(), EvaluateTemporary(), FastEvaluateAsRValue(), clang::Sema::FindAllocationFunctions(), FindConversionForRefInit(), findSubobject(), clang::ento::FindUninitializedFields::FindUninitializedFields(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::QualType::getBaseTypeIdentifier(), clang::ASTContext::getByrefLifetime(), clang::CXXMethodDecl::getDevirtualizedMethod(), GetGCAttrTypeForType(), getSelfInitExpr(), GetX86_64ByValArgumentPair(), HandleConstructorCall(), clang::Sema::handlerCanCatch(), clang::ASTContext::hasUniqueObjectRepresentations(), InitCatchParam(), isCARCBridgableType(), clang::ento::NonLoc::isCompoundType(), clang::Expr::isConstantInitializer(), clang::Sema::isCopyElisionCandidate(), isImplicitThis(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), isObjCReceiverType(), isPointerToConst(), isRecordType(), isSimpleZero(), IsStandardConversion(), isTrackedVar(), LookupMemberExpr(), LookupMethodInReceiverType(), clang::ento::SValBuilder::makeZeroVal(), clang::Sema::PerformImplicitConversion(), ResolveOverloadedFunctionForReferenceBinding(), setObjCGCLValueClass(), clang::Expr::skipRValueSubobjectAdjustments(), clang::TreeTransform< Derived >::TransformNestedNameSpecifierLoc(), TryConstCast(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryListConversion(), TryListInitialization(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryReinterpretCast(), TryStaticImplicitCast(), TryUserDefinedConversion(), clang::ento::ExprEngine::VisitInitListExpr(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().

◆ isReferenceType()

bool clang::Type::isReferenceType ( ) const
inline

Definition at line 6294 of file Type.h.

Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::adjustTargetSpecificDataForLambdas(), applyBitwiseConstraints(), clang::Sema::BuildArrayType(), clang::Sema::BuildAtomicType(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildPointerType(), clang::Sema::BuildQualifiedType(), clang::canDynamicCastThrow(), clang::CapturedStmt::Capture::Capture(), CastsAwayConstness(), castToBase(), clang::Sema::CheckAllocatedType(), clang::Sema::checkAllowedCUDAInitializer(), CheckForReference(), clang::Sema::checkInitializerLifetime(), CheckLValueConstantExpression(), checkMapClauseExpressionBase(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckOpenMPLinearDecl(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), checkVAStartIsInVariadicFunction(), ClassifyDiagnostic(), clang::Sema::CompareReferenceRelationship(), createObjCPropertyGetter(), decomposeTypeForEH(), describeUninitializedArgumentInCall(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseForRangeVariableCopies(), diagnoseListInit(), DiagnoseUninitializedReference(), DoMarkVarDeclReferenced(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitCallArg(), clang::CodeGen::CodeGenFunction::EmitCallExprLValue(), clang::CodeGen::CodeGenFunction::EmitConstructorBody(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), EmitDeclInit(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), clang::CodeGen::CodeGenFunction::EmitDelegateCallArg(), clang::CodeGen::CodeGenFunction::EmitExprAsInit(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), emitOutlinedFunctionPrologue(), emitRTtypeidCall(), clang::CodeGen::CodeGenFunction::EmitRValueForField(), clang::ento::SValBuilder::evalCast(), clang::Expr::EvaluateAsInitializer(), EvaluateLValue(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), clang::ento::SMTConv::fromCast(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), getBadTypeidFn(), clang::QualType::getBaseTypeIdentifier(), getCoreType(), clang::CFGImplicitDtor::getDestructorDecl(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), getReferenceInitTemporaryType(), getStaticBooleanValue(), getThreadLocalWrapperLinkage(), getUuidAttrOfType(), clang::ento::SMTConv::getZeroExpr(), HandleConstructorCall(), clang::InitializationSequence::InitializeFrom(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isAutoCastType(), isCallback(), isConstantEmittableObjectType(), isConsumableType(), clang::ento::isDereferencableType(), isLiteralType(), clang::ento::Loc::isLocType(), isPointerOrRef(), isRecordEmpty(), isRecordWithSSEVectorType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), isSimpleZero(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::Expr::isUnusedResultAWarning(), isValidBaseType(), loadToBegin(), clang::CodeGen::CodeGenModule::maybeSetTrivialComdat(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), PerformReturnAdjustment(), print_elem(), clang::APValue::printPretty(), clang::ento::ExprEngine::ProcessAutomaticObjDtor(), clang::ento::ExprEngine::ProcessInitializer(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::ReferenceType::ReferenceType(), clang::Expr::setType(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), supportsNilWithFloatRet(), clang::CodeGen::CGOpenMPRuntimeNVPTX::translateParameter(), TryCopyInitialization(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryListConversion(), TryListInitialization(), TryReferenceInit(), TryStaticImplicitCast(), TryUserDefinedConversion(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::ento::ExprEngine::VisitCast(), visitLocalsRetainedByInitializer(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), warnAboutAmbiguousFunction(), wasRegionOfInterestModifiedAt(), and writeShouldKill().

◆ isReserveIDT()

bool clang::Type::isReserveIDT ( ) const
inline

Definition at line 6452 of file Type.h.

Referenced by SemaBuiltinCommitRWPipe(), and SemaBuiltinRWPipe().

◆ isRValueReferenceType()

bool clang::Type::isRValueReferenceType ( ) const
inline

◆ isSamplerT()

bool clang::Type::isSamplerT ( ) const
inline

◆ isSaturatedFixedPointType()

bool clang::Type::isSaturatedFixedPointType ( ) const
inline

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.

Definition at line 6585 of file Type.h.

Referenced by clang::ASTContext::getCorrespondingSaturatedType(), and clang::ASTContext::getFixedPointSemantics().

◆ isScalarType()

bool clang::Type::isScalarType ( ) const
inline

◆ isScopedEnumeralType()

bool Type::isScopedEnumeralType ( ) const

Determine whether this type is a scoped enumeration type.

Definition at line 492 of file Type.cpp.

◆ isSignedFixedPointType()

bool clang::Type::isSignedFixedPointType ( ) const
inline

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.

Definition at line 6597 of file Type.h.

Referenced by clang::ASTContext::getCorrespondingUnsignedType(), and clang::ASTContext::getFixedPointSemantics().

◆ isSignedIntegerOrEnumerationType()

bool Type::isSignedIntegerOrEnumerationType ( ) const

◆ isSignedIntegerType()

bool Type::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.

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

Definition at line 1844 of file Type.cpp.

Referenced by AnalyzeBitFieldAssignment(), CheckImplicitConversion(), dumpBasePath(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), EvaluateUnaryTypeTrait(), EvaluateVector(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), getIntegerWidthAndSignedness(), clang::ASTContext::getPromotedIntegerType(), hasDefaultSetterName(), clang::Sema::IsIntegralPromotion(), isKnownToHaveUnsignedValue(), clang::ASTContext::isPromotableBitField(), printExprAsWritten(), and rewriteToNumericBoxedExpression().

◆ isSpecificBuiltinType()

bool clang::Type::isSpecificBuiltinType ( unsigned  K) const
inline

◆ isSpecificPlaceholderType()

bool clang::Type::isSpecificPlaceholderType ( unsigned  K) const
inline

◆ isSpecifierType()

bool Type::isSpecifierType ( ) const

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

Definition at line 2488 of file Type.cpp.

References Complex, and getTypeClass().

Referenced by AppendTypeQualList(), and GetBaseType().

◆ isStandardLayoutType()

bool Type::isStandardLayoutType ( ) const

Test if this type is a standard-layout type.

(C++0x [basic.type]p9)

Definition at line 2352 of file Type.cpp.

References getAs(), getBaseElementTypeUnsafe(), isDependentType(), isIncompleteType(), isScalarType(), and isVectorType().

Referenced by EvaluateUnaryTypeTrait(), and isLayoutCompatible().

◆ isStdByteType()

bool Type::isStdByteType ( ) const

Definition at line 2446 of file Type.cpp.

References clang::IdentifierInfo::isStr().

Referenced by isValidBaseType().

◆ isStructureOrClassType()

bool Type::isStructureOrClassType ( ) const

◆ isStructureType()

bool Type::isStructureType ( ) const

Definition at line 443 of file Type.cpp.

Referenced by EvaluateUnaryTypeTrait().

◆ isTemplateTypeParmType()

bool clang::Type::isTemplateTypeParmType ( ) const
inline

Definition at line 6493 of file Type.h.

Referenced by clang::TemplateDeclInstantiator::VisitCXXMethodDecl().

◆ isUndeducedType()

bool clang::Type::isUndeducedType ( ) const
inline

◆ isUnionType()

bool Type::isUnionType ( ) const

◆ isUnsaturatedFixedPointType()

bool clang::Type::isUnsaturatedFixedPointType ( ) const
inline

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.

Definition at line 6593 of file Type.h.

◆ isUnsignedFixedPointType()

bool clang::Type::isUnsignedFixedPointType ( ) const
inline

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.

Definition at line 6611 of file Type.h.

◆ isUnsignedIntegerOrEnumerationType()

bool Type::isUnsignedIntegerOrEnumerationType ( ) const

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

Definition at line 1900 of file Type.cpp.

Referenced by clang::ento::BasicValueFactory::getTruthValue(), getTypeString(), GetValueRange(), HandleIntToIntCast(), hasUnsignedIntegerRepresentation(), and clang::ento::SValBuilder::makeIntVal().

◆ isUnsignedIntegerType()

bool Type::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.

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

Definition at line 1884 of file Type.cpp.

Referenced by applyBitwiseConstraints(), CheckImplicitConversion(), clang::ento::SValBuilder::evalIntegralCast(), EvaluateUnaryTypeTrait(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::ASTContext::getIntegerTypeOrder(), clang::ASTContext::getPromotedIntegerType(), IsStdFunction(), SemaBuiltinReserveRWPipe(), and SemaBuiltinRWPipe().

◆ isVariableArrayType()

bool clang::Type::isVariableArrayType ( ) const
inline

◆ isVariablyModifiedType()

bool clang::Type::isVariablyModifiedType ( ) const
inline

◆ isVectorType()

bool clang::Type::isVectorType ( ) const
inline

Definition at line 6367 of file Type.h.

Referenced by clang::Sema::ActOnCastExpr(), clang::ASTContext::areCompatibleVectorTypes(), clang::Sema::areLaxCompatibleVectorTypes(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildVectorLiteral(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), checkFoundationAPI(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckVectorCast(), clang::Sema::CXXCheckConditionalOperands(), DiagnoseBadFunctionCast(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), EmitX86_64VAArgFromMemory(), Evaluate(), EvaluateComparisonBinaryOperator(), EvaluateLValue(), EvaluateUnaryTypeTrait(), EvaluateVector(), GetIntrinsic(), getTypeString(), clang::Sema::InvalidLogicalVectorOperands(), isCheapEnoughToEvaluateUnconditionally(), clang::ento::NonLoc::isCompoundType(), clang::QualType::isCXX11PODType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::Sema::isLaxVectorConversion(), isLiteralType(), isRecordEmpty(), isRecordWithSSEVectorType(), isStandardLayoutType(), isTrackedVar(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), IsVectorConversion(), clang::ento::SValBuilder::makeZeroVal(), clang::Expr::refersToVectorElement(), rewriteInputConstraintReferences(), clang::Sema::SemaBuiltinShuffleVector(), clang::Sema::SemaConvertVectorExpr(), TryReinterpretCast(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ento::ExprEngine::VisitLogicalExpr().

◆ isVisibilityExplicit()

bool clang::Type::isVisibilityExplicit ( ) const
inline

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

Definition at line 2312 of file Type.h.

◆ isVoidPointerType()

bool Type::isVoidPointerType ( ) const

◆ isVoidType()

bool clang::Type::isVoidType ( ) const
inline

Definition at line 6530 of file Type.h.

Referenced by clang::Sema::ActOnCastExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnStartOfObjCMethodDef(), addBaseAndFieldSizes(), AnalyzeImplicitConversions(), clang::ento::StoreManager::attemptDownCast(), clang::Sema::BuildArrayType(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::buildLambdaScope(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildPseudoDestructorExpr(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), clang::Sema::CheckCallReturnType(), checkConditionalObjectPointersCompatibility(), clang::Sema::CheckConditionalOperands(), checkConditionalVoidType(), clang::Sema::CheckConstexprFunctionBody(), clang::Sema::CheckCXXThrowOperand(), CheckIndirectionOperand(), CheckMemaccessSize(), clang::comments::Sema::checkReturnsCommand(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTransparentUnionArgumentConstraints(), CheckUnaryTypeTraitTypeCompleteness(), clang::Sema::checkUnknownAnyCast(), ClassifyConditional(), classifyTypeForARCConversion(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::Sema::CXXCheckConditionalOperands(), deduceOpenCLImplicitAddrSpace(), DiagnoseBadFunctionCast(), DiagnoseCastOfObjCSEL(), DiagnoseReinterpretUpDownCast(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitInlinedInheritingCXXConstructorCall(), emitPointerArithmetic(), EmitX86_64VAArgFromMemory(), evalBinOpFieldRegionFieldRegion(), Evaluate(), EvaluateBinaryTypeTrait(), evaluateCDTSize(), EvaluateLValue(), evaluateTypeTrait(), EvaluateUnaryTypeTrait(), EvaluateVoid(), FinishForRangeVarDecl(), formatBlockPlaceholder(), clang::CodeGen::CodeGenFunction::GenerateCode(), getCastAwayConstnessCastKind(), clang::ento::SMTConstraintManager< ConstraintSMT, SMTExprTy >::getSymVal(), getTypeString(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), HandleFunctionCall(), clang::Sema::handlerCanCatch(), HandleSizeof(), IgnoreCommaOperand(), clang::Sema::IgnoredValueConversions(), clang::CXXDynamicCastExpr::isAlwaysNull(), isCARCBridgableType(), isCheapEnoughToEvaluateUnconditionally(), isDispatchBlock(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIncompleteType(), isLiteralType(), clang::Expr::isNullPointerConstant(), isUnitTest(), clang::Expr::isUnusedResultAWarning(), clang::ento::SymExpr::isValidTypeForSymbol(), clang::Sema::isValidVarArgType(), isVoidPointerToNonConst(), IsVoidStarType(), clang::analyze_format_string::ArgType::matchesType(), noteMemberDeclaredHere(), clang::consumed::ConsumedAnalyzer::run(), shouldBeModeledWithNoOp(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::SubstParmVarDecl(), TryReinterpretCast(), TryStaticCast(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), warnAboutAmbiguousFunction(), and wasRegionOfInterestModifiedAt().

◆ isWideCharType()

bool Type::isWideCharType ( ) const

◆ operator=()

Type& clang::Type::operator= ( const Type )
delete

◆ setContainsUnexpandedParameterPack()

void clang::Type::setContainsUnexpandedParameterPack ( bool  PP = true)
inlineprotected

◆ setDependent()

void clang::Type::setDependent ( bool  D = true)
inlineprotected

◆ setInstantiationDependent()

void clang::Type::setInstantiationDependent ( bool  D = true)
inlineprotected

◆ setVariablyModified()

void clang::Type::setVariablyModified ( bool  VM = true)
inlineprotected

◆ this_()

Type* clang::Type::this_ ( )
inlineprotected

Definition at line 1793 of file Type.h.

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 1774 of file Type.h.

◆ ASTReader

friend class ASTReader
friend

Definition at line 1811 of file Type.h.

◆ ASTWriter

friend class ASTWriter
friend

Definition at line 1812 of file Type.h.

◆ TypePropertyCache

template<class T >
friend class TypePropertyCache
friend

Definition at line 1766 of file Type.h.

Member Data Documentation

◆ @116

union { ... }

◆ ArrayTypeBits

ArrayTypeBitfields clang::Type::ArrayTypeBits

Definition at line 1714 of file Type.h.

◆ AttributedTypeBits

AttributedTypeBitfields clang::Type::AttributedTypeBits

Definition at line 1715 of file Type.h.

◆ AutoTypeBits

AutoTypeBitfields clang::Type::AutoTypeBits

Definition at line 1716 of file Type.h.

◆ BuiltinTypeBits

BuiltinTypeBitfields clang::Type::BuiltinTypeBits

Definition at line 1717 of file Type.h.

◆ DependentTemplateSpecializationTypeBits

DependentTemplateSpecializationTypeBitfields clang::Type::DependentTemplateSpecializationTypeBits

Definition at line 1727 of file Type.h.

◆ ElaboratedTypeBits

ElaboratedTypeBitfields clang::Type::ElaboratedTypeBits

Definition at line 1722 of file Type.h.

◆ FunctionTypeBits

FunctionTypeBitfields clang::Type::FunctionTypeBits

Definition at line 1718 of file Type.h.

Referenced by clang::FunctionType::getNameForCallConv().

◆ ObjCObjectTypeBits

ObjCObjectTypeBitfields clang::Type::ObjCObjectTypeBits

◆ PackExpansionTypeBits

PackExpansionTypeBitfields clang::Type::PackExpansionTypeBits

Definition at line 1728 of file Type.h.

◆ ReferenceTypeBits

ReferenceTypeBitfields clang::Type::ReferenceTypeBits

Definition at line 1720 of file Type.h.

◆ SubstTemplateTypeParmPackTypeBits

SubstTemplateTypeParmPackTypeBitfields clang::Type::SubstTemplateTypeParmPackTypeBits

Definition at line 1724 of file Type.h.

Referenced by clang::TemplateTypeParmType::getIdentifier().

◆ TemplateSpecializationTypeBits

TemplateSpecializationTypeBitfields clang::Type::TemplateSpecializationTypeBits

◆ TypeBits

TypeBitfields clang::Type::TypeBits

◆ TypeWithKeywordBits

TypeWithKeywordBitfields clang::Type::TypeWithKeywordBits

Definition at line 1721 of file Type.h.

◆ VectorTypeBits

VectorTypeBitfields clang::Type::VectorTypeBits

Definition at line 1723 of file Type.h.

Referenced by clang::VectorType::VectorType().


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