clang
17.0.0git
|
The base class of the type hierarchy. More...
#include "clang/AST/Type.h"
Classes | |
class | ArrayTypeBitfields |
class | AttributedTypeBitfields |
class | AutoTypeBitfields |
class | BuiltinTypeBitfields |
class | ConstantArrayTypeBitfields |
class | DependentTemplateSpecializationTypeBitfields |
class | ElaboratedTypeBitfields |
class | FunctionTypeBitfields |
FunctionTypeBitfields store various bits belonging to FunctionProtoType. More... | |
class | ObjCObjectTypeBitfields |
class | PackExpansionTypeBitfields |
class | ReferenceTypeBitfields |
class | SubstTemplateTypeParmPackTypeBitfields |
class | SubstTemplateTypeParmTypeBitfields |
class | TemplateSpecializationTypeBitfields |
class | TypedefBitfields |
class | TypeOfBitfields |
class | TypeWithKeywordBitfields |
class | UsingBitfields |
class | VectorTypeBitfields |
Public Types | |
enum | TypeClass |
enum | ScalarTypeKind { STK_CPointer, STK_BlockPointer, STK_ObjCObjectPointer, STK_MemberPointer, STK_Bool, STK_Integral, STK_Floating, STK_IntegralComplex, STK_FloatingComplex, STK_FixedPoint } |
Public Member Functions | |
Type (const Type &)=delete | |
Type (Type &&)=delete | |
Type & | operator= (const Type &)=delete |
Type & | operator= (Type &&)=delete |
TypeClass | getTypeClass () const |
bool | isFromAST () const |
Whether this type comes from an AST file. More... | |
bool | containsUnexpandedParameterPack () const |
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates. More... | |
bool | isCanonicalUnqualified () const |
Determines if this type would be canonical if it had no further qualification. More... | |
QualType | getLocallyUnqualifiedSingleStepDesugaredType () const |
Pull a single level of sugar off of this locally-unqualified type. More... | |
bool | isSizelessType () const |
As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other. More... | |
bool | isSizelessBuiltinType () const |
bool | isSVESizelessBuiltinType () const |
Returns true for SVE scalable vector types. More... | |
bool | isVLSTBuiltinType () const |
Determines if this is a sizeless type supported by the 'arm_sve_vector_bits' type attribute, which can be applied to a single SVE vector or predicate, excluding tuple types such as svint32x4_t. More... | |
QualType | getSveEltType (const ASTContext &Ctx) const |
Returns the representative type for the element of an SVE builtin 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 | isStructuralType () const |
Determine if this type is a structural type, per C++20 [temp.param]p7. More... | |
bool | isStandardLayoutType () const |
Test if this type is a standard-layout type. More... | |
bool | isBuiltinType () const |
Helper methods to distinguish type categories. More... | |
bool | isSpecificBuiltinType (unsigned K) const |
Test for a particular builtin type. More... | |
bool | isPlaceholderType () const |
Test for a type which does not represent an actual type-system type but is instead used as a placeholder for various convenient purposes within Clang. More... | |
const BuiltinType * | getAsPlaceholderType () const |
bool | isSpecificPlaceholderType (unsigned K) const |
Test for a specific placeholder type. More... | |
bool | isNonOverloadPlaceholderType () const |
Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType. More... | |
bool | isIntegerType () const |
isIntegerType() does not include complex integers (a GCC extension). More... | |
bool | isEnumeralType () const |
bool | isScopedEnumeralType () const |
Determine whether this type is a scoped enumeration type. More... | |
bool | isBooleanType () const |
bool | isCharType () const |
bool | isWideCharType () const |
bool | isChar8Type () const |
bool | isChar16Type () const |
bool | isChar32Type () const |
bool | isAnyCharacterType () const |
Determine whether this type is any of the built-in character types. More... | |
bool | isIntegralType (const ASTContext &Ctx) const |
Determine whether this type is an integral type. More... | |
bool | isIntegralOrEnumerationType () const |
Determine whether this type is an integral or enumeration type. More... | |
bool | isIntegralOrUnscopedEnumerationType () const |
Determine whether this type is an integral or unscoped enumeration type. More... | |
bool | isUnscopedEnumerationType () const |
bool | isRealFloatingType () const |
Floating point categories. More... | |
bool | isComplexType () const |
isComplexType() does not include complex integers (a GCC extension). More... | |
bool | isAnyComplexType () const |
bool | isFloatingType () const |
bool | isHalfType () const |
bool | isFloat16Type () const |
bool | isBFloat16Type () const |
bool | isFloat128Type () const |
bool | isIbm128Type () const |
bool | isRealType () const |
bool | isArithmeticType () const |
bool | isVoidType () const |
bool | isScalarType () const |
bool | isAggregateType () const |
Determines whether the type is a C++ aggregate type or C aggregate or union type. More... | |
bool | isFundamentalType () const |
Tests whether the type is categorized as a fundamental type. More... | |
bool | isCompoundType () const |
Tests whether the type is categorized as a compound type. More... | |
bool | isFunctionType () const |
bool | isFunctionNoProtoType () const |
bool | isFunctionProtoType () const |
bool | isPointerType () const |
bool | isAnyPointerType () const |
bool | isBlockPointerType () const |
bool | isVoidPointerType () const |
bool | isReferenceType () const |
bool | isLValueReferenceType () const |
bool | isRValueReferenceType () const |
bool | isObjectPointerType () const |
bool | isFunctionPointerType () const |
bool | isFunctionReferenceType () const |
bool | isMemberPointerType () const |
bool | isMemberFunctionPointerType () const |
bool | isMemberDataPointerType () const |
bool | isArrayType () const |
bool | isConstantArrayType () const |
bool | isIncompleteArrayType () const |
bool | isVariableArrayType () const |
bool | isDependentSizedArrayType () const |
bool | isRecordType () const |
bool | isClassType () const |
bool | isStructureType () const |
bool | isObjCBoxableRecordType () const |
bool | isInterfaceType () const |
bool | isStructureOrClassType () const |
bool | isUnionType () const |
bool | isComplexIntegerType () const |
bool | isVectorType () const |
bool | isExtVectorType () const |
bool | isExtVectorBoolType () const |
bool | isMatrixType () const |
bool | isConstantMatrixType () const |
bool | isDependentAddressSpaceType () const |
bool | isObjCObjectPointerType () const |
bool | isObjCRetainableType () const |
bool | isObjCLifetimeType () const |
Returns true if objects of this type have lifetime semantics under ARC. More... | |
bool | isObjCIndirectLifetimeType () const |
bool | isObjCNSObjectType () const |
bool | isObjCIndependentClassType () const |
bool | isObjCObjectType () const |
bool | isObjCQualifiedInterfaceType () const |
bool | isObjCQualifiedIdType () const |
bool | isObjCQualifiedClassType () const |
bool | isObjCObjectOrInterfaceType () const |
bool | isObjCIdType () const |
bool | isDecltypeType () const |
bool | isObjCInertUnsafeUnretainedType () const |
Was this type written with the special inert-in-ARC __unsafe_unretained qualifier? More... | |
bool | isObjCIdOrObjectKindOfType (const ASTContext &ctx, const ObjCObjectType *&bound) const |
Whether the type is Objective-C 'id' or a __kindof type of an object type, e.g., __kindof NSView * or __kindof id <NSCopying>. More... | |
bool | isObjCClassType () const |
bool | isObjCClassOrClassKindOfType () const |
Whether the type is Objective-C 'Class' or a __kindof type of an Class type, e.g., __kindof Class <NSCopying>. More... | |
bool | isBlockCompatibleObjCPointerType (ASTContext &ctx) const |
bool | isObjCSelType () const |
bool | isObjCBuiltinType () const |
bool | isObjCARCBridgableType () const |
Determine whether the given type T is a "bridgable" Objective-C type, which is either an Objective-C object pointer type or an. More... | |
bool | isCARCBridgableType () const |
Determine whether the given type T is a "bridgeable" C type. More... | |
bool | isTemplateTypeParmType () const |
bool | isNullPtrType () const |
bool | isNothrowT () const |
bool | isAlignValT () const |
bool | isStdByteType () const |
bool | isAtomicType () const |
bool | isUndeducedAutoType () const |
bool | isTypedefNameType () const |
Determines whether this type is written as a typedef-name. More... | |
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 | isBitIntType () const |
bool | isOpenCLSpecificType () const |
bool | isObjCARCImplicitlyUnretainedType () const |
Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong. More... | |
bool | isCUDADeviceBuiltinSurfaceType () const |
Check if the type is the CUDA device builtin surface type. More... | |
bool | isCUDADeviceBuiltinTextureType () const |
Check if the type is the CUDA device builtin texture type. More... | |
bool | isRVVType () const |
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... | |
TypeDependence | getDependence () const |
bool | containsErrors () const |
Whether this type is an error type. More... | |
bool | isDependentType () const |
Whether this type is a dependent type, meaning that its definition somehow depends on a template parameter (C++ [temp.dep.type]). More... | |
bool | isInstantiationDependentType () const |
Determine whether this type is an instantiation-dependent type, meaning that the type involves a template parameter (even if the definition does not actually depend on the type substituted for that template parameter). More... | |
bool | isUndeducedType () const |
Determine whether this type is an undeduced type, meaning that it somehow involves a C++11 'auto' type or similar which has not yet been deduced. More... | |
bool | isVariablyModifiedType () const |
Whether this type is a variably-modified type (C99 6.7.5). More... | |
bool | hasSizedVLAType () const |
Whether this type involves a variable-length array type with a definite size. More... | |
bool | hasUnnamedOrLocalType () const |
Whether this type is or contains a local or unnamed type. More... | |
bool | isOverloadableType () const |
Determines whether this is a type for which one can define an overloaded operator. More... | |
bool | isElaboratedTypeSpecifier () const |
Determine wither this type is a C++ elaborated-type-specifier. More... | |
bool | canDecayToPointerType () const |
Determines whether this type can decay to a pointer type. More... | |
bool | hasPointerRepresentation () const |
Whether this type is represented natively as a pointer. More... | |
bool | hasObjCPointerRepresentation () const |
Whether this type can represent an objective pointer type for the purpose of GC'ability. More... | |
bool | hasIntegerRepresentation () const |
Determine whether this type has an integer representation of some sort, e.g., it is an integer type or a vector. More... | |
bool | hasSignedIntegerRepresentation () const |
Determine whether this type has an signed integer representation of some sort, e.g., it is an signed integer type or a vector. More... | |
bool | hasUnsignedIntegerRepresentation () const |
Determine whether this type has an unsigned integer representation of some sort, e.g., it is an unsigned integer type or a vector. More... | |
bool | hasFloatingRepresentation () const |
Determine whether this type has a floating-point representation of some sort, e.g., it is a floating-point type or a vector thereof. More... | |
const RecordType * | getAsStructureType () const |
const RecordType * | getAsUnionType () const |
NOTE: getAs*ArrayType are methods on ASTContext. More... | |
const ComplexType * | getAsComplexIntegerType () const |
const ObjCObjectType * | getAsObjCInterfaceType () const |
const ObjCObjectPointerType * | getAsObjCInterfacePointerType () const |
const ObjCObjectPointerType * | getAsObjCQualifiedIdType () const |
const ObjCObjectPointerType * | getAsObjCQualifiedClassType () const |
const ObjCObjectType * | getAsObjCQualifiedInterfaceType () const |
CXXRecordDecl * | getAsCXXRecordDecl () const |
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or because it is the injected-class-name type of a class template or class template partial specialization. More... | |
RecordDecl * | getAsRecordDecl () const |
Retrieves the RecordDecl this type refers to. More... | |
TagDecl * | getAsTagDecl () const |
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is the injected-class-name type of a class template or class template partial specialization. More... | |
const CXXRecordDecl * | getPointeeCXXRecordDecl () const |
If this is a pointer or reference to a RecordType, return the CXXRecordDecl that the type refers to. More... | |
DeducedType * | getContainedDeducedType () const |
Get the DeducedType whose type will be deduced for a variable with an initializer of this type. More... | |
AutoType * | getContainedAutoType () const |
Get the AutoType whose type will be deduced for a variable with an initializer of this type. More... | |
bool | hasAutoForTrailingReturnType () const |
Determine whether this type was written with a leading 'auto' corresponding to a trailing return type (possibly for a nested function type within a pointer to function type or similar). More... | |
template<typename T > | |
const T * | getAs () const |
Member-template getAs<specific type>'. More... | |
template<typename T > | |
const T * | getAsAdjusted () const |
Member-template getAsAdjusted<specific type>. More... | |
const ArrayType * | getAsArrayTypeUnsafe () const |
A variant of getAs<> for array types which silently discards qualifiers from the outermost type. More... | |
template<typename T > | |
const T * | castAs () const |
Member-template castAs<specific type>. More... | |
const ArrayType * | castAsArrayTypeUnsafe () const |
A variant of castAs<> for array type which silently discards qualifiers from the outermost type. More... | |
bool | hasAttr (attr::Kind AK) const |
Determine whether this type had the specified attribute applied to it (looking through top-level type sugar). More... | |
const Type * | getBaseElementTypeUnsafe () const |
Get the base element type of this type, potentially discarding type qualifiers. More... | |
const Type * | getArrayElementTypeNoTypeQual () const |
If this is an array type, return the element type of the array, potentially with type qualifiers missing. More... | |
const Type * | getPointeeOrArrayElementType () const |
If this is a pointer type, return the pointee type. More... | |
QualType | getPointeeType () const |
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee. More... | |
const Type * | getUnqualifiedDesugaredType () const |
Return the specified type with any "sugar" removed from the type, removing any typedefs, typeofs, etc., as well as any qualifiers. More... | |
bool | isSignedIntegerType () const |
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation. More... | |
bool | isUnsignedIntegerType () const |
Return true if this is an integer type that is unsigned, according to C99 6.2.5p6 [which returns true for _Bool], or an enum decl which has an unsigned representation. More... | |
bool | isSignedIntegerOrEnumerationType () const |
Determines whether this is an integer type that is signed or an enumeration types whose underlying type is a signed integer type. More... | |
bool | isUnsignedIntegerOrEnumerationType () const |
Determines whether this is an integer type that is unsigned or an enumeration types whose underlying type is a unsigned integer type. More... | |
bool | isFixedPointType () const |
Return true if this is a fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. More... | |
bool | isFixedPointOrIntegerType () const |
Return true if this is a fixed point or integer type. More... | |
bool | isSaturatedFixedPointType () const |
Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. More... | |
bool | isUnsaturatedFixedPointType () const |
Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. More... | |
bool | isSignedFixedPointType () const |
Return true if this is a fixed point type that is signed according to ISO/IEC JTC1 SC22 WG14 N1169. More... | |
bool | isUnsignedFixedPointType () const |
Return true if this is a fixed point type that is unsigned according to ISO/IEC JTC1 SC22 WG14 N1169. More... | |
bool | isConstantSizeType () const |
Return true if this is not a variable sized type, according to the rules of C99 6.7.5p3. More... | |
bool | isSpecifierType () const |
Returns true if this type can be represented by some set of type specifiers. More... | |
Linkage | getLinkage () const |
Determine the linkage of this type. More... | |
Visibility | getVisibility () const |
Determine the visibility of this type. More... | |
bool | isVisibilityExplicit () const |
Return true if the visibility was explicitly set is the code. More... | |
LinkageInfo | getLinkageAndVisibility () const |
Determine the linkage and visibility of this type. More... | |
bool | isLinkageValid () const |
True if the computed linkage is valid. More... | |
std::optional< NullabilityKind > | getNullability () 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... | |
std::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 ASTContext &Context) const |
template<> | |
const TypedefType * | getAs () const |
This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type. More... | |
Protected Types | |
enum | { NumTypeWithKeywordBits = 8 } |
Protected Member Functions | |
Type (TypeClass tc, QualType canon, TypeDependence Dependence) | |
Type * | this_ () |
void | setDependence (TypeDependence D) |
void | addDependence (TypeDependence D) |
Friends | |
template<class T > | |
class | TypePropertyCache |
class | ASTContext |
class | ASTReader |
class | ASTWriter |
template<class T > | |
class | serialization::AbstractTypeReader |
template<class T > | |
class | serialization::AbstractTypeWriter |
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.
|
inlineprotected |
Definition at line 1950 of file Type.h.
References clang::NoLinkage, and TypeBits.
|
delete |
|
delete |
bool Type::acceptsObjCTypeParams | ( | ) | const |
Determines if this is an ObjC interface type that may accept type parameters.
Definition at line 1619 of file Type.cpp.
References getAsObjCInterfaceType().
|
inlineprotected |
Definition at line 1972 of file Type.h.
References getDependence(), and setDependence().
Referenced by clang::ObjCObjectType::ObjCObjectType().
|
inline |
Determines whether this type can decay to a pointer type.
Definition at line 7334 of file Type.h.
References isArrayType(), and isFunctionType().
Referenced by clang::analyze_format_string::ArgType::matchesType().
Determine whether the given type can have a nullability specifier applied to it, i.e., if it is any kind of pointer type.
ResultIfUnknown | The value to return if we don't yet know whether this type can have nullability because it is dependent. |
Definition at line 4195 of file Type.cpp.
References getCanonicalTypeInternal(), and clang::ast_matchers::type.
Referenced by clang::Sema::getMessageSendResultType().
const T * clang::Type::castAs |
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 7464 of file Type.h.
References getUnqualifiedDesugaredType().
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnClassPropertyRefExpr(), clang::Sema::ActOnCompatibilityAlias(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnNumericConstant(), clang::Sema::adjustCCAndNoReturn(), clang::ASTContext::adjustDeducedFunctionResultType(), clang::TemplateDeclInstantiator::adjustForRewrite(), adjustFunctionTypeForInstantiation(), clang::Sema::anyAltivecTypes(), clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::areCompatibleVectorTypes(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildVectorLiteral(), clang::ASTContext::canAssignObjCInterfaces(), clang::Sema::CheckBaseClassAccess(), clang::Sema::CheckBaseSpecifier(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), CheckConstexprParameterTypes(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), CheckEvaluationResult(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::checkInitMethod(), clang::Sema::CheckMain(), clang::Sema::CheckMemberOperatorAccess(), clang::Sema::CheckMSVCRTEntryPoint(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverridingFunctionAttributes(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CheckUnresolvedMemberAccess(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorConditionalTypes(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CGDebugInfo::completeClass(), clang::CodeGen::CGDebugInfo::completeType(), clang::ObjCObjectType::computeSuperClassTypeSlow(), convertToComplexValue(), create_std_move_forward(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeduceReturnType(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseCallingConvCast(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::Sema::DiagnoseSentinelCalls(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), EmitBaseInitializer(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCMSEClearRecord(), clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), emitDeclTargetVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitMatrixSubscriptExpr(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitOMPUseDeviceAddrClause(), emitOutlinedFunctionPrologue(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), clang::CodeGen::CodeGenFunction::EmitPromotedValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedLoad(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedStore(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitUnPromotedValue(), emitWritebackArg(), EvalAndBitcastToAPInt(), clang::Sema::EvaluateImplicitExceptionSpec(), evaluateLValueAsAllocSize(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindCompositeObjCPointerType(), FindDesignatorMismatch(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::CXXNewExpr::getAllocatedType(), clang::QualType::getBaseTypeIdentifier(), clang::Expr::getBestDynamicClassType(), getCallingConvMangling(), clang::FunctionDecl::getCallResultType(), clang::CallExpr::getCallReturnType(), getCanonicalRD(), getConversionOpReturnTyAsFunction(), clang::CXXConversionDecl::getConversionType(), clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getCorrespondingSignedFixedPointType(), clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getCorrespondingUnsignedType(), getCXXRecord(), clang::FunctionDecl::getDeclaredReturnType(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::TemplateTypeParmDecl::getDepth(), clang::CXXDeleteExpr::getDestroyedType(), clang::CXXMethodDecl::getDevirtualizedMethod(), clang::ASTContext::getFixedPointIBits(), clang::ASTContext::getFixedPointScale(), getFloatingRank(), clang::ASTContext::getFloatTypeSemantics(), clang::Decl::getFunctionType(), clang::BlockExpr::getFunctionType(), clang::ASTContext::getFunctionTypeWithExceptionSpec(), clang::TemplateTypeParmDecl::getIndex(), clang::ObjCObjectPointerType::getInterfaceType(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), clang::CXXMethodDecl::getMethodQualifiers(), getMostInformativeDerivedClassImpl(), clang::UnresolvedMemberExpr::getNamingClass(), clang::OverloadCandidate::getNumParams(), clang::ASTContext::getObjCGCAttrKind(), getObjCSubstitutions(), clang::ObjCObjectPointerType::getObjectType(), clang::interp::Program::getOrCreateDummy(), clang::TemplateArgument::getPackExpansionPattern(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::ReferenceType::getPointeeType(), clang::CXXMethodDecl::getRefQualifier(), clang::FunctionDecl::getReturnType(), clang::ObjCInterfaceDecl::getSuperClassType(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), getUsualDeleteParams(), clang::AtomicExpr::getValueType(), clang::Sema::HandleFunctionTypeMismatch(), handleVectorVectorBinOp(), hasDeducedReturnType(), hasDefaultCXXMethodCC(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::Sema::InstantiateExceptionSpec(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), IsAcceptableNonMemberOperatorCandidate(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::CXXMethodDecl::isConst(), clang::Expr::isConstantInitializer(), clang::CodeGen::CodeGenFunction::IsConstructorDelegationValid(), clang::CXXConstructorDecl::isConvertingConstructor(), isDesignatorAtObjectEnd(), isIdiomaticBraceElisionEntity(), isInitializerOfDynamicClass(), isNoexcept(), clang::TemplateTypeParmDecl::isParameterPack(), clang::Sema::IsPointerConversion(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isStdBuiltin(), IsStructurallyEquivalent(), IsVoidStarType(), clang::CXXMethodDecl::isVolatile(), isZeroInitialized(), makeTailCallIfSwiftAsync(), clang::Sema::MarkVirtualBaseDestructorsReferenced(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::Sema::PerformImplicitConversion(), clang::Sema::PrepareScalarCast(), clang::Sema::prepareVectorSplat(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildCXXPseudoDestructorExpr(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::Sema::ResolveExceptionSpec(), clang::Sema::SemaBuiltinShuffleVector(), clang::Sema::SemaConvertVectorExpr(), clang::CXXRecordDecl::setBases(), clang::ASTContext::setCFConstantStringType(), setObjCGCLValueClass(), clang::CXXNewExpr::shouldNullCheckAllocation(), shouldSkipNotingLambdaConversionDecl(), clang::Expr::skipRValueSubobjectAdjustments(), clang::Sema::startLambdaDefinition(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), tryEmitSpecializedAllocInit(), TryStaticCast(), and clang::ASTDeclReader::VisitFunctionDecl().
|
inline |
A variant of castAs<> for array type which silently discards qualifiers from the outermost type.
Definition at line 7473 of file Type.h.
References getUnqualifiedDesugaredType().
Referenced by CheckEvaluationResult(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), FindDesignatorMismatch(), getArrayIndexingBound(), clang::QualType::getBaseTypeIdentifier(), and getCoreType().
|
inline |
Whether this type is an error type.
Definition at line 2302 of file Type.h.
References getDependence().
Referenced by clang::Sema::BuildReturnStmt(), clang::Sema::CheckBaseSpecifier(), clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates.
A type that contains a parameter pack shall be expanded by the ellipsis operator at some point. For example, the typedef in the following example contains an unexpanded parameter pack 'T':
Note that this routine does not specify which
Definition at line 2005 of file Type.h.
References getDependence().
Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::BuildBaseInitializer(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckPackExpansion(), clang::DeclarationNameInfo::containsUnexpandedParameterPack(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ASTContext::getPackExpansionType(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::TransformFunctionTypeParams(), clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
LLVM_DUMP_METHOD void Type::dump | ( | ) | const |
Definition at line 195 of file ASTDumper.cpp.
References clang::QualType::dump().
Referenced by computeCachedProperties().
LLVM_DUMP_METHOD void Type::dump | ( | llvm::raw_ostream & | OS, |
const ASTContext & | Context | ||
) | const |
Definition at line 197 of file ASTDumper.cpp.
References clang::QualType::dump().
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 369 of file Type.cpp.
References getUnqualifiedDesugaredType().
Referenced by clang::Sema::BuildExpressionFromDeclTemplateArgument(), and isZeroInitialized().
const T * clang::Type::getAs |
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 7397 of file Type.h.
References getUnqualifiedDesugaredType().
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnTypedefedProtocols(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddMemberOperatorCandidates(), AlignOfType(), clang::AnyCall::AnyCall(), appendFunctionType(), appendType(), clang::ASTContext::areComparableObjCPointerTypes(), clang::ASTContext::areCompatibleSveTypes(), clang::ASTContext::areLaxCompatibleSveTypes(), clang::Sema::areMatrixTypesOfTheSameDimension(), clang::Sema::AttachBaseSpecifiers(), clang::ASTDeclReader::attachPreviousDeclImpl(), BitsContainNoUserData(), clang::Sema::BuildAddressSpaceAttr(), clang::CodeGen::CodeGenFunction::BuildAppleKextVirtualCall(), clang::Sema::BuildArrayType(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildObjCArrayLiteral(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildQualifiedType(), clang::Sema::BuildReferenceType(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildTypeofExprType(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorType(), clang::Sema::BuiltinChangeSignedness(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::arcmt::trans::canApplyWeak(), canAssignObjCObjectTypes(), CanThrow(), clang::FunctionProtoType::canThrow(), CheckAggExprForMemSetUse(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckConversionToObjCLiteral(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckDistantExceptionSpec(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckEquivalentExceptionSpec(), CheckEvaluationResult(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFloatComparison(), clang::Sema::CheckFriendTypeDecl(), CheckIdentityFieldAssignment(), clang::Sema::checkIllFormedTrivialABIStruct(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckLValueToRValueConversionOperand(), clang::Sema::CheckMatrixElementwiseOperands(), clang::Sema::CheckMatrixMultiplyOperands(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckObjCForCollectionOperand(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckQualifiedFunctionForTypeId(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSizelessVectorCompareOperands(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubscriptingKind(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), checkTypedefTypeForCapability(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorLogicalOperands(), clang::Sema::CheckVectorOperands(), ClassifyDiagnostic(), classifyReturnType(), ClassifyUnnamed(), CollectVRQualifiers(), clang::Sema::computeDeclContext(), create_dispatch_once(), create_OSAtomicCompareAndSwap(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::interp::Program::createDescriptor(), clang::CodeGen::CodeGenModule::CreateKCFITypeId(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::Sema::DeclClonePragmaWeak(), decomposeTypeForEH(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), clang::desugarForDiagnostic(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseCastOfObjCSEL(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::Sema::DiagnoseSentinelCalls(), diagnoseSubMismatchMethodParameters(), clang::Sema::DiagnoseUnusedButSetDecl(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAMDGPUDevicePrintfCallExpr(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::ConstantEmitter::emitForMemory(), EmitFunctionDeclPointer(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitLoadOfExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitNonNullRValueCheck(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), EmitObjectDelete(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheckForCast(), EvaluateBinaryTypeTrait(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), EvaluateUnaryTypeTrait(), evenFlexibleArraySize(), extractPBaseFlags(), clang::Sema::ExtractUnqualifiedFunctionType(), FieldHasTrivialDestructorBody(), clang::Sema::FindCompositePointerType(), findEnumForBlockReturn(), clang::Sema::FindInstantiatedDecl(), findMethodDecl(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CXXRecordDecl::forallBases(), GeneralizeFunctionType(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), getAbsoluteValueArgumentType(), GetAlignOfType(), clang::ento::BasicValueFactory::getAPSIntType(), getAsRecordDecl(), GetAssumedMessageSendExprType(), GetBaseType(), clang::Expr::getBestDynamicClassType(), clang::Sema::getCallingConvAttributedType(), clang::CallExpr::getCallReturnType(), clang::ASTContext::getCanonicalNestedNameSpecifier(), clang::ASTContext::getCommentForDecl(), getConversionOpReturnTyAsFunction(), clang::CXXMethodDecl::getCorrespondingMethodInClass(), clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getCorrespondingUnsignedType(), getCXXRecord(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ASTContext::getDeclAlign(), clang::ento::CallEvent::getDeclaredResultType(), clang::getDeclUsageType(), getDependentArraySubscriptType(), clang::FunctionDecl::getEllipsisLoc(), clang::FunctionDecl::getExceptionSpecType(), GetExprType(), clang::ASTContext::getExtVectorType(), GetFixedPointRank(), clang::VarDecl::getFlexibleArrayInitChars(), getFloatingRank(), getFuchsiaHandleSymbols(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedNestedNameSpecifier(), clang::TypeName::getFullyQualifiedType(), clang::getFunctionExtInfo(), clang::CodeGen::CGDebugInfo::getFunctionType(), clang::CodeCompleteConsumer::OverloadCandidate::getFunctionType(), clang::Decl::getFunctionType(), clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(), clang::ASTContext::getFunctionTypeWithoutPtrSizes(), GetGCAttrTypeForType(), clang::ASTContext::getInnerObjCOwnership(), clang::ObjCObjectType::getInterface(), clang::ASTContext::getIntWidth(), clang::ASTContext::getLegacyIntegralTypeEncoding(), clang::ento::TypedValueRegion::getLocationType(), clang::ASTContext::getLValueReferenceType(), clang::StandardConversionSequence::getNarrowingKind(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::NSAPI::GetNSIntegralKind(), clang::NSAPI::getNSNumberFactoryMethodKind(), getNullability(), clang::ento::getNullabilityAnnotation(), GetNumNonZeroBytesInInit(), clang::FunctionDecl::getNumParams(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCQualType(), clang::ASTContext::getObjCObjectType(), getPointeeCXXRecordDecl(), clang::ASTContext::getPreferredTypeAlign(), getPrettyTypeName(), clang::ASTContext::getPromotedIntegerType(), GetPrototypeLoc(), clang::UsingEnumDecl::getQualifierLoc(), getRangeForType(), clang::ObjCMessageExpr::getReceiverInterface(), getRecordArgABI(), clang::interp::ByteCodeExprGen< Emitter >::getRecordTy(), getRecordType(), GetReturnType(), clang::ASTContext::getRValueReferenceType(), clang::extractapi::TypedefUnderlyingTypeResolver::getSymbolReferenceForType(), clang::ASTContext::getTypeAlignIfKnown(), getTypeExpansion(), clang::ASTContext::getTypeInfoDataSizeInChars(), clang::ASTContext::getTypeUnadjustedAlign(), clang::GetUnderlyingFunction(), clang::extractapi::TypedefUnderlyingTypeResolver::getUnderlyingTypeDecl(), clang::Expr::getValueKindForType(), clang::AtomicExpr::getValueType(), clang::ASTContext::getVectorType(), HandleBaseToDerivedCast(), clang::Sema::HandleFunctionTypeMismatch(), HandleMemberPointerAccess(), clang::Sema::handlerCanCatch(), hasAttr(), clang::ASTNodeImporter::hasAutoReturnTypeDeclaredInside(), hasBooleanRepresentation(), clang::RecordType::hasConstFields(), clang::Sema::hasExplicitCallingConv(), clang::VarDecl::hasFlexibleArrayInit(), HasNonDllImportDtor(), hasTemplateSpecializationInEncodedString(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::CodeGen::CodeGenFunction::hasVolatileMember(), clang::Sema::IgnoredValueConversions(), clang::ASTNodeImporter::ImportDeclContext(), clang::Sema::inferCUDATargetForImplicitSpecialMember(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::ASTReader::InitializeContext(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), is32Or64BitBasicType(), IsAddressSpaceConversion(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Sema::IsBlockPointerConversion(), isBooleanType(), isCanonicalExceptionSpecification(), IsCFError(), isCFStringType(), clang::ento::cocoa::isCocoaObjectRef(), clang::Sema::IsComplexPromotion(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::QualType::isCXX11PODType(), IsDerivedFromInclusive(), clang::ParmVarDecl::isDestroyedInCallee(), isDispatchBlock(), isEmptyField(), isEmptyRecord(), clang::Sema::IsFloatingPointPromotion(), isForwardingReference(), clang::CodeGen::CodeGenTypes::isFuncParamTypeConvertible(), clang::Sema::IsFunctionConversion(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), clang::Sema::isInitListConstructor(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), isKnownNonNilCollectionType(), clang::Sema::isLaxVectorConversion(), isLegalTypeForHLSLSV_DispatchThreadID(), isLiteralType(), IsLLVMStringRef(), clang::Sema::IsMemberPointerConversion(), IsNSError(), isNSStringType(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::Expr::isNullPointerConstant(), isObjCIdOrObjectKindOfType(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), clang::RecordDecl::isOrContainsUnion(), clang::NonTypeTemplateParmDecl::isPackExpansion(), IsPartOfAST(), clang::Sema::IsPointerConversion(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), isPointerToRecordType(), clang::ASTContext::isPromotableIntegerType(), clang::CodeGen::ABIInfo::isPromotableIntegerTypeForABI(), isRecordWithSIMDVectorType(), clang::QualType::isReferenceable(), isSafeToConvert(), IsSameCharType(), clang::ASTContext::isSameEntity(), clang::Sema::isSameOrCompatibleFunctionType(), isScopedEnumerationType(), isSIMDVectorType(), isSimpleTemplateIdType(), isSingleElementStruct(), IsSmallVector(), isStandardLayoutType(), clang::Sema::isStdInitializerList(), IsStdString(), IsStdVector(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), isTypeSubstitutable(), isValidBaseType(), isValidBPFPreserveEnumValueArg(), isValidBPFPreserveTypeInfoArg(), isValidSwiftErrorResultType(), isValidSwiftIndirectResultType(), isVarDeclStrongDefinition(), IsVariableSizedType(), isVector(), isVoidPointerToNonConst(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), clang::FieldDecl::isZeroSize(), loadToBegin(), clang::Sema::LookupInlineAsmVarDeclField(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), clang::Sema::MarkFunctionReferenced(), MarkUsedTemplateParameters(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), maybeAdjustInterfaceForSubscriptingCheck(), clang::Sema::MaybeBindToTemporary(), clang::CodeGen::CodeGenModule::MayDropFunctionReturn(), clang::CodeGen::CGCXXABI::mayNeedDestruction(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::analyze_format_string::FormatSpecifier::namedTypeToLengthModifier(), needsConversionOfHalfVec(), NoteIndirectBases(), ObjCBridgeRelatedAttrFromType(), ObjCEnumerationCollection(), clang::ASTContext::ObjCObjectAdoptsQTypeProtocols(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), printCXXConstructorDestructorName(), clang::ento::ExprEngine::processSwitch(), PropertyMemoryAttribute(), pushTemporaryCleanup(), clang::ASTContext::QIdProtocolsAdoptObjCObjectProtocols(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildCXXPseudoDestructorExpr(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildUnresolvedUsingType(), clang::ASTContext::removePtrSizeAddrSpace(), clang::Sema::RequireCompleteType(), clang::Sema::RequireLiteralType(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFP2Ret(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFPRet(), rewriteToNumericBoxedExpression(), rewriteToObjCProperty(), setUsedBits(), ShouldDiagnoseUnusedDecl(), shouldNotPrintDirectly(), clang::Expr::skipRValueSubobjectAdjustments(), skipTopLevelReferences(), clang::Sema::SpecialMemberIsTrivial(), clang::ObjCObjectType::stripObjCKindOfTypeAndQuals(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::TransformExceptionSpec(), TryAddressSpaceCast(), TryClassUnification(), TryConstCast(), TryDeconstructFunctionLike(), clang::Sema::tryExprAsCall(), tryGetFunctionProtoType(), TryLValueToRValueCast(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), TypeHasMayAlias(), TypeIsInnerPointer(), clang::ASTContext::UnwrapSimilarTypes(), clang::QualType::UseExcessPrecision(), clang::Sema::UsualArithmeticConversions(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::UsedDeclVisitor< Derived >::VisitCXXDeleteExpr(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitFriendDecl(), clang::TextNodeDumper::VisitFunctionDecl(), clang::ento::SValExplainer::VisitSymbolicRegion(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and clang::serialization::DataStreamBasicWriter< ASTRecordWriter >::writeLValuePathSerializationHelper().
const AttributedType * Type::getAs | ( | ) | const |
This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type.
This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type.
This will check for a TemplateSpecializationType by removing any existing sugar until it reaches a TemplateSpecializationType or a non-sugared type.
const T * clang::Type::getAsAdjusted |
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 7414 of file Type.h.
References P.
Referenced by clang::Sema::checkOpenMPDeclareVariantFunction().
|
inline |
A variant of getAs<> for array types which silently discards qualifiers from the outermost type.
Definition at line 7450 of file Type.h.
References getUnqualifiedDesugaredType().
Referenced by clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnSourceLocExpr(), appendType(), clang::Sema::BuildObjCEncodeExpression(), checkMappableExpressionList(), clang::interp::Program::createDescriptor(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::ASTContext::getBaseElementType(), getCanonicalParamType(), clang::ASTContext::getConstantArrayElementCount(), getDependentArraySubscriptType(), getDesignatedType(), getTypeString(), hasSizedVLAType(), clang::InitListExpr::isStringLiteralInit(), and clang::interp::ByteCodeExprGen< Emitter >::visitArrayInitializer().
const ComplexType * Type::getAsComplexIntegerType | ( | ) | const |
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 1783 of file Type.cpp.
References getAsTagDecl().
Referenced by clang::Sema::ActOnCXXTryBlock(), clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CGHLSLRuntime::annotateHLSLResource(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildCXXConstructExpr(), BuildNonArrayForRange(), clang::Sema::BuildUnresolvedCoawaitExpr(), calculateOffset(), canCaptureVariableByCopy(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::canVarDeclThrow(), clang::Sema::CaptureHasSideEffects(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckCompleteVariableDeclaration(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDestructor(), checkDestructorReference(), clang::Sema::CheckParmsForFunctionDef(), computeBlockInfo(), clang::ImplicitCastExpr::Create(), clang::Sema::CreateBuiltinBinOp(), clang::ConstructionContext::createFromLayers(), clang::TypeName::createNestedNameSpecifierForScopeOf(), clang::CodeGen::CodeGenFunction::cxxDestructorCanThrow(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), diagnoseMutableFields(), DiagnoseReinterpretUpDownCast(), clang::CodeGen::CodeGenFunction::EmitCXXConstructLValue(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberDataPointerAddress(), EmitDeclDestroy(), EmitDestroyingObjectDelete(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable(), clang::ento::StoreManager::evalBaseToDerived(), EvaluateUnaryTypeTrait(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindInstantiatedDecl(), clang::NestedNameSpecifier::getAsRecordDecl(), getBaseAlignmentAndOffsetFromPtr(), clang::ASTContext::getCommentForDecl(), getConstructedRegion(), getContainedDynamicClass(), getDefaultInitValue(), getDerivedToBaseAlignmentAndOffset(), clang::CFGImplicitDtor::getDestructorDecl(), clang::ento::CXXInstanceCall::getExtraInvalidatedValues(), getFieldsFromClassHierarchy(), clang::Sema::getFixItZeroInitializerForType(), clang::TypeName::getFullyQualifiedNestedNameSpecifier(), clang::LambdaExpr::getLambdaClass(), clang::ento::ProgramState::getLValue(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), clang::CodeGen::CodeGenModule::getMinimumObjectSize(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), clang::UnresolvedMemberExpr::getNamingClass(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), getPrettyTypeName(), clang::CXXMemberCallExpr::getRecordDecl(), clang::ento::BlockCall::getRuntimeDefinition(), clang::ento::CXXInstanceCall::getRuntimeDefinition(), getUnionInitName(), getVirtualOperatorDelete(), HandleBaseToDerivedCast(), HandleConstructorCall(), HandleDestructionImpl(), HandleLValueBasePath(), HandleMemberPointerAccess(), hasAnyVptr(), hasNonTrivialConstructorCall(), hasTemplateSpecializationInEncodedString(), hasTrivialABIAttr(), clang::ComparisonCategoryInfo::ValueInfo::hasValidIntValue(), hasVirtualDestructor(), clang::Sema::inferGslPointerAttribute(), InitializationHasSideEffects(), clang::Sema::isAbstractType(), isAutoCastType(), isConstNotMutableType(), isConsumableType(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), clang::Sema::IsDerivedFrom(), clang::FunctionDecl::isDestroyingOperatorDelete(), isIncompleteType(), clang::ento::iterator::isIteratorType(), clang::ento::RetainSummaryManager::isKnownSmartPointer(), isNothrowT(), isOSObjectRelated(), isPointerToObject(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), isReadByLvalueToRvalueConversion(), isRecordWithAttr(), clang::isRefCountable(), isStdBasicOstream(), isStdSmartPtr(), clang::ento::smartptr::isStdSmartPtr(), isStructuralType(), clang::Sema::isThisOutsideMemberFunctionBody(), clang::CodeGen::CodeGenModule::isTypeConstant(), isValidSubjectOfOSAttribute(), clang::Sema::isValidVarArgType(), clang::CodeGen::CodeGenFunction::isVptrCheckRequired(), isZeroInitialized(), LeastDerivedClassWithSameLayout(), clang::ComparisonCategories::lookupInfoForType(), mapConsumableAttrState(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), PerformReturnAdjustment(), print_initializer(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::CodeGen::CodeGenFunction::PushDestructorCleanup(), regionMatchesCXXRecordType(), clang::Sema::RequireNonAbstractType(), clang::Sema::RequireStructuralType(), clang::CXXRecordDecl::setBases(), clang::Sema::tryCaptureOpenMPLambdas(), TypeRequiresBuiltinLaunderImp(), usesMultipleInheritanceModel(), visitLocalsRetainedByInitializer(), clang::ASTDeclWriter::VisitVarDecl(), and clang::ASTDeclReader::VisitVarDeclImpl().
const ObjCObjectPointerType * Type::getAsObjCInterfacePointerType | ( | ) | const |
Definition at line 1760 of file Type.cpp.
Referenced by clang::Sema::BuildInstanceMessage(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::Sema::HandleExprPropertyRefExpr(), and clang::Sema::SelectorsForTypoCorrection().
const ObjCObjectType * Type::getAsObjCInterfaceType | ( | ) | const |
Definition at line 1752 of file Type.cpp.
Referenced by acceptsObjCTypeParams().
const ObjCObjectPointerType * Type::getAsObjCQualifiedClassType | ( | ) | const |
Definition at line 1742 of file Type.cpp.
Referenced by clang::Sema::BuildInstanceMessage().
const ObjCObjectPointerType * Type::getAsObjCQualifiedIdType | ( | ) | const |
Definition at line 1732 of file Type.cpp.
Referenced by clang::Sema::BuildInstanceMessage().
const ObjCObjectType * Type::getAsObjCQualifiedInterfaceType | ( | ) | const |
Definition at line 1718 of file Type.cpp.
Referenced by isObjCQualifiedInterfaceType().
|
inline |
Definition at line 7173 of file Type.h.
Referenced by clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::DefaultVariadicArgumentPromotion(), isValidBPFPreserveEnumValueArg(), isValidBPFPreserveFieldInfoArg(), and isValidBPFPreserveTypeInfoArg().
RecordDecl * Type::getAsRecordDecl | ( | ) | const |
Retrieves the RecordDecl this type refers to.
Definition at line 1787 of file Type.cpp.
References getAsTagDecl().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), getAsRecordDecl(), getFieldsFromClassHierarchy(), clang::ASTNodeImporter::ImportDeclContext(), clang::QualType::isTriviallyRelocatableType(), and isValidStructGUID().
const RecordType * Type::getAsStructureType | ( | ) | const |
Definition at line 645 of file Type.cpp.
References getUnqualifiedDesugaredType().
Referenced by appendType(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), isCallback(), and clang::analyze_format_string::ArgType::matchesType().
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 1791 of file Type.cpp.
Referenced by clang::UsingEnumDecl::Create(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), getAsCXXRecordDecl(), getAsRecordDecl(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::UsingEnumDecl::getEnumDecl(), getUuidAttrOfType(), and TypeHasMayAlias().
const RecordType * Type::getAsUnionType | ( | ) | const |
NOTE: getAs*ArrayType are methods on ASTContext.
Definition at line 664 of file Type.cpp.
References getUnqualifiedDesugaredType().
Referenced by appendType(), clang::Sema::CheckTransparentUnionArgumentConstraints(), isTransparentUnion(), clang::Sema::isValidPointerAttrType(), clang::ASTContext::mergeTransparentUnionType(), and useFirstFieldIfTransparentUnion().
|
inline |
Get the base element type of this type, potentially discarding type qualifiers.
This should never be used when type qualifiers are meaningful.
Definition at line 7347 of file Type.h.
References clang::ast_matchers::arrayType, and clang::ast_matchers::type.
Referenced by clang::Sema::BuildCXXConstructExpr(), clang::canVarDeclThrow(), clang::Sema::CaptureHasSideEffects(), clang::Sema::checkIllFormedTrivialABIStruct(), diagnoseMutableFields(), clang::Sema::DiagnoseUnusedButSetDecl(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable(), getContainedDynamicClass(), clang::ASTContext::getPreferredTypeAlign(), getUuidAttrOfType(), HasNonDllImportDtor(), hasTemplateSpecializationInEncodedString(), clang::ASTNodeImporter::ImportDeclContext(), InitializationHasSideEffects(), clang::QualType::isCXX11PODType(), isLiteralType(), isReadByLvalueToRvalueConversion(), isStandardLayoutType(), clang::CodeGen::CGCXXABI::mayNeedDestruction(), and pushTemporaryCleanup().
|
inline |
Definition at line 2588 of file Type.h.
Referenced by addAssociatedClassesAndNamespaces(), canHaveNullability(), clang::CodeGen::CodeGenTypes::DeriveThisType(), clang::TemplateSpecializationType::desugar(), clang::ObjCTypeParamType::desugar(), clang::TypePropertyCache< Private >::ensure(), clang::ASTContext::getCanonicalType(), getCanonicalTypeUnqualified(), getConstantArrayExtents(), getCurrentInstantiationOf(), clang::ASTContext::getObjCGCAttrKind(), clang::SubstTemplateTypeParmType::getReplacementType(), clang::LocInfoType::getType(), clang::LinkageComputer::getTypeLinkageAndVisibility(), clang::ASTContext::getUsingType(), clang::TemplateSpecializationType::isCurrentInstantiation(), isLinkageValid(), isLiteralType(), isObjCARCImplicitlyUnretainedType(), IsPossiblyOpaquelyQualifiedType(), isSameQualifier(), and clang::ObjCTypeParamType::Profile().
|
inline |
Definition at line 214 of file CanonicalType.h.
References clang::CanQual< Type >::CreateUnsafe(), and getCanonicalTypeInternal().
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), clang::Sema::checkExceptionSpecification(), evaluateCDTSize(), findDirectBaseWithType(), GetFormalType(), GetReturnType(), clang::Sema::HandleFunctionTypeMismatch(), and setCUDAKernelCallingConvention().
|
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 2413 of file Type.h.
References getContainedDeducedType().
Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::BuildReturnStmt(), clang::NonTypeTemplateParmDecl::Create(), clang::Sema::DeduceAutoType(), clang::CodeGen::CGDebugInfo::EmitUsingDecl(), clang::NonTypeTemplateParmDecl::hasPlaceholderTypeConstraint(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::TransformFunctionTypeParams(), and clang::ASTDeclReader::VisitFunctionDecl().
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 1912 of file Type.cpp.
Referenced by clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateArgument(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), getContainedAutoType(), GetDeclSpecTypeForDeclarator(), clang::isUndeducedReturnType(), and isUndeducedType().
|
inline |
Definition at line 2297 of file Type.h.
References TypeBits.
Referenced by addDependence(), clang::computeDependence(), containsErrors(), containsUnexpandedParameterPack(), isDependentType(), isInstantiationDependentType(), and isVariablyModifiedType().
Linkage Type::getLinkage | ( | ) | const |
Determine the linkage of this type.
Definition at line 4072 of file Type.cpp.
References TypeBits.
Referenced by getTypeInfoLinkage(), clang::LinkageComputer::getTypeLinkageAndVisibility(), and clang::Sema::isExternalWithNoLinkageType().
LinkageInfo Type::getLinkageAndVisibility | ( | ) | const |
Determine the linkage and visibility of this type.
Definition at line 4178 of file Type.cpp.
References clang::LinkageComputer::getTypeLinkageAndVisibility().
Referenced by getVisibility(), and isVisibilityExplicit().
QualType Type::getLocallyUnqualifiedSingleStepDesugaredType | ( | ) | const |
Pull a single level of sugar off of this locally-unqualified type.
Users should generally prefer SplitQualType::getSingleStepDesugaredType() or QualType::getSingleStepDesugaredType(const ASTContext&).
Definition at line 422 of file Type.cpp.
References getTypeClass().
Referenced by clang::SplitQualType::getSingleStepDesugaredType(), unwrapSugar(), clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::Visit(), and clang::TextNodeDumper::Visit().
std::optional< NullabilityKind > Type::getNullability | ( | ) | const |
Determine the nullability of the given type.
Note that nullability is only captured as sugar within the type system, not as part of the canonical type, so nullability will be lost by canonicalization and desugaring.
Definition at line 4182 of file Type.cpp.
References getAs(), and clang::ExtQualsTypeCommonBase::Type.
Referenced by clang::Sema::BuildObjCBoxedExpr(), clang::Sema::CheckObjCPropertyAttributes(), computeConditionalNullability(), clang::Sema::deduceClosureReturnType(), clang::Sema::diagnoseNullableToNonnullConversion(), clang::CodeGen::CodeGenFunction::EmitNullabilityCheck(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::ASTContext::getArrayDecayedType(), clang::Sema::getMessageSendResultType(), clang::ASTContext::hasSameNullabilityTypeQualifier(), and clang::CodeGen::CodeGenFunction::StartFunction().
Qualifiers::ObjCLifetime Type::getObjCARCImplicitLifetime | ( | ) | const |
Return the implicit lifetime for this type, which must not be dependent.
Definition at line 4384 of file Type.cpp.
References isObjCARCImplicitlyUnretainedType(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Strong.
std::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.
dc | The declaration context for which we are building up a substitution mapping, which should be an Objective-C class, extension, category, or method within. |
Extract the class from the receiver object type.
Definition at line 1538 of file Type.cpp.
References castAs(), clang::ObjCCategoryDecl::getClassInterface(), clang::ObjCObjectType::getInterface(), clang::ASTContext::getObjCObjectType(), clang::DeclContext::getParentASTContext(), clang::ObjCObjectType::getSuperClassType(), clang::ObjCObjectType::getTypeArgs(), clang::ObjCCategoryDecl::getTypeParamList(), clang::QualType::isNull(), clang::ObjCObjectType::isUnspecialized(), and clang::ASTContext::ObjCBuiltinIdTy.
Referenced by clang::Sema::CheckMessageArgumentTypes(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), and clang::QualType::substObjCMemberType().
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 1768 of file Type.cpp.
References getAs(), and getPointeeType().
Referenced by adjustReturnValue(), DiagnoseReinterpretUpDownCast(), clang::ento::retaincountchecker::RetainCountChecker::errorKindToBugKind(), clang::SourceLocExpr::EvaluateInContext(), HandleDynamicCast(), isOSObjectPtr(), isSetOnReadPtrType(), clang::isUncountedPtr(), clang::QualType::mayBeDynamicClass(), clang::QualType::mayBeNotDynamicClass(), regionMatchesCXXRecordType(), and shouldTrackFirstArgument().
|
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 7354 of file Type.h.
References clang::ast_matchers::type.
Referenced by clang::CodeGen::CGHLSLRuntime::annotateHLSLResource(), and clang::Sema::DiagnoseAssignmentResult().
QualType Type::getPointeeType | ( | ) | const |
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
Definition at line 629 of file Type.cpp.
References getPointeeType().
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOMPArrayShapingExpr(), clang::Sema::ActOnOpenMPDependClause(), addAssociatedClassesAndNamespaces(), adjustCVQualifiersForCXXThisWithinLambda(), AlignOfType(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCXXThisExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildQualifiedType(), clang::Sema::BuildResolvedCallExpr(), BuildSimilarlyQualifiedPointerType(), clang::Sema::BuiltinRemovePointer(), clang::arcmt::trans::canApplyWeak(), CanThrow(), captureVariablyModifiedType(), clang::ento::StoreManager::castRegion(), castToBase(), clang::Sema::CheckAssignmentConstraints(), checkCastFunctionType(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckCXXThisCapture(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDistantExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckLiteralOperatorDeclaration(), checkMappableExpressionList(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckVirtualDtorCall(), ClassifyDiagnostic(), CollectVRQualifiers(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CreateBuiltinArraySubscriptExpr(), decomposeTypeForEH(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), dereference(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseCastOfObjCSEL(), diagnoseOpenCLTypes(), clang::Sema::DiagnoseSentinelCalls(), diagnoseStringPlusChar(), clang::Sema::DiscardMisalignedMemberAddress(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumptionCheck(), EmitAtomicCmpXchgForMSIntrin(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitISOVolatileLoad(), EmitISOVolatileStore(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), emitWritebackArg(), clang::ento::StoreManager::evalBaseToDerived(), clang::ento::ExprEngine::evalCall(), EvaluateBuiltinStrLen(), clang::Sema::FindCompositePointerType(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), getAArch64LS(), getAlignmentAndOffsetFromBinAddOrSub(), GetAlignOfType(), getBaseAlignmentAndOffsetFromPtr(), GetBaseType(), clang::QualType::getBaseTypeIdentifier(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallReturnType(), getCanonicalParamType(), getCoreType(), getCXXRecord(), clang::ASTContext::getDeclAlign(), clang::getDeclUsageType(), getDeepPointeeType(), clang::ento::CXXInstanceCall::getExtraInvalidatedValues(), getFuchsiaHandleSymbols(), clang::TypeName::getFullyQualifiedType(), clang::BlockExpr::getFunctionType(), clang::ASTContext::getInnerObjCOwnership(), clang::ento::StoreManager::getLValueElement(), clang::CodeGen::CodeGenModule::getNaturalPointeeTypeAlignment(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::OverloadCandidate::getNumParams(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCQualType(), clang::CXXMemberCallExpr::getObjectType(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getPointeeCXXRecordDecl(), clang::ento::SymbolicRegion::getPointeeStaticType(), getPointeeType(), getPrettyTypeName(), clang::CXXMemberCallExpr::getRecordDecl(), clang::interp::ByteCodeExprGen< Emitter >::getRecordTy(), getRecordType(), clang::ento::CXXInstanceCall::getRuntimeDefinition(), clang::ASTContext::getTargetNullPointerValue(), clang::CodeGen::CGCXXABI::getThisAddress(), clang::GetUnderlyingFunction(), getUuidAttrOfType(), getVAListElementType(), HandleBaseToDerivedCast(), clang::Sema::HandleFunctionTypeMismatch(), HandleMemberPointerAccess(), handleObjCOwnershipTypeAttr(), clang::Sema::handlerCanCatch(), hasNonTrivialConstructorCall(), InitCatchParam(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Sema::IsBlockPointerConversion(), isCallback(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::Sema::isInitListConstructor(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Expr::isNullPointerConstant(), clang::Sema::isObjCPointerConversion(), clang::Sema::isObjCWritebackConversion(), isOSObjectRelated(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), isPointerToConst(), isPointerToObject(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), IsTypeModifiable(), isValidOSObjectOutParameter(), isValidSubjectOfOSAttribute(), isValidSwiftContextType(), isValidSwiftErrorResultType(), isValidSwiftIndirectResultType(), isVoidPointer(), isVoidPointerToNonConst(), clang::AtomicExpr::isVolatile(), loadToBegin(), MakeBinaryAtomicValue(), makeTailCallIfSwiftAsync(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeVarDeclExceptionSpecs(), needsAmpersandOnTemplateArg(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformQualificationConversion(), PerformReturnAdjustment(), clang::Sema::PrepareScalarCast(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::ASTContext::removePtrSizeAddrSpace(), rewriteBuiltinFunctionDecl(), shouldSkipNotingLambdaConversionDecl(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), TryDeconstructFunctionLike(), clang::Sema::tryExprAsCall(), tryGetFunctionProtoType(), TryReinterpretCast(), TryStaticCast(), TryToFixInvalidVariablyModifiedType(), typeIsPostfix(), unwrapCastAwayConstnessLevel(), clang::ASTContext::UnwrapSimilarTypes(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::UndefOrNullArgVisitor::VisitNode(), and clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl().
Type::ScalarTypeKind Type::getScalarTypeKind | ( | ) | const |
Given that this is a scalar type, classify it.
Definition at line 2192 of file Type.cpp.
References isBitIntType(), isScalarType(), STK_BlockPointer, STK_Bool, STK_CPointer, STK_FixedPoint, STK_Floating, STK_FloatingComplex, STK_Integral, STK_IntegralComplex, STK_MemberPointer, and STK_ObjCObjectPointer.
Referenced by matchTypes(), clang::Sema::PrepareScalarCast(), and clang::Sema::ScalarTypeToBooleanCastKind().
QualType Type::getSveEltType | ( | const ASTContext & | Ctx | ) | const |
Returns the representative type for the element of an SVE builtin type.
This is used to represent fixed-length SVE vectors created with the 'arm_sve_vector_bits' type attribute as VectorType.
Definition at line 2385 of file Type.cpp.
References clang::ASTContext::BuiltinVectorTypeInfo::ElementType, clang::ASTContext::getBuiltinVectorTypeInfo(), clang::BuiltinType::getKind(), isVLSTBuiltinType(), and clang::ASTContext::UnsignedCharTy.
Referenced by clang::ASTContext::areCompatibleSveTypes(), clang::ASTContext::areLaxCompatibleSveTypes(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CreateBuiltinArraySubscriptExpr(), and isValidSizelessVectorForConditionalCondition().
|
inline |
Definition at line 1985 of file Type.h.
References TypeBits.
Referenced by addAssociatedClassesAndNamespaces(), BuildSimilarlyQualifiedPointerType(), captureVariablyModifiedType(), 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::MatrixType::classof(), clang::ConstantMatrixType::classof(), clang::DependentSizedMatrixType::classof(), clang::FunctionType::classof(), clang::FunctionNoProtoType::classof(), clang::FunctionProtoType::classof(), clang::UnresolvedUsingType::classof(), clang::UsingType::classof(), clang::TypedefType::classof(), clang::MacroQualifiedType::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::BTFTagAttributedType::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::BitIntType::classof(), clang::DependentBitIntType::classof(), computeCachedProperties(), clang::LinkageComputer::computeTypeLinkageInfo(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CreateParsedType(), clang::desugarForDiagnostic(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), getAsSugar(), clang::QualType::getBaseTypeIdentifier(), getCommonNonSugarTypeNode(), getCommonSugarTypeNode(), clang::Sema::getCopyElisionCandidate(), clang::ASTNodeKind::getFromNode(), getLocallyUnqualifiedSingleStepDesugaredType(), clang::TypeLoc::getTypeLocClass(), clang::UnqualTypeLoc::getTypeLocClass(), getUnqualifiedDesugaredType(), clang::ASTContext::getVariableArrayDecayedType(), clang::QualType::isCXX98PODType(), isLayoutCompatible(), isObjCReceiverType(), IsPossiblyOpaquelyQualifiedTypeInternal(), isSpecifierType(), IsStructurallyEquivalent(), MarkUsedTemplateParameters(), clang::Sema::MaybeBindToTemporary(), clang::ASTContext::mergeTypes(), clang::ASTContext::PrintStats(), clang::VectorType::Profile(), clang::ConstantMatrixType::Profile(), clang::RecursiveASTVisitor< CallGraph >::TraverseType(), typeIsPostfix(), UnwrapTypeForDebugInfo(), and clang::TypeVisitor< ASTNodeImporter, ExpectedType >::Visit().
const char * Type::getTypeClassName | ( | ) | const |
Definition at line 2974 of file Type.cpp.
References TypeBits.
Referenced by clang::TextNodeDumper::Visit(), clang::JSONNodeDumper::Visit(), and clang::ASTNodeImporter::VisitType().
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 543 of file Type.cpp.
References getTypeClass().
Referenced by castAs(), castAsArrayTypeUnsafe(), getArrayElementTypeNoTypeQual(), getAs(), getAsArrayTypeUnsafe(), getAsStructureType(), getAsUnionType(), clang::ASTContext::getTargetNullPointerValue(), clang::ASTContext::getTypeUnadjustedAlign(), clang::ASTContext::getUnqualifiedArrayType(), clang::ento::iterator::isIteratorType(), IsPreserveAIArrayBase(), isValidBPFPreserveEnumValueArg(), and isValidBPFPreserveTypeInfoArg().
|
inline |
Determine the visibility of this type.
Definition at line 2534 of file Type.h.
References getLinkageAndVisibility(), and clang::LinkageInfo::getVisibility().
bool Type::hasAttr | ( | attr::Kind | AK | ) | const |
Determine whether this type had the specified attribute applied to it (looking through top-level type sugar).
Definition at line 1800 of file Type.cpp.
References getAs().
Referenced by isObjCInertUnsafeUnretainedType(), IsPreserveAIArrayBase(), and clang::Expr::isUnusedResultAWarning().
bool Type::hasAutoForTrailingReturnType | ( | ) | const |
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 2154 of file Type.cpp.
References isFloatingType().
Referenced by clang::Sema::ActOnParenExpr(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckSizelessVectorCompareOperands(), clang::Sema::CheckVectorCompareOperands(), and clang::Sema::CheckVectorLogicalOperands().
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 1922 of file Type.cpp.
References isIntegerType().
Referenced by clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::Sema::CreateBuiltinUnaryOp(), clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getCorrespondingUnsignedType(), and clang::Sema::SemaBuiltinShuffleVector().
|
inline |
Whether this type can represent an objective pointer type for the purpose of GC'ability.
Definition at line 7343 of file Type.h.
References isObjCObjectPointerType().
|
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 7338 of file Type.h.
References isBlockPointerType(), isNullPtrType(), isObjCObjectPointerType(), isPointerType(), and isReferenceType().
Referenced by Evaluate(), EvaluateBuiltinStrLen(), EvaluatePointer(), ignorePointerCastsAndParens(), is32Or64BitBasicType(), and isValidSwiftContextType().
bool Type::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.
Definition at line 2082 of file Type.cpp.
References isSignedIntegerOrEnumerationType().
Referenced by castValueToType(), emitOMPAtomicCompareExpr(), clang::ASTContext::getCorrespondingSignedType(), clang::CodeGen::ABIArgInfo::getExtend(), and clang::analyze_format_string::ArgType::matchesType().
bool Type::hasSizedVLAType | ( | ) | const |
Whether this type involves a variable-length array type with a definite size.
Definition at line 4478 of file Type.cpp.
References getAsArrayTypeUnsafe(), and isVariablyModifiedType().
Referenced by clang::QualType::isCanonicalAsParam().
bool Type::hasUnnamedOrLocalType | ( | ) | const |
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 2132 of file Type.cpp.
References isUnsignedIntegerOrEnumerationType().
Referenced by checkOpenMPLoop(), clang::ASTContext::getCorrespondingUnsignedType(), and isLegalTypeForHLSLSV_DispatchThreadID().
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 2234 of file Type.cpp.
Referenced by clang::Sema::AddInitializerToDecl(), and EvaluateUnaryTypeTrait().
bool Type::isAlignValT | ( | ) | const |
Definition at line 2800 of file Type.cpp.
References clang::IdentifierInfo::isStr().
Referenced by clang::Sema::AddAllocAlignAttr(), getUsualDeleteParams(), and clang::FunctionDecl::isReplaceableGlobalAllocationFunction().
bool Type::isAnyCharacterType | ( | ) | const |
Determine whether this type is any of the built-in character types.
Definition at line 2021 of file Type.cpp.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::CheckCompatibleReinterpretCast(), diagnoseStringPlusChar(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::UserDefinedLiteral::getLiteralOperatorKind(), and clang::Sema::IsIntegralPromotion().
|
inline |
Definition at line 6992 of file Type.h.
Referenced by clang::Sema::CreateBuiltinUnaryOp(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitComplexToScalarConversion(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), Evaluate(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), EvaluateUnaryTypeTrait(), FindDesignatorMismatch(), findSubobject(), getAbsoluteValueKind(), clang::ento::NonLoc::isCompoundType(), isLiteralType(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ento::ExprEngine::VisitUnaryOperator().
|
inline |
Definition at line 6898 of file Type.h.
References isObjCObjectPointerType(), and isPointerType().
Referenced by clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::AddAlignValueAttr(), AreTypesCompatible(), AuditedType(), clang::tooling::buildAccess(), clang::Sema::BuildQualifiedType(), clang::Sema::BuiltinRemovePointer(), CastsAwayConstness(), clang::Sema::CheckAdditionOperands(), clang::Sema::CheckCompareOperands(), CheckLValueConstantExpression(), checkMapConflicts(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::Sema::CheckSubtractionOperands(), computeConditionalNullability(), DiagnoseBadFunctionCast(), DiagnoseCastQual(), diagnoseStringPlusChar(), clang::ento::SMTConv::doTypeConversion(), emitOutlinedFunctionPrologue(), EvaluateUnaryTypeTrait(), clang::Sema::FindCompositePointerType(), clang::ento::SMTConv::fromCast(), clang::ento::SMTConv::getBinExpr(), getFuchsiaHandleSymbols(), getNonNullAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getObjCGCQualType(), clang::CXXMemberCallExpr::getRecordDecl(), getVariableCategoryFromDecl(), clang::ento::SMTConv::getZeroExpr(), isCallback(), clang::ento::isDereferencableType(), clang::ento::Loc::isLocType(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), isPointerToConst(), clang::CodeGen::CodeGenTypes::isPointerZeroInitializable(), clang::ASTContext::isSentinelNullExpr(), clang::Sema::isValidPointerAttrType(), TryReinterpretCast(), TypeIsInnerPointer(), clang::FunctionCallFilterCCC::ValidateCandidate(), and clang::ento::UndefOrNullArgVisitor::VisitNode().
bool Type::isArithmeticType | ( | ) | const |
Definition at line 2176 of file Type.cpp.
References isBitIntType().
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DiagnosePropertyAccessorMismatch(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), EvaluateUnaryTypeTrait(), isFundamentalType(), and clang::Sema::UsualArithmeticConversions().
|
inline |
Definition at line 6960 of file Type.h.
Referenced by clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPDeclareReductionType(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::BuildAtomicType(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorType(), clang::Sema::BuiltinDecay(), canDecayToPointerType(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConversionDeclarator(), checkForArray(), clang::Sema::CheckFunctionReturnType(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), ClassifyTemporary(), clang::Sema::ConstantFoldAttrArgs(), clang::CXXBindTemporaryExpr::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), DecodeTypeFromStr(), clang::Sema::deduceOpenCLAddressSpace(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DiagnoseAssignmentResult(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::emitArrayDestroy(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), emitOMPArraySectionBase(), clang::CodeGen::CodeGenFunction::EmitOMPCopy(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPUseDeviceAddrClause(), emitPrivatesInit(), clang::CodeGen::CGOpenMPRuntime::emitSingleReductionCombiner(), Evaluate(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), EvaluateInPlace(), EvaluateUnaryTypeTrait(), FastEvaluateAsRValue(), clang::Sema::FinalizeVarWithDestructor(), FindDesignatorMismatch(), findSubobject(), clang::ASTContext::getAdjustedParameterType(), clang::QualType::getBaseTypeIdentifier(), clang::ASTContext::GetBuiltinType(), getCoreType(), clang::ASTContext::getDecayedType(), getDesignatedType(), clang::ASTContext::getExceptionObjectType(), clang::ASTContext::getInnerObjCOwnership(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), getUuidAttrOfType(), handleLValueToRValueConversion(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ASTNodeImporter::ImportDeclContext(), clang::ento::NonLoc::isCompoundType(), isCompoundType(), clang::Expr::isConstantInitializer(), isDesignatorAtObjectEnd(), clang::arcmt::trans::MigrationContext::isGCOwnedNonObjC(), clang::Expr::isUnusedResultAWarning(), isZeroSized(), clang::Sema::MergeVarDeclTypes(), needsAmpersandOnTemplateArg(), pushTemporaryCleanup(), setObjCGCLValueClass(), clang::interp::ByteCodeExprGen< Emitter >::visitInitializer(), clang::ento::ExprEngine::VisitInitListExpr(), visitLocalsRetainedByInitializer(), and clang::ento::ExprEngine::VisitMemberExpr().
|
inline |
Definition at line 7035 of file Type.h.
Referenced by clang::Sema::BuildAtomicExpr(), clang::Sema::BuildAtomicType(), clang::Sema::BuildQualifiedType(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeGen::CodeGenFunction::EmitAtomicInit(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), Evaluate(), EvaluateAtomic(), EvaluateInPlace(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), and clang::ento::isPrimitiveType().
|
inline |
Definition at line 7204 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::CheckConditionalOperands(), clang::Sema::checkTypeSupport(), and clang::Sema::CheckVectorOperands().
|
inline |
Definition at line 7118 of file Type.h.
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnMSAsmStmt(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildAtomicType(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildVectorType(), clang::Sema::BuiltinChangeSignedness(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckEnumUnderlyingType(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkTypeSupport(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::ASTContext::getExtVectorType(), getIntegerWidthAndSignedness(), getScalarTypeKind(), clang::ASTContext::getVectorType(), isArithmeticType(), isIntegerType(), isIntegralOrEnumerationType(), isIntegralOrUnscopedEnumerationType(), isIntegralType(), isRealType(), and isScalarType().
bool Type::isBlockCompatibleObjCPointerType | ( | ASTContext & | ctx | ) | const |
Definition at line 4351 of file Type.cpp.
References clang::ASTContext::getNSCopyingName(), and clang::ASTContext::getNSObjectName().
Referenced by clang::Sema::CheckAssignmentConstraints(), and clang::Sema::CheckCompareOperands().
|
inline |
Definition at line 6902 of file Type.h.
Referenced by clang::Sema::ActOnObjCForCollectionStmt(), AuditedType(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildArrayType(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCBridgedCast(), CanThrow(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), clang::Sema::CheckAssignmentConstraints(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::CheckObjCPropertyAttributes(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSubscriptingKind(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::ConvertArgumentsForCall(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), clang::Sema::DefaultVariadicArgumentPromotion(), DiagnoseBadFunctionCast(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), FormatFunctionParameter(), clang::ento::SMTConv::fromCast(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), getBlockFieldFlagsForObjCObjectPointer(), clang::ASTContext::getByrefLifetime(), clang::Decl::getFunctionType(), GetGCAttrTypeForType(), getNonNullAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::ObjCPropertyDecl::getSetterKind(), clang::ento::CallEventManager::getSimpleCall(), clang::Sema::getVariadicCallType(), clang::ento::SMTConv::getZeroExpr(), hasPointerRepresentation(), is32Or64BitBasicType(), isBlockPointer(), isCallback(), isFunctionLike(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), clang::ento::Loc::isLocType(), isObjCARCBridgableType(), isObjCRetainableType(), clang::Sema::IsPointerConversion(), clang::CodeGen::CodeGenTypes::isPointerZeroInitializable(), clang::Sema::isValidPointerAttrType(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::maybeExtendBlockObject(), clang::ASTContext::mergeTypes(), clang::Sema::PerformImplicitConversion(), PropertyMemoryAttribute(), rewriteToObjCProperty(), shouldEmitSeparateBlockRetain(), TryReinterpretCast(), TryStaticCast(), and TypeIsInnerPointer().
|
inline |
Definition at line 7307 of file Type.h.
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::ento::SMTConstraintManager::assumeSym(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorType(), clang::Sema::BuiltinChangeSignedness(), clang::Sema::CheckEnumConstant(), checkIntToPointerCast(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), clang::interp::Context::classify(), ConvertAPValueToString(), create_OSAtomicCompareAndSwap(), clang::Sema::CreateOverloadedBinOp(), DiagnoseBadFunctionCast(), clang::Sema::DiagnoseStaticAssertDetails(), ExprLooksBoolean(), clang::ento::SMTConv::fromCast(), getIntegerWidthAndSignedness(), clang::ASTContext::getIntWidth(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), HandleIntToIntCast(), hasBooleanRepresentation(), isBooleanType(), clang::Sema::IsIntegralPromotion(), isIntOrBool(), clang::Expr::isKnownToHaveBooleanValue(), clang::MatrixType::isValidElementType(), clang::ento::SMTConv::mkSort(), clang::Sema::PerformImplicitConversion(), clang::Sema::prepareVectorSplat(), rewriteToNumericBoxedExpression(), TryReinterpretCast(), TryStaticCast(), and clang::Sema::VerifyBitField().
|
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 6980 of file Type.h.
Referenced by clang::Sema::BuildObjCBoxedExpr(), clang::Sema::BuildVectorType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getVectorType(), clang::ento::isPrimitiveType(), and isTypeSubstitutable().
|
inline |
Determines if this type would be canonical if it had no further qualification.
Definition at line 2011 of file Type.h.
References clang::ExtQualsTypeCommonBase::QualType.
Referenced by areCompatMatrixTypes(), areCompatVectorTypes(), clang::TypePropertyCache< Private >::ensure(), clang::Sema::getCopyElisionCandidate(), clang::TemplateTypeParmType::getDecl(), clang::TemplateTypeParmType::getIdentifier(), clang::ASTContext::getMemberPointerType(), clang::LinkageComputer::getTypeLinkageAndVisibility(), clang::QualType::isCanonical(), IsPossiblyOpaquelyQualifiedTypeInternal(), clang::FunctionProtoType::Profile(), and clang::ASTNodeImporter::VisitTemplateSpecializationType().
bool Type::isCARCBridgableType | ( | ) | const |
Determine whether the given type T is a "bridgeable" C type.
Definition at line 4455 of file Type.cpp.
References isRecordType(), and isVoidType().
Referenced by clang::Sema::BuildObjCBridgedCast().
bool Type::isChar16Type | ( | ) | const |
Definition at line 2007 of file Type.cpp.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), and clang::Sema::BuiltinChangeSignedness().
bool Type::isChar32Type | ( | ) | const |
Definition at line 2013 of file Type.cpp.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), and clang::Sema::BuiltinChangeSignedness().
bool Type::isChar8Type | ( | ) | const |
Definition at line 2001 of file Type.cpp.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), isOneByteCharacterType(), and IsStringInit().
bool Type::isCharType | ( | ) | const |
Definition at line 1985 of file Type.cpp.
Referenced by clang::Sema::CheckLoopHintExpr(), ConvertAPValueToString(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::Sema::IsIntegralPromotion(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isOneByteCharacterType(), and IsStringInit().
bool Type::isClassType | ( | ) | const |
Definition at line 561 of file Type.cpp.
Referenced by EvaluateUnaryTypeTrait().
|
inline |
Definition at line 7095 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::CheckCompareOperands(), diagnoseOpenCLTypes(), and isOpenCLSpecificType().
bool Type::isComplexIntegerType | ( | ) | const |
Definition at line 611 of file Type.cpp.
References getAsComplexIntegerType().
Referenced by clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CreateBuiltinUnaryOp(), DiagnoseBadFunctionCast(), and clang::Sema::UsualArithmeticConversions().
bool Type::isComplexType | ( | ) | const |
isComplexType() does not include complex integers (a GCC extension).
isComplexIntegerType() can be used to test for complex integers.
Definition at line 605 of file Type.cpp.
Referenced by clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CreateBuiltinUnaryOp(), DiagnoseBadFunctionCast(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryConversions().
|
inline |
Tests whether the type is categorized as a compound type.
Definition at line 6868 of file Type.h.
References isArrayType(), isEnumeralType(), isFunctionType(), isMemberPointerType(), isPointerType(), isRecordType(), isReferenceType(), and isUnionType().
Referenced by EvaluateUnaryTypeTrait().
|
inline |
Definition at line 6964 of file Type.h.
Referenced by clang::Sema::ActOnOMPArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitCXXDeleteExpr(), EquivalentArrayTypes(), hasCompatibleArrayTypes(), and isQualificationConversionStep().
|
inline |
Definition at line 7014 of file Type.h.
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckSubtractionOperands(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), EmitLoadOfMatrixLValue(), and clang::CodeGen::CodeGenFunction::EmitStoreOfScalar().
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 2248 of file Type.cpp.
References isDependentType(), and isIncompleteType().
Referenced by clang::Sema::BuildArrayType(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), getAlignmentAndOffsetFromBinAddOrSub(), clang::ASTContext::getConstantArrayType(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), HandleSizeof(), clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().
bool Type::isCUDADeviceBuiltinSurfaceType | ( | ) | const |
Check if the type is the CUDA device builtin surface type.
Check if the specified type is the CUDA device builtin surface type.
Definition at line 4465 of file Type.cpp.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenModule::EmitGlobal(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and clang::Sema::IdentifyCUDATarget().
bool Type::isCUDADeviceBuiltinTextureType | ( | ) | const |
Check if the type is the CUDA device builtin texture type.
Check if the specified type is the CUDA device builtin texture type.
Definition at line 4472 of file Type.cpp.
Referenced by clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenModule::EmitGlobal(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and clang::Sema::IdentifyCUDATarget().
|
inline |
|
inline |
Definition at line 6976 of file Type.h.
Referenced by EquivalentArrayTypes().
|
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 2308 of file Type.h.
References getDependence().
Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddAlignValueAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddInitializerToDecl(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::BuildArrayType(), clang::Sema::BuildArrayTypeTrait(), clang::Sema::BuildAsTypeExpr(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildCaptureField(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::buildCoroutinePromise(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXUuidof(), clang::Sema::BuildExtVectorType(), clang::Sema::buildLambdaScope(), clang::Sema::BuildMatrixType(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildUnaryTransformType(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVectorType(), canCaptureVariableByCopy(), clang::Sema::canFullyTypeCheckRedeclaration(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckAllocatedType(), clang::Sema::checkArrayElementAlignment(), clang::Sema::CheckBaseSpecifier(), checkBuiltinTemplateIdType(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompleteDecompositionDeclaration(), CheckConstexprFunctionBody(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckEnumUnderlyingType(), CheckLiteralType(), clang::Sema::CheckNonDependentConversions(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckOMPThreadPrivateDecl(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckQualifiedMemberReference(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkTypeSupport(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::computeDeclContext(), clang::computeDependence(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::CXXInheritedCtorInitExpr::CXXInheritedCtorInitExpr(), clang::Sema::DeduceAutoType(), clang::Sema::deduceClosureReturnType(), clang::Sema::DefaultLvalueConversion(), clang::DependentCoawaitExpr::DependentCoawaitExpr(), clang::Sema::DiagnoseUnusedNestedTypedefs(), clang::Sema::DiscardMisalignedMemberAddress(), EvaluateArrayTypeTrait(), EvaluateBinaryTypeTrait(), EvaluateUnaryTypeTrait(), EvaluateVarDecl(), clang::Sema::FillInlineAsmIdentifierInfo(), findTemplateParameter(), FormatFunctionParameter(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallReturnType(), clang::ASTContext::getCanonicalTemplateSpecializationType(), clang::ASTContext::getConstantArrayType(), clang::Sema::getCopyElisionCandidate(), clang::ento::CallEvent::getDeclaredResultType(), clang::CXXDeleteExpr::getDestroyedType(), clang::Sema::getDestructorTypeForDecltype(), clang::ASTContext::getExtVectorType(), getFieldsFromClassHierarchy(), clang::ASTContext::getTypeSizeInCharsIfKnown(), clang::ASTContext::getUnaryTransformType(), HandleSizeof(), clang::VarDecl::hasDependentAlignment(), clang::CoroutineBodyStmt::hasDependentPromiseType(), hasRepeatedBaseClass(), clang::Sema::isAcceptableNestedNameSpecifier(), IsAcceptableNonMemberOperatorCandidate(), isConstantSizeType(), clang::QualType::isCXX11PODType(), clang::DeducedType::isDeduced(), clang::DeclarationName::isDependentName(), isDependentOrGNUAutoType(), IsDerivedFromInclusive(), clang::Sema::isIncompatibleTypedef(), isIncompleteType(), isLiteralType(), isObjCReceiverType(), isOverflowingIntegerType(), isOverloadableType(), clang::ASTContext::isPromotableIntegerType(), isStandardLayoutType(), clang::UnaryTransformType::isSugared(), clang::TemplateSpecializationType::isSugared(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::MatrixType::isValidElementType(), isValidSubjectOfCFAttribute(), isValidSubjectOfNSAttribute(), isValidSubjectOfNSReturnsRetainedAttribute(), isValidSubjectOfOSAttribute(), isValidSwiftContextType(), isValidSwiftErrorResultType(), isValidSwiftIndirectResultType(), clang::Sema::isValidVarArgType(), clang::Sema::LookupInlineAsmIdentifier(), clang::Sema::LookupInlineAsmVarDeclField(), MarkUsedTemplateParameters(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::Sema::MergeVarDeclTypes(), clang::AutoType::Profile(), clang::DeducedTemplateSpecializationType::Profile(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildQualifiedType(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::Sema::RequireLiteralType(), clang::Sema::RequireStructuralType(), clang::Sema::SemaConvertVectorExpr(), clang::CXXRecordDecl::setBases(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::TransformNestedNameSpecifierLoc(), TryToFixInvalidVariablyModifiedType(), clang::TypoExpr::TypoExpr(), VariableCanNeverBeAConstantExpression(), clang::Sema::VerifyBitField(), clang::TextNodeDumper::Visit(), clang::JSONNodeDumper::Visit(), clang::ASTNodeImporter::VisitDeducedTemplateSpecializationType(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
bool Type::isElaboratedTypeSpecifier | ( | ) | const |
Determine wither this type is a C++ elaborated-type-specifier.
Definition at line 2959 of file Type.cpp.
References clang::TypeWithKeyword::KeywordIsTagTypeKind().
Referenced by clang::Sema::CheckFriendTypeDecl().
|
inline |
Definition at line 6988 of file Type.h.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::BuiltinChangeSignedness(), clang::Sema::BuiltinEnumUnderlyingType(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), checkIntToPointerCast(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckVectorConditionalTypes(), DiagnoseBadFunctionCast(), EvaluateUnaryTypeTrait(), clang::QualType::getBaseTypeIdentifier(), clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getCorrespondingUnsignedType(), getNextLargerIntegralType(), HasEnumType(), is32Or64BitBasicType(), IsAcceptableNonMemberOperatorCandidate(), isCompoundType(), isFundamentalType(), clang::Sema::IsIntegralPromotion(), isNullPointerConstantForConversion(), isOverloadableType(), clang::ento::isPrimitiveType(), clang::ASTContext::isPromotableBitField(), isRepresentableIntegerValue(), clang::MatrixType::isValidElementType(), isValidSizelessVectorForConditionalCondition(), isValidVectorForConditionalCondition(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::TransformNestedNameSpecifierLoc(), and TryStaticCast().
|
inline |
Definition at line 7091 of file Type.h.
References isSpecificBuiltinType().
Referenced by diagnoseOpenCLTypes(), and isOpenCLSpecificType().
|
inline |
Definition at line 7004 of file Type.h.
References isExtVectorType().
Referenced by clang::Sema::CheckVectorOperands(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenFunction::EmitFromMemory(), and clang::Sema::GetSignedVectorType().
|
inline |
Definition at line 7000 of file Type.h.
Referenced by clang::Sema::areLaxCompatibleVectorTypes(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorOperands(), clang::Sema::CreateBuiltinUnaryOp(), EvaluateUnaryTypeTrait(), isExtVectorBoolType(), isValidVectorForConditionalCondition(), clang::Sema::prepareVectorSplat(), and TryReinterpretCast().
|
inline |
Return true if this is a fixed point or integer type.
Definition at line 7244 of file Type.h.
References isFixedPointType(), and isIntegerType().
Referenced by clang::Sema::CheckShiftOperands().
|
inline |
Return true if this is a fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169.
Definition at line 7236 of file Type.h.
Referenced by clang::Sema::CreateBuiltinBinOp(), DiagnoseBadFunctionCast(), Evaluate(), EvaluateAsFixedPoint(), EvaluateComparisonBinaryOperator(), EvaluateFixedPoint(), EvaluateFixedPointOrInteger(), clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getCorrespondingUnsignedType(), clang::ASTContext::getFixedPointIBits(), clang::ASTContext::getFixedPointMax(), clang::ASTContext::getFixedPointMin(), clang::ASTContext::getFixedPointScale(), clang::ASTContext::getFixedPointSemantics(), isFixedPointOrIntegerType(), isUnsaturatedFixedPointType(), isUnsignedFixedPointType(), and clang::Sema::UsualArithmeticConversions().
|
inline |
Definition at line 7208 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::checkTypeSupport().
|
inline |
Definition at line 7200 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::checkTypeSupport().
bool Type::isFloatingType | ( | ) | const |
Definition at line 2145 of file Type.cpp.
Referenced by clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAtomicExpr(), clang::Sema::CheckLogicalOperands(), clang::interp::Context::classify(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), EvaluateBuiltinConstantP(), EvaluateUnaryTypeTrait(), getAArch64PBV(), clang::UserDefinedLiteral::getLiteralOperatorKind(), handleVectorVectorBinOp(), hasFloatingRepresentation(), clang::Sema::prepareVectorSplat(), rewriteToNumberLiteral(), clang::Sema::UsualUnaryConversions(), clang::interp::ByteCodeExprGen< Emitter >::VisitBinaryOperator(), clang::interp::ByteCodeExprGen< Emitter >::VisitCompoundAssignOperator(), and clang::interp::ByteCodeExprGen< Emitter >::VisitFloatCompoundAssignOperator().
|
inline |
Whether this type comes from an AST file.
Definition at line 1988 of file Type.h.
References TypeBits.
Referenced by clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 2148 of file Type.h.
Referenced by checkCastFunctionType(), and clang::Sema::checkOpenMPDeclareVariantFunction().
|
inline |
Definition at line 6928 of file Type.h.
Referenced by CanThrow(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), DiagnoseCallingConvCast(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::Decl::getFunctionType(), isCallback(), isFunctionLike(), rewriteToObjCProperty(), TryConstCast(), TryReinterpretCast(), and TypeIsInnerPointer().
|
inline |
Definition at line 2149 of file Type.h.
Referenced by clang::Sema::checkOpenMPDeclareVariantFunction(), clang::Sema::CreateBuiltin(), FindPossiblePrototype(), clang::FunctionType::getFastTypeQuals(), clang::MemberPointerType::isMemberDataPointer(), clang::MemberPointerType::isMemberFunctionPointer(), and clang::Sema::MergeVarDeclExceptionSpecs().
|
inline |
Definition at line 6935 of file Type.h.
Referenced by checkCastFunctionType(), diagnoseOpenCLTypes(), and clang::Decl::getFunctionType().
|
inline |
Definition at line 6890 of file Type.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPDeclareReductionType(), clang::Sema::BuildArrayType(), clang::Sema::BuildAtomicType(), clang::Sema::BuildBlockPointerType(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildPointerType(), clang::Sema::BuildReferenceType(), clang::Sema::BuiltinChangeCVRQualifiers(), clang::Sema::BuiltinDecay(), clang::Sema::CallExprUnaryConversions(), canDecayToPointerType(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAllocatedType(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionVariable(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckFunctionReturnType(), clang::Sema::CheckMain(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::checkOpenMPDeclareVariantFunction(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), ClassifyBinaryOp(), clang::Sema::CompareReferenceRelationship(), clang::Sema::ConstantFoldAttrArgs(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DefaultLvalueConversion(), determineEndOffset(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), Evaluate(), EvaluateBinaryTypeTrait(), EvaluateLValue(), EvaluateUnaryTypeTrait(), clang::Sema::FillInlineAsmIdentifierInfo(), clang::ASTContext::getAdjustedParameterType(), clang::ASTContext::getBlockPointerType(), clang::ASTContext::getDecayedType(), clang::ASTContext::getDeclAlign(), clang::ASTContext::getExceptionObjectType(), clang::CodeGen::CodeGenTypes::getTargetAddressSpace(), HandleOperatorNewCall(), HandleSizeof(), clang::Sema::IgnoredValueConversions(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isCompoundType(), clang::Declarator::isDeclarationOfFunction(), isIncompleteOrObjectType(), IsModifiable(), isObjectType(), clang::Sema::IsPointerConversion(), clang::ento::isPrimitiveType(), clang::Sema::LookupInlineAsmIdentifier(), maybeSynthesizeBlockSignature(), clang::ASTContext::mergeObjCGCQualifiers(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildQualifiedType(), clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate(), TryStaticCast(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
|
inline |
Tests whether the type is categorized as a fundamental type.
Definition at line 6857 of file Type.h.
References isArithmeticType(), isEnumeralType(), isNullPtrType(), and isVoidType().
Referenced by EvaluateUnaryTypeTrait().
|
inline |
Definition at line 7195 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::BuildFunctionType(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckFunctionReturnType(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DefaultLvalueConversion(), diagnoseOpenCLTypes(), clang::Sema::PerformImplicitConversion(), and clang::Sema::UsualUnaryConversions().
|
inline |
Definition at line 7212 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::checkTypeSupport().
|
inline |
Definition at line 7107 of file Type.h.
Referenced by clang::Sema::BuildArrayType(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), and isOpenCLSpecificType().
|
inline |
Definition at line 6968 of file Type.h.
Referenced by clang::Sema::ActOnUninitializedDecl(), clang::Sema::BuildArrayType(), clang::computeDependence(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), EvaluateBinaryTypeTrait(), EvaluateUnaryTypeTrait(), clang::Sema::getCompletedType(), clang::APValue::LValueBase::getType(), hasCompatibleArrayTypes(), isDesignatorAtObjectEnd(), isIncompleteOrZeroLengthArrayType(), isQualificationConversionStep(), clang::ASTContext::isSameEntity(), IsVariableSizedType(), clang::Sema::MergeVarDeclTypes(), and setUsedBits().
|
inline |
Return true if this is an incomplete or object type, in other words, not a function type.
Definition at line 2057 of file Type.h.
References isFunctionType().
Referenced by clang::Sema::BuildQualifiedType(), clang::Sema::IsPointerConversion(), and TryStaticCast().
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.
Definition at line 2258 of file Type.cpp.
References getAsCXXRecordDecl(), clang::Decl::getASTContext(), clang::TargetInfo::getCXXABI(), clang::CXXRecordDecl::getMostRecentNonInjectedDecl(), clang::ASTContext::getTargetInfo(), clang::Decl::hasAttr(), clang::ObjCInterfaceDecl::hasDefinition(), clang::EnumDecl::isComplete(), clang::TagDecl::isCompleteDefinition(), isDependentType(), clang::TargetCXXABI::isMicrosoft(), and isVoidType().
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnOMPArrayShapingExpr(), clang::Sema::BuildArrayType(), clang::Sema::BuildCaptureField(), clang::Sema::BuiltinEnumUnderlyingType(), calculateOffset(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::checkArrayElementAlignment(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompareOperands(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckSubscriptingKind(), determineEndOffset(), DiagnoseForRangeVariableCopies(), clang::Sema::DiscardMisalignedMemberAddress(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), EvaluateComparisonBinaryOperator(), EvaluateUnaryTypeTrait(), clang::CodeGen::CodeGenTBAA::getAccessInfo(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getDeclAlign(), getFieldsFromClassHierarchy(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::ento::MemRegionManager::getStaticSize(), clang::ASTContext::getTypeAlignIfKnown(), clang::ASTContext::getTypeSizeInCharsIfKnown(), HandleOperatorNewCall(), isConstantSizeType(), clang::QualType::isCXX11PODType(), isEnableIf(), clang::CodeGen::CodeGenTypes::isFuncParamTypeConvertible(), isLiteralType(), isOnePastTheEndOfCompleteObject(), isStandardLayoutType(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTriviallyRelocatableType(), clang::Sema::isValidVarArgType(), isZeroSized(), matchTypes(), clang::CodeGen::CGCXXABI::mayNeedDestruction(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().
|
inline |
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).
Definition at line 2316 of file Type.h.
References getDependence().
Referenced by clang::Sema::ActOnOpenMPCopyinClause(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::CheckTemplateArgument(), computeCachedProperties(), clang::computeDependence(), clang::LinkageComputer::computeTypeLinkageInfo(), getCommonNonSugarTypeNode(), clang::Sema::HandleFunctionTypeMismatch(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::DeclarationNameInfo::isInstantiationDependent(), NeedsInstantiationAsFunctionType(), SubstDefaultTemplateArgument(), clang::Sema::SubstType(), clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
isIntegerType() does not include complex integers (a GCC extension).
isComplexIntegerType() can be used to test for complex integers.
Definition at line 7223 of file Type.h.
References isBitIntType(), clang::IsEnumDeclComplete(), and clang::IsEnumDeclScoped().
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnOpenMPCanonicalLoop(), clang::Sema::ActOnSEHExceptBlock(), clang::ASTContext::areLaxCompatibleSveTypes(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCDictionaryLiteral(), clang::Sema::BuildVectorType(), clang::Sema::BuiltinChangeSignedness(), castValueToType(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::checkTypeSupport(), clang::Sema::CheckVectorOperands(), create_dispatch_once(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadFunctionCast(), diagnoseStringPlusChar(), clang::Sema::DiscardMisalignedMemberAddress(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), EvaluateFixedPointOrInteger(), getAArch64PBV(), clang::ASTContext::getFixedPointSemantics(), getIntegerWidthAndSignedness(), clang::UserDefinedLiteral::getLiteralOperatorKind(), getUsualDeleteParams(), handleVectorVectorBinOp(), hasIntegerRepresentation(), isAcceptableMethodMismatch(), isFixedPointOrIntegerType(), clang::Sema::IsIntegralPromotion(), isIntOrBool(), isKnownToHaveUnsignedValue(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isNullPointerConstantForConversion(), clang::InitListExpr::isStringLiteralInit(), mergeEnumWithInteger(), clang::Sema::PerformImplicitConversion(), PromotionIsPotentiallyEligibleForImplicitIntegerConversionCheck(), and clang::interp::ByteCodeExprGen< Emitter >::VisitPointerArithBinOp().
|
inline |
Determine whether this type is an integral or enumeration type.
Definition at line 7294 of file Type.h.
References isBitIntType(), and clang::IsEnumDeclComplete().
Referenced by clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::AddInitializerToDecl(), clang::ento::RangedConstraintManager::assumeSymUnsupported(), clang::ento::RangeSet::Factory::castTo(), clang::Sema::CheckCaseExpression(), clang::Sema::CheckConvertedConstantExpression(), CheckICE(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckSubscriptingKind(), clang::Sema::CheckTemplateArgument(), conjureOffsetSymbolOnLocation(), DecodeTypeFromStr(), clang::ento::SMTConv::doTypeConversion(), Evaluate(), EvaluateAsInt(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), EvaluateIntegerOrLValue(), clang::Sema::FinalizeDeclaration(), findCompleteObject(), clang::ento::SMTConv::fromCast(), getAbsoluteValueKind(), clang::ento::BasicValueFactory::getAPSIntType(), getBuiltinAlignArguments(), clang::getComparisonCategoryForBuiltinCmp(), clang::CodeGen::ABIArgInfo::getExtend(), clang::CodeGen::ABIArgInfo::getSignExtend(), clang::ConstantExpr::getStorageKind(), clang::ento::ProgramState::getSValAsScalarOrLoc(), clang::ento::SMTConv::getZeroExpr(), clang::CodeGen::ABIArgInfo::getZeroExtend(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ObjCSubscriptRefExpr::isArraySubscriptRefExpr(), clang::Expr::isKnownToHaveBooleanValue(), clang::Sema::isLaxVectorConversion(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), clang::Sema::ICEConvertDiagnoser::match(), clang::Sema::prepareVectorSplat(), RecoverCastedSymbol(), TryReinterpretCast(), TryStaticCast(), and clang::Sema::VerifyBitField().
bool Type::isIntegralOrUnscopedEnumerationType | ( | ) | const |
Determine whether this type is an integral or unscoped enumeration type.
Definition at line 1967 of file Type.cpp.
References isBitIntType(), and isUnscopedEnumerationType().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CreateOverloadedBinOp(), diagnoseStringPlusInt(), EvaluateCPlusPlus11IntegralConstantExpr(), getDependentArraySubscriptType(), clang::StandardConversionSequence::getNarrowingKind(), clang::Sema::ICEConvertDiagnoser::match(), and clang::Sema::UsualUnaryConversions().
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.
Ctx | The context in which this type occurs. |
Definition at line 1954 of file Type.cpp.
References clang::ASTContext::getLangOpts(), and isBitIntType().
Referenced by clang::Sema::AddAllocAlignAttr(), argTypeIsABIEquivalent(), checkBuiltinTemplateIdType(), checkIntToPointerCast(), clang::Sema::CheckObjCConversion(), clang::Sema::CheckVectorCast(), create_OSAtomicCompareAndSwap(), DiagnoseBinOpPrecedence(), EvaluateUnaryTypeTrait(), clang::StandardConversionSequence::getNarrowingKind(), getNextLargerIntegralType(), clang::Expr::IgnoreParenNoopCasts(), clang::Sema::IsIntegralPromotion(), isRepresentableIntegerValue(), isValidSizelessVectorForConditionalCondition(), isValidVectorForConditionalCondition(), TryReinterpretCast(), and TryStaticCast().
bool Type::isInterfaceType | ( | ) | const |
Definition at line 579 of file Type.cpp.
Referenced by EvaluateUnaryTypeTrait().
bool Type::isLinkageValid | ( | ) | const |
True if the computed linkage is valid.
Used for consistency checking. Should always return true.
Definition at line 4159 of file Type.cpp.
References clang::LinkageComputer::computeTypeLinkageInfo(), getCanonicalTypeInternal(), clang::LinkageInfo::getLinkage(), and TypeBits.
Referenced by clang::TagDecl::setTypedefNameForAnonDecl().
bool Type::isLiteralType | ( | const ASTContext & | Ctx | ) | const |
Return true if this is a literal type (C++11 [basic.types]p10)
Definition at line 2622 of file Type.cpp.
References getAs(), getBaseElementTypeUnsafe(), getCanonicalTypeInternal(), clang::ASTContext::getLangOpts(), isAnyComplexType(), isDependentType(), isIncompleteType(), isReferenceType(), isScalarType(), isVariableArrayType(), isVectorType(), and isVoidType().
Referenced by clang::Sema::AddInitializerToDecl(), CheckLiteralType(), EvaluateUnaryTypeTrait(), findCompleteObject(), clang::MaterializeTemporaryExpr::isUsableInConstantExpressions(), clang::Sema::RequireLiteralType(), and clang::CXXRecordDecl::setBases().
|
inline |
Definition at line 6910 of file Type.h.
Referenced by alignReferenceTypes(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckTemplateArgument(), ClassifyUnnamed(), createPrivatesRecordDecl(), DiagnoseCastQual(), emitOutlinedFunctionPrologue(), EvaluateUnaryTypeTrait(), getCanonicalParamType(), clang::ento::ExprEngine::handleLValueBitCast(), implicitObjectParamIsLifetimeBound(), clang::CXXConstructorDecl::isCopyConstructor(), and isStructuralType().
|
inline |
Definition at line 7010 of file Type.h.
Referenced by clang::Sema::areMatrixTypesOfTheSameDimension(), clang::Sema::CheckMatrixCast(), and TryStaticCast().
|
inline |
Definition at line 6953 of file Type.h.
Referenced by clang::CodeGen::CodeGenModule::EmitNullConstant(), and EvaluateUnaryTypeTrait().
|
inline |
Definition at line 6946 of file Type.h.
Referenced by checkCastFunctionType(), diagnoseOpenCLTypes(), EvaluateUnaryTypeTrait(), isAggregateTypeForABI(), and TryConstCast().
|
inline |
Definition at line 6942 of file Type.h.
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::AddAlignValueAttr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildQualifiedType(), CastsAwayConstness(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckTemplateArgument(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DefaultLvalueConversion(), Evaluate(), EvaluateComparisonBinaryOperator(), EvaluateMemberPointer(), EvaluateUnaryTypeTrait(), clang::Sema::FindCompositePointerType(), clang::ASTContext::getPreferredTypeAlign(), clang::Sema::HandleFunctionTypeMismatch(), clang::Sema::handlerCanCatch(), clang::ASTContext::hasUniqueObjectRepresentations(), isCompoundType(), needsAmpersandOnTemplateArg(), TryConstCast(), and TryReinterpretCast().
|
inline |
Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType.
Definition at line 7185 of file Type.h.
Referenced by clang::Sema::ActOnOMPArraySectionExpr().
bool Type::isNothrowT | ( | ) | const |
Definition at line 2791 of file Type.cpp.
References getAsCXXRecordDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::isInStdNamespace(), and clang::IdentifierInfo::isStr().
Referenced by HandleOperatorNewCall(), and clang::FunctionDecl::isReplaceableGlobalAllocationFunction().
|
inline |
Definition at line 7216 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckMSVCRTEntryPoint(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckTemplateArgument(), clang::interp::Context::classify(), clang::ImplicitCastExpr::Create(), clang::Sema::DefaultLvalueConversion(), clang::Sema::diagnoseZeroToNullptrConversion(), clang::ento::SMTConv::doTypeConversion(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), EvaluateUnaryTypeTrait(), clang::Sema::FindCompositePointerType(), clang::ento::SValBuilder::getDerivedRegionValueSymbolVal(), clang::ento::SValBuilder::getRegionValueSymbolVal(), clang::ASTContext::getTargetNullPointerValue(), HandleDestructionImpl(), clang::Sema::handlerCanCatch(), hasPointerRepresentation(), isFundamentalType(), clang::ento::Loc::isLocType(), clang::Sema::IsPointerConversion(), clang::ASTContext::isSentinelNullExpr(), clang::analyze_format_string::ArgType::matchesType(), and TryReinterpretCast().
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 4450 of file Type.cpp.
References isBlockPointerType(), and isObjCObjectPointerType().
Referenced by clang::Sema::BuildObjCBridgedCast().
bool Type::isObjCARCImplicitlyUnretainedType | ( | ) | const |
Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong.
Definition at line 4390 of file Type.cpp.
References getCanonicalTypeInternal(), clang::QualType::getTypePtr(), and isObjCLifetimeType().
Referenced by clang::Sema::CheckObjCPropertyAttributes(), getObjCARCImplicitLifetime(), and clang::Sema::MaybeBindToTemporary().
bool Type::isObjCBoxableRecordType | ( | ) | const |
Definition at line 573 of file Type.cpp.
Referenced by clang::Sema::BuildObjCBoxedExpr(), and clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr().
|
inline |
Definition at line 7073 of file Type.h.
References isObjCClassType(), isObjCIdType(), and isObjCSelType().
Referenced by AuditedType(), clang::ASTContext::canAssignObjCInterfacesInBlockPointer(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::isObjCPointerConversion(), and TypeIsInnerPointer().
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 710 of file Type.cpp.
Referenced by clang::Sema::BuildInstanceMessage().
|
inline |
Definition at line 7061 of file Type.h.
Referenced by clang::Sema::BuildInstanceMessage(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckObjCPropertyAttributes(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::Sema::FindCompositeObjCPointerType(), findMethodDecl(), clang::Sema::getMessageSendResultType(), isObjCBuiltinType(), and clang::Sema::SelectorsForTypoCorrection().
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>.
bound | Will be set to the bound on non-id subtype types, which will be (possibly specialized) Objective-C class type, or null for 'id. |
Definition at line 684 of file Type.cpp.
References getAs(), and clang::ObjCObjectType::stripObjCKindOfTypeAndQuals().
Referenced by clang::Sema::BuildInstanceMessage().
|
inline |
Definition at line 7055 of file Type.h.
Referenced by clang::Sema::BuildInstanceMessage(), clang::Sema::BuildObjCExceptionDecl(), BuildSimilarlyQualifiedPointerType(), clang::Sema::BuiltinRemovePointer(), clang::ento::RetainSummaryManager::canEval(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckSubscriptingKind(), clang::Sema::FindCompositeObjCPointerType(), findMethodDecl(), clang::ObjCMethodDecl::getMethodFamily(), isObjCBuiltinType(), clang::ASTContext::mergeTypes(), and clang::Sema::SelectorsForTypoCorrection().
bool Type::isObjCIndependentClassType | ( | ) | const |
Definition at line 4415 of file Type.cpp.
References clang::ast_matchers::typedefType.
bool Type::isObjCIndirectLifetimeType | ( | ) | const |
Definition at line 4427 of file Type.cpp.
References isObjCLifetimeType().
|
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 2203 of file Type.h.
References hasAttr().
bool Type::isObjCLifetimeType | ( | ) | const |
Returns true if objects of this type have lifetime semantics under ARC.
Definition at line 4441 of file Type.cpp.
References clang::ast_matchers::type.
Referenced by clang::Sema::BuildVAArgExpr(), clang::Sema::CheckAllocatedType(), createObjCPropertyGetter(), EvaluateUnaryTypeTrait(), isObjCARCImplicitlyUnretainedType(), isObjCIndirectLifetimeType(), clang::Sema::isObjCWritebackConversion(), clang::Sema::isValidVarArgType(), and clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildQualifiedType().
bool Type::isObjCNSObjectType | ( | ) | const |
Definition at line 4409 of file Type.cpp.
References clang::ast_matchers::typedefType.
Referenced by clang::ASTContext::isObjCNSObjectType(), isObjCRetainableType(), and isValidSubjectOfNSAttribute().
|
inline |
Definition at line 7030 of file Type.h.
Referenced by clang::Sema::CompareReferenceRelationship().
|
inline |
Definition at line 7022 of file Type.h.
Referenced by clang::Sema::ActOnObjCForCollectionStmt(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), adjustReturnValue(), AuditedType(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCExceptionDecl(), clang::Sema::BuildQualifiedType(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckAdditionOperands(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckMessageArgumentTypes(), clang::Sema::CheckObjCARCUnavailableWeakConversion(), clang::Sema::CheckObjCPropertyAttributes(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSubscriptingKind(), clang::Sema::CheckSubtractionOperands(), clang::Sema::DiagnoseAssignmentResult(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::ASTContext::getByrefLifetime(), GetGCAttrTypeForType(), clang::ASTContext::getObjCGCAttrKind(), hasObjCPointerRepresentation(), hasPointerRepresentation(), isAnyPointerType(), clang::ento::cocoa::isCocoaObjectRef(), isObjCARCBridgableType(), isObjCPointer(), isObjCRetainableType(), clang::Sema::IsPointerConversion(), isValidSubjectOfNSAttribute(), clang::analyze_format_string::ArgType::matchesType(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclTypes(), objectifyExpr(), clang::Sema::PerformImplicitConversion(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildCXXForRangeStmt(), clang::Sema::SelectorsForTypoCorrection(), clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(), TryConstCast(), tryEmitSpecializedAllocInit(), tryGenerateSpecializedMessageSend(), TryReinterpretCast(), TryStaticCast(), and TypeIsInnerPointer().
|
inline |
Definition at line 7026 of file Type.h.
Referenced by clang::Sema::ActOnCompatibilityAlias(), clang::Sema::ActOnForwardClassDeclaration(), clang::Sema::ActOnTypedefedProtocols(), clang::Sema::BuildArrayType(), clang::Sema::BuildPointerType(), CastsAwayConstness(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckFunctionReturnType(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::checkVariadicArgument(), clang::Sema::isValidVarArgType(), and clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec().
|
inline |
Definition at line 7049 of file Type.h.
Referenced by clang::Sema::BuildInstanceMessage(), clang::Sema::CheckObjCPropertyAttributes(), and clang::Sema::SelectorsForTypoCorrection().
|
inline |
Definition at line 7043 of file Type.h.
Referenced by clang::Sema::BuildObjCExceptionDecl(), BuildSimilarlyQualifiedPointerType(), clang::Sema::DiagnoseAssignmentResult(), clang::ASTContext::ObjCObjectAdoptsQTypeProtocols(), clang::ASTContext::QIdProtocolsAdoptObjCObjectProtocols(), and clang::Sema::SelectorsForTypoCorrection().
bool Type::isObjCQualifiedInterfaceType | ( | ) | const |
Definition at line 1728 of file Type.cpp.
References getAsObjCQualifiedInterfaceType().
bool Type::isObjCRetainableType | ( | ) | const |
Definition at line 4421 of file Type.cpp.
References isBlockPointerType(), isObjCNSObjectType(), and isObjCObjectPointerType().
Referenced by AdjustObjCObjectType(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildInstanceMessage(), checkAllAtProps(), clang::Sema::CheckObjCPropertyAttributes(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::Sema::checkUnsafeExprAssigns(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), findWeakLValue(), clang::analyze_printf::PrintfSpecifier::fixType(), handleObjCOwnershipTypeAttr(), isSynthesizedRetainableProperty(), isValidSubjectOfNSReturnsRetainedAttribute(), clang::Sema::MaybeBindToTemporary(), PropertyMemoryAttribute(), and clang::CodeGen::CodeGenFunction::StartFunction().
|
inline |
Definition at line 7067 of file Type.h.
Referenced by clang::ObjCMethodDecl::getMethodFamily(), isCallback(), and isObjCBuiltinType().
|
inline |
Definition at line 6918 of file Type.h.
Referenced by clang::getComparisonCategoryForBuiltinCmp().
|
inline |
Determine whether this type is an object type.
Definition at line 2062 of file Type.h.
References isFunctionType(), isReferenceType(), and isVoidType().
Referenced by EvaluateBinaryTypeTrait(), EvaluateUnaryTypeTrait(), clang::Sema::FindCompositePointerType(), clang::Sema::getNamedReturnInfo(), clang::Sema::handlerCanCatch(), and clang::QualType::isReferenceable().
|
inline |
Definition at line 7136 of file Type.h.
Referenced by isOpenCLSpecificType().
|
inline |
|
inline |
Definition at line 7143 of file Type.h.
References isClkEventT(), isEventT(), isImageType(), isOCLExtOpaqueType(), isPipeType(), isQueueT(), isReserveIDT(), and isSamplerT().
Referenced by clang::CodeGen::CGOpenCLRuntime::convertOpenCLSpecificType(), and isTypeSubstitutable().
|
inline |
Determines whether this is a type for which one can define an overloaded operator.
Definition at line 7320 of file Type.h.
References isDependentType(), isEnumeralType(), and isRecordType().
Referenced by clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildCXXOperatorCallExpr().
|
inline |
Definition at line 7114 of file Type.h.
Referenced by clang::Sema::BuildArrayType(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), and isOpenCLSpecificType().
|
inline |
Test for a type which does not represent an actual type-system type but is instead used as a placeholder for various convenient purposes within Clang.
All such types are BuiltinTypes.
Definition at line 7167 of file Type.h.
Referenced by clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), and clang::Expr::hasPlaceholderType().
|
inline |
Definition at line 6894 of file Type.h.
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnOMPArrayShapingExpr(), clang::Sema::ActOnOpenMPAlignedClause(), clang::Sema::ActOnOpenMPDeclareSimdDirective(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPUseDevicePtrClause(), addCastTransition(), clang::Sema::AddFunctionCandidates(), addInstanceOfTransition(), argTypeIsABIEquivalent(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCXXThisExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildPseudoDestructorExpr(), clang::ento::RetainSummaryManager::canEval(), castToBase(), clang::Sema::CheckAdditionOperands(), checkArrayExpressionDoesNotReferToWholeSize(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::interp::Context::classify(), ClassifyDiagnostic(), clang::Sema::CreateBuiltinUnaryOp(), decomposeTypeForEH(), clang::Sema::DeduceTemplateArguments(), diagnoseOpenCLTypes(), clang::Sema::DiscardMisalignedMemberAddress(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicIncrementValue(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitDynamicCastToNull(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), emitOutlinedFunctionPrologue(), emitParallelOrTeamsOutlinedFunction(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(), clang::ento::ExprEngine::evalCall(), EvaluateBuiltinConstantP(), EvaluateComparisonBinaryOperator(), ExprLooksBoolean(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), getAArch64LS(), getAArch64PBV(), clang::QualType::getBaseTypeIdentifier(), getBuiltinAlignArguments(), getCanonicalParamType(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), getCoreType(), clang::CXXDeleteExpr::getDestroyedType(), clang::ento::CXXInstanceCall::getExtraInvalidatedValues(), clang::UserDefinedLiteral::getLiteralOperatorKind(), clang::OverloadCandidate::getNumParams(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::CXXMemberCallExpr::getObjectType(), getUuidAttrOfType(), clang::Sema::HandleFunctionTypeMismatch(), handleObjCOwnershipTypeAttr(), clang::Sema::handlerCanCatch(), hasPointerRepresentation(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::Expr::IgnoreParenNoopCasts(), isAnyPointerType(), clang::ExtVectorElementExpr::isArrow(), isAutoCastType(), isCompoundType(), isConsumableType(), isIntegerLikeType(), clang::ento::iterator::isIteratorType(), clang::CXXTypeidExpr::isMostDerived(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::Expr::isOBJCGCCandidate(), clang::Sema::isObjCPointerConversion(), clang::Sema::IsPointerConversion(), isPointerOrRef(), IsTypeModifiable(), clang::isUncountedPtr(), isValidSubjectOfCFAttribute(), IsVoidStarType(), loadToBegin(), MakeBinaryAtomicValue(), clang::analyze_format_string::ArgType::matchesType(), needsAmpersandOnTemplateArg(), objectifyExpr(), peelOffPointerArithmetic(), clang::Sema::PerformImplicitConversion(), rewriteBuiltinFunctionDecl(), setObjCGCLValueClass(), shouldTrackFirstArgument(), clang::CodeGen::CodeGenFunction::StartFunction(), TryConstCast(), TryDeconstructFunctionLike(), TryReinterpretCast(), TypeIsInnerPointer(), clang::interp::ByteCodeExprGen< Emitter >::VisitCompoundAssignOperator(), clang::interp::ByteCodeExprGen< Emitter >::VisitImplicitValueInitExpr(), and clang::interp::ByteCodeExprGen< Emitter >::VisitPointerArithBinOp().
|
inline |
Definition at line 7099 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::CheckCompareOperands(), clang::Sema::CheckSingleAssignmentConstraints(), and isOpenCLSpecificType().
bool Type::isRealFloatingType | ( | ) | const |
Floating point categories.
Definition at line 2161 of file Type.cpp.
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::BuildExtVectorType(), clang::Sema::BuildVectorType(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::checkTypeSupport(), DiagnoseBadFunctionCast(), clang::ento::SMTConv::doFloatTypeConversion(), clang::ento::SMTConv::doTypeConversion(), Evaluate(), EvaluateComparisonBinaryOperator(), EvaluateFloat(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::ento::SMTConv::fromCast(), getAbsoluteValueKind(), clang::ento::SMTConv::getBinExpr(), clang::getComparisonCategoryForBuiltinCmp(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), isIntegerLikeType(), clang::ento::SMTConv::mkSort(), clang::Sema::PerformImplicitConversion(), TryStaticCast(), and clang::Sema::UsualArithmeticConversions().
bool Type::isRealType | ( | ) | const |
Definition at line 2167 of file Type.cpp.
References isBitIntType().
Referenced by clang::Sema::CheckSizelessVectorOperands(), clang::Sema::CheckVectorOperands(), clang::MatrixType::isValidElementType(), and rewriteToObjCProperty().
|
inline |
Definition at line 6984 of file Type.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildCallExpr(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildImplicitMemberInitializer(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckBaseSpecifier(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckMemberPointerConversion(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkVariadicArgument(), ClassifyTemporary(), clang::Sema::CollectIvarsToConstructOrDestruct(), clang::CXXBindTemporaryExpr::Create(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DefaultLvalueConversion(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), Evaluate(), evaluateCDTSize(), EvaluateInPlace(), EvaluateRecord(), EvaluateTemporary(), FastEvaluateAsRValue(), clang::Sema::FindAllocationFunctions(), findSubobject(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::QualType::getBaseTypeIdentifier(), clang::ASTContext::getByrefLifetime(), clang::Sema::getCopyElisionCandidate(), clang::CXXMethodDecl::getDevirtualizedMethod(), getFieldsFromClassHierarchy(), clang::ASTContext::getInjectedTemplateArg(), clang::CodeGen::CodeGenFunction::getOverlapForFieldInit(), getSelfInitExpr(), clang::ASTContext::getTemplateParamObjectDecl(), clang::Sema::handlerCanCatch(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ASTNodeImporter::ImportAPValue(), InitCatchParam(), IsAcceptableNonMemberOperatorCandidate(), clang::Sema::IsBlockPointerConversion(), isCARCBridgableType(), clang::ento::NonLoc::isCompoundType(), isCompoundType(), clang::Expr::isConstantInitializer(), clang::CodeGen::CodeGenModule::isInNoSanitizeList(), isObjCReceiverType(), isOverloadableType(), clang::Sema::IsPointerConversion(), isRecordType(), isTrackedVar(), clang::Sema::PerformImplicitConversion(), clang::Sema::RequireStructuralType(), setObjCGCLValueClass(), clang::Expr::skipRValueSubobjectAdjustments(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::TransformNestedNameSpecifierLoc(), TryConstCast(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryStaticImplicitCast(), clang::interp::ByteCodeExprGen< Emitter >::visitInitializer(), and clang::ento::ExprEngine::VisitInitListExpr().
|
inline |
Definition at line 6906 of file Type.h.
Referenced by clang::Sema::ActOnOpenMPDeclareReductionType(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddAlignValueAttr(), addCastTransition(), clang::Sema::AddInitializerToDecl(), addInstanceOfTransition(), clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::Sema::BuildArrayType(), clang::Sema::BuildAtomicType(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildImplicitMemberInitializer(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildPointerType(), clang::Sema::BuildQualifiedType(), clang::Sema::BuiltinChangeCVRQualifiers(), clang::canDynamicCastThrow(), CastsAwayConstness(), castToBase(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckForReference(), CheckICE(), clang::Sema::checkInitializerLifetime(), CheckLValueConstantExpression(), clang::Sema::CheckOMPThreadPrivateDecl(), clang::Sema::CheckOpenMPLinearDecl(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::interp::Context::classify(), ClassifyDiagnostic(), clang::Sema::CompareReferenceRelationship(), createObjCPropertyGetter(), clang::Sema::DeduceTemplateArguments(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseForRangeVariableCopies(), diagnoseOpenCLTypes(), DoMarkPotentialCapture(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), EmitDeclInit(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitRValueForField(), clang::ento::ExprEngine::evalCall(), EvaluateUnaryTypeTrait(), clang::ento::SMTConv::fromCast(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), getAArch64MTV(), clang::CodeGen::CodeGenFunction::GetAddrOfBlockDecl(), getBaseAlignmentAndOffsetFromLValue(), clang::QualType::getBaseTypeIdentifier(), getCoreType(), clang::CFGImplicitDtor::getDestructorDecl(), getFuchsiaHandleSymbols(), clang::OverloadCandidate::getNumParams(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getUuidAttrOfType(), clang::ento::SMTConv::getZeroExpr(), hasPointerRepresentation(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), isAutoCastType(), isCallback(), clang::ento::isCapturedByReference(), isCompoundType(), isConsumableType(), clang::ento::isDereferencableType(), isLiteralType(), clang::ento::Loc::isLocType(), clang::CXXTypeidExpr::isMostDerived(), isObjectType(), isPointerOrRef(), clang::ento::isPossiblyEscaped(), clang::QualType::isReferenceable(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::isUncountedPtr(), clang::Expr::isUnusedResultAWarning(), isValidBaseType(), clang::Sema::isValidPointerAttrType(), lifetimeStartedInEvaluation(), loadToBegin(), clang::Sema::PerformImplicitConversion(), PerformReturnAdjustment(), print(), clang::ento::ExprEngine::ProcessAutomaticObjDtor(), clang::TreeTransform< EnsureImmediateInvocationInDefaultArgs >::RebuildQualifiedType(), clang::ReferenceType::ReferenceType(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::Expr::setType(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), shouldTrackFirstArgument(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryStaticImplicitCast(), unwrapCastAwayConstnessLevel(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::ento::ExprEngine::VisitCast(), visitLocalsRetainedByInitializer(), clang::interp::ByteCodeExprGen< Emitter >::VisitMemberExpr(), clang::ento::UndefOrNullArgVisitor::VisitNode(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), and writeShouldKill().
|
inline |
Definition at line 7103 of file Type.h.
References isSpecificBuiltinType().
Referenced by diagnoseOpenCLTypes(), and isOpenCLSpecificType().
|
inline |
Definition at line 6914 of file Type.h.
Referenced by alignReferenceTypes(), clang::Sema::CheckTemplateArgument(), DiagnoseForRangeReferenceVariableCopies(), EvaluateUnaryTypeTrait(), clang::Sema::getNamedReturnInfo(), clang::ento::ExprEngine::handleLValueBitCast(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CXXConstructorDecl::isMoveConstructor(), isRValueRef(), RefersToRValueRef(), clang::Sema::RequireStructuralType(), and TryStaticReferenceDowncast().
|
inline |
Definition at line 7148 of file Type.h.
Referenced by isTrackedVar().
|
inline |
Definition at line 7087 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::deduceOpenCLAddressSpace(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), and isOpenCLSpecificType().
|
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 7248 of file Type.h.
Referenced by clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getFixedPointSemantics(), and isUnsaturatedFixedPointType().
|
inline |
Definition at line 7278 of file Type.h.
References isBitIntType(), and clang::IsEnumDeclComplete().
Referenced by clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPLastprivateClause(), clang::Sema::areLaxCompatibleVectorTypes(), breakDownVectorType(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildPseudoDestructorExpr(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckBooleanCondition(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckVectorOperands(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), EvaluateUnaryTypeTrait(), getDerivedSymbolForBinding(), clang::Sema::getFixItZeroInitializerForType(), getScalarTypeKind(), getVariableCategoryFromDecl(), clang::ento::BasicValueFactory::getZeroWithTypeSize(), clang::QualType::isCXX11PODType(), isLiteralType(), clang::ento::isPrimitiveType(), isStandardLayoutType(), isStructuralType(), isTrackedVar(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), matchTypes(), clang::Sema::RequireStructuralType(), and updateOutParameters().
bool Type::isScopedEnumeralType | ( | ) | const |
Determine whether this type is a scoped enumeration type.
Definition at line 616 of file Type.cpp.
Referenced by EvaluateUnaryTypeTrait().
|
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 7260 of file Type.h.
Referenced by clang::ASTContext::getCorrespondingSignedType(), clang::ASTContext::getFixedPointSemantics(), and isUnsignedFixedPointType().
bool Type::isSignedIntegerOrEnumerationType | ( | ) | const |
Determines whether this is an integer type that is signed or an enumeration types whose underlying type is a signed integer type.
Definition at line 2063 of file Type.cpp.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), clang::ento::iterator::assumeNoOverflow(), clang::ento::SMTConv::castAPSInt(), clang::Sema::CheckEnumConstant(), CheckICE(), clang::interp::Context::classify(), clang::Sema::DiagnoseAssignmentEnum(), clang::ento::SMTConv::doIntTypeConversion(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitPointerArithmetic(), clang::ento::SMTConv::fromCast(), clang::ento::BasicValueFactory::getAPSIntType(), clang::ento::SMTConv::getBinExpr(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTConv::getRangeExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), HandleFloatToIntCast(), hasSignedIntegerRepresentation(), isRepresentableIntegerValue(), isWithinConstantOverflowBounds(), clang::ASTContext::MakeIntValue(), and tryRearrange().
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 2042 of file Type.cpp.
Referenced by clang::Sema::CheckCompatibleReinterpretCast(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitCheckTypeDescriptor(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), EvaluateUnaryTypeTrait(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CodeGen::CodeGenFunction::GenerateSEHFilterFunction(), clang::ASTContext::getFixedPointSemantics(), getIntegerWidthAndSignedness(), clang::ASTContext::getPromotedIntegerType(), clang::Sema::IsIntegralPromotion(), isKnownToHaveUnsignedValue(), clang::ASTContext::isPromotableBitField(), rewriteToNumericBoxedExpression(), and clang::JSONNodeDumper::VisitIntegerLiteral().
bool Type::isSizelessBuiltinType | ( | ) | const |
Definition at line 2329 of file Type.cpp.
Referenced by clang::ASTContext::areCompatibleSveTypes(), clang::ASTContext::areLaxCompatibleSveTypes(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckVectorOperands(), clang::Sema::GetSignedSizelessVectorType(), clang::QualType::isCXX11PODType(), isSizelessType(), clang::QualType::isTriviallyCopyableType(), and clang::Sema::isValidSveBitcast().
bool Type::isSizelessType | ( | ) | const |
As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other.
Standard types are all sized; sizeless types are purely an extension.
Sizeless types contain data with no specified size, alignment, or layout.
Definition at line 2345 of file Type.cpp.
References isSizelessBuiltinType().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::BuildAtomicType(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckSpecifiedExceptionType(), and clang::Sema::CheckVariableDeclarationType().
Test for a particular builtin type.
Definition at line 7160 of file Type.h.
Referenced by clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::ActOnOpenMPDependClause(), clang::Sema::ActOnOpenMPMapClause(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildVAArgExpr(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::DiagnoseAssignmentResult(), clang::OverloadExpr::find(), clang::Sema::getCopyElisionCandidate(), clang::ASTContext::getPreferredTypeAlign(), isBFloat16Type(), isClkEventT(), isEventT(), isFloat128Type(), isFloat16Type(), isHalfType(), isIbm128Type(), isNullPtrType(), clang::ObjCObjectType::isObjCClass(), clang::ObjCObjectType::isObjCId(), isQueueT(), isReserveIDT(), isSamplerT(), isSpecificPlaceholderType(), isTypeSubstitutable(), and isVoidType().
Test for a specific placeholder type.
Definition at line 7180 of file Type.h.
References clang::BuiltinType::isPlaceholderTypeKind(), and isSpecificBuiltinType().
Referenced by clang::CallExpr::getCallReturnType(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), and clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr().
bool Type::isSpecifierType | ( | ) | const |
Returns true if this type can be represented by some set of type specifiers.
Definition at line 2818 of file Type.cpp.
References Complex, and getTypeClass().
Referenced by GetBaseType().
bool Type::isStandardLayoutType | ( | ) | const |
Test if this type is a standard-layout type.
(C++0x [basic.type]p9)
Definition at line 2703 of file Type.cpp.
References getAs(), getBaseElementTypeUnsafe(), isDependentType(), isIncompleteType(), isScalarType(), and isVectorType().
Referenced by EvaluateUnaryTypeTrait(), and isLayoutCompatible().
bool Type::isStdByteType | ( | ) | const |
Definition at line 2809 of file Type.cpp.
References clang::IdentifierInfo::isStr().
bool Type::isStructuralType | ( | ) | const |
Determine if this type is a structural type, per C++20 [temp.param]p7.
Definition at line 2687 of file Type.cpp.
References getAsCXXRecordDecl(), isLValueReferenceType(), isScalarType(), and isVectorType().
Referenced by clang::Sema::RequireStructuralType().
bool Type::isStructureOrClassType | ( | ) | const |
Definition at line 585 of file Type.cpp.
References clang::TagDecl::isClass(), clang::TagDecl::isInterface(), and clang::TagDecl::isStruct().
Referenced by clang::Sema::ActOnOpenMPDeclareMapperType(), clang::dataflow::DataflowAnalysisContext::createStorageLocation(), and clang::dataflow::Environment::setValue().
bool Type::isStructureType | ( | ) | const |
Definition at line 567 of file Type.cpp.
Referenced by clang::Sema::ActOnGCCAsmStmt(), EvaluateUnaryTypeTrait(), and getFuchsiaHandleSymbols().
bool Type::isSVESizelessBuiltinType | ( | ) | const |
Returns true for SVE scalable vector types.
Definition at line 2347 of file Type.cpp.
Referenced by clang::Sema::checkTypeSupport(), and clang::Sema::CheckVariableDeclarationType().
|
inline |
Determines whether this type is written as a typedef-name.
Definition at line 7325 of file Type.h.
Referenced by clang::extractapi::TypedefUnderlyingTypeResolver::getUnderlyingTypeDecl().
|
inline |
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.
Definition at line 7313 of file Type.h.
References getContainedDeducedType().
Referenced by clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildArrayType(), clang::Sema::BuildVariableInstantiation(), clang::Sema::canDelayFunctionBody(), clang::Sema::checkArrayElementAlignment(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CreateRecoveryExpr(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceReturnType(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), hasDeducedReturnType(), clang::VarDecl::hasDependentAlignment(), clang::Sema::MergeVarDeclTypes(), and clang::Sema::RebuildTemplateParamsInCurrentInstantiation().
bool Type::isUnionType | ( | ) | const |
Definition at line 599 of file Type.cpp.
Referenced by clang::Sema::ActOnOpenMPDeclareMapperType(), appendRecordType(), clang::Sema::CheckBaseSpecifier(), clang::dataflow::DataflowAnalysisContext::createStorageLocation(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), evaluateCDTSize(), EvaluateUnaryTypeTrait(), isCompoundType(), and clang::dataflow::Environment::setValue().
|
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 7256 of file Type.h.
References isFixedPointType(), and isSaturatedFixedPointType().
bool Type::isUnscopedEnumerationType | ( | ) | const |
Definition at line 1978 of file Type.cpp.
Referenced by isIntegralOrUnscopedEnumerationType().
|
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 7274 of file Type.h.
References isFixedPointType(), and isSignedFixedPointType().
Referenced by clang::ento::BasicValueFactory::getAPSIntType(), clang::ASTContext::getCorrespondingSignedFixedPointType(), and clang::ASTContext::getCorrespondingUnsignedType().
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 2113 of file Type.cpp.
Referenced by clang::interp::Context::classify(), GetExprRange(), clang::ento::BasicValueFactory::getTruthValue(), GetValueRange(), HandleIntToIntCast(), hasUnsignedIntegerRepresentation(), isValidStructGUID(), and clang::ento::SValBuilder::makeIntVal().
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 2092 of file Type.cpp.
Referenced by clang::Sema::ActOnStringLiteral(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::DefaultArgumentPromotion(), clang::ento::SValBuilder::evalIntegralCast(), EvaluateUnaryTypeTrait(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::ASTContext::getIntegerTypeOrder(), clang::ASTContext::getPromotedIntegerType(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), and clang::Sema::IsIntegralPromotion().
|
inline |
Definition at line 6972 of file Type.h.
Referenced by clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::BuildArrayType(), clang::Sema::BuildCompoundLiteralExpr(), CheckICE(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), emitOMPArraySectionBase(), EquivalentArrayTypes(), EvaluateUnaryTypeTrait(), isConstantSizeArrayWithMoreThanOneElement(), isLiteralType(), isSimpleArrayDecayOperand(), clang::Sema::RequireLiteralType(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().
|
inline |
Whether this type is a variably-modified type (C99 6.7.5).
Definition at line 2326 of file Type.h.
References getDependence().
Referenced by clang::Sema::ActOnOpenMPCopyprivateClause(), clang::Sema::ActOnOpenMPFirstprivateClause(), clang::Sema::ActOnOpenMPPrivateClause(), clang::Sema::BuildArrayType(), clang::Sema::BuildCXXTypeId(), captureVariablyModifiedType(), clang::Sema::CheckAllocatedType(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckVariableDeclarationType(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitDecl(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseInit(), emitOutlinedFunctionPrologue(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::Sema::HandleExprEvaluationContextForTypeof(), hasSizedVLAType(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::QualType::isCanonicalAsParam(), clang::Sema::isIncompatibleTypedef(), NeedsInstantiationAsFunctionType(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::SubstType(), clang::Sema::tryCaptureVariable(), clang::TextNodeDumper::Visit(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 6996 of file Type.h.
Referenced by clang::Sema::AddAlignedAttr(), clang::Sema::anyAltivecTypes(), clang::ASTContext::areCompatibleSveTypes(), clang::ASTContext::areCompatibleVectorTypes(), clang::ASTContext::areLaxCompatibleSveTypes(), clang::Sema::areLaxCompatibleVectorTypes(), clang::Sema::areSameVectorElemTypes(), clang::Sema::areVectorTypesSameSize(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildVectorLiteral(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::CheckAdditionOperands(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckMultiplyDivideOperands(), checkObjCMethodX86VectorTypes(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckVectorCast(), clang::Sema::CheckVectorOperands(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), Evaluate(), EvaluateUnaryTypeTrait(), EvaluateVector(), clang::Sema::InvalidLogicalVectorOperands(), clang::ento::NonLoc::isCompoundType(), clang::QualType::isCXX11PODType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::Sema::isLaxVectorConversion(), isLiteralType(), clang::Sema::IsPointerConversion(), clang::ento::isPrimitiveType(), isStandardLayoutType(), isStructuralType(), isTrackedVar(), clang::QualType::isTriviallyCopyableType(), clang::QualType::isTrivialType(), clang::Sema::isValidSveBitcast(), isValidVectorForConditionalCondition(), clang::Expr::refersToVectorElement(), clang::Sema::SemaBuiltinShuffleVector(), clang::Sema::SemaConvertVectorExpr(), TryReinterpretCast(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ento::ExprEngine::VisitLogicalExpr().
|
inline |
Return true if the visibility was explicitly set is the code.
Definition at line 2539 of file Type.h.
References getLinkageAndVisibility(), and clang::LinkageInfo::isVisibilityExplicit().
bool Type::isVLSTBuiltinType | ( | ) | const |
Determines if this is a sizeless type supported by the 'arm_sve_vector_bits' type attribute, which can be applied to a single SVE vector or predicate, excluding tuple types such as svint32x4_t.
Definition at line 2361 of file Type.cpp.
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), getSveEltType(), getSVETypeSize(), and isValidSizelessVectorForConditionalCondition().
bool Type::isVoidPointerType | ( | ) | const |
Definition at line 593 of file Type.cpp.
Referenced by clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), checkIntToPointerCast(), clang::Sema::CheckSubscriptingKind(), clang::ento::SMTConv::doTypeConversion(), EvaluateComparisonBinaryOperator(), clang::Sema::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), getExistingLazyBinding(), HandleDynamicCast(), isVoidPointer(), clang::analyze_format_string::ArgType::matchesType(), and TryReinterpretCast().
|
inline |
Definition at line 7191 of file Type.h.
References isSpecificBuiltinType().
Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfObjCMethodDef(), clang::CodeGen::CGDebugInfo::addHeapAllocSiteMetadata(), clang::Sema::BuildArrayType(), clang::Sema::BuildClassMessage(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildFunctionType(), clang::Sema::buildLambdaScope(), clang::Sema::BuildMemberPointerType(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildReferenceType(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::BuiltinAddPointer(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckConditionalOperands(), CheckConstantExpression(), CheckConstexprFunctionBody(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CheckVariableDeclarationType(), ClassifyConditional(), clang::interp::ByteCodeEmitter::compileFunc(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::deduceOpenCLAddressSpace(), clang::Sema::DefaultLvalueConversion(), DiagnoseBadFunctionCast(), DiagnoseCastOfObjCSEL(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitInlinedInheritingCXXConstructorCall(), emitPointerArithmetic(), clang::ento::StoreManager::evalBaseToDerived(), clang::ento::ExprEngine::evalCall(), Evaluate(), EvaluateBinaryTypeTrait(), evaluateCDTSize(), EvaluateLValue(), EvaluateUnaryTypeTrait(), EvaluateVoid(), clang::Sema::FindCompositePointerType(), formatBlockPlaceholder(), clang::CodeGen::CodeGenFunction::GenerateCode(), getAArch64MTV(), GetExprRange(), getNDSWDS(), clang::ento::SMTConstraintManager::getSymVal(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), clang::Sema::handlerCanCatch(), HandleSizeof(), IgnoreCommaOperand(), clang::Sema::IgnoredValueConversions(), clang::CXXDynamicCastExpr::isAlwaysNull(), isCARCBridgableType(), isDispatchBlock(), isFundamentalType(), isIncompleteType(), isLiteralType(), clang::Expr::isNullPointerConstant(), isObjectType(), clang::Sema::IsPointerConversion(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), isUnitTest(), clang::Expr::isUnusedResultAWarning(), clang::ento::SymExpr::isValidTypeForSymbol(), clang::Sema::isValidVarArgType(), isVoidPointerToNonConst(), IsVoidStarType(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::RequireLiteralType(), clang::consumed::ConsumedAnalyzer::run(), shouldBeModeledWithNoOp(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::SubstParmVarDecl(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), tryGenerateSpecializedMessageSend(), TryStaticCast(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::interp::ByteCodeExprGen< Emitter >::VisitBuiltinCallExpr(), clang::interp::ByteCodeExprGen< Emitter >::VisitCallExpr(), clang::interp::ByteCodeStmtGen< Emitter >::visitFunc(), and clang::interp::ByteCodeExprGen< Emitter >::VisitUnaryExprOrTypeTraitExpr().
bool Type::isWideCharType | ( | ) | const |
Definition at line 1994 of file Type.cpp.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::BuiltinChangeSignedness(), clang::analyze_printf::PrintfSpecifier::fixType(), and clang::analyze_scanf::ScanfSpecifier::fixType().
|
inlineprotected |
|
friend |
|
friend |
|
friend |
|
friend |
union { ... } |
ArrayTypeBitfields clang::Type::ArrayTypeBits |
Definition at line 1917 of file Type.h.
Referenced by clang::ArrayType::ArrayType(), clang::ArrayType::getIndexTypeCVRQualifiers(), and clang::ArrayType::getSizeModifier().
AttributedTypeBitfields clang::Type::AttributedTypeBits |
Definition at line 1919 of file Type.h.
Referenced by clang::AttributedType::getAttrKind().
AutoTypeBitfields clang::Type::AutoTypeBits |
Definition at line 1920 of file Type.h.
Referenced by clang::AutoType::getKeyword(), and clang::AutoType::getTypeConstraintArguments().
BuiltinTypeBitfields clang::Type::BuiltinTypeBits |
Definition at line 1924 of file Type.h.
Referenced by clang::BuiltinType::getKind().
ConstantArrayTypeBitfields clang::Type::ConstantArrayTypeBits |
Definition at line 1918 of file Type.h.
Referenced by clang::ConstantArrayType::getSizeExpr().
DependentTemplateSpecializationTypeBitfields clang::Type::DependentTemplateSpecializationTypeBits |
Definition at line 1935 of file Type.h.
Referenced by clang::DependentTemplateSpecializationType::template_arguments().
ElaboratedTypeBitfields clang::Type::ElaboratedTypeBits |
Definition at line 1929 of file Type.h.
Referenced by clang::ElaboratedType::getOwnedTagDecl().
FunctionTypeBitfields clang::Type::FunctionTypeBits |
Definition at line 1925 of file Type.h.
Referenced by clang::FunctionType::FunctionType(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionType::getExtInfo(), clang::FunctionType::getFastTypeQuals(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getRefQualifier(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionProtoType::hasTrailingReturn(), and clang::FunctionProtoType::isVariadic().
ObjCObjectTypeBitfields clang::Type::ObjCObjectTypeBits |
Definition at line 1926 of file Type.h.
Referenced by clang::ObjCObjectType::getTypeArgsAsWritten(), clang::ObjCObjectType::isKindOfTypeAsWritten(), clang::ObjCObjectType::isSpecialized(), clang::ObjCObjectType::isSpecializedAsWritten(), and clang::ObjCObjectType::ObjCObjectType().
PackExpansionTypeBitfields clang::Type::PackExpansionTypeBits |
Definition at line 1936 of file Type.h.
Referenced by clang::PackExpansionType::getNumExpansions().
ReferenceTypeBitfields clang::Type::ReferenceTypeBits |
Definition at line 1927 of file Type.h.
Referenced by clang::ReferenceType::isInnerRef(), clang::ReferenceType::isSpelledAsLValue(), and clang::ReferenceType::ReferenceType().
SubstTemplateTypeParmPackTypeBitfields clang::Type::SubstTemplateTypeParmPackTypeBits |
Definition at line 1932 of file Type.h.
Referenced by clang::SubstTemplateTypeParmPackType::getIndex(), and clang::SubstTemplateTypeParmPackType::getNumArgs().
SubstTemplateTypeParmTypeBitfields clang::Type::SubstTemplateTypeParmTypeBits |
Definition at line 1931 of file Type.h.
Referenced by clang::SubstTemplateTypeParmType::getIndex(), clang::SubstTemplateTypeParmType::getPackIndex(), and clang::SubstTemplateTypeParmType::getReplacementType().
TemplateSpecializationTypeBitfields clang::Type::TemplateSpecializationTypeBits |
Definition at line 1933 of file Type.h.
Referenced by clang::TemplateSpecializationType::isTypeAlias(), and clang::TemplateSpecializationType::template_arguments().
TypeBitfields clang::Type::TypeBits |
Definition at line 1916 of file Type.h.
Referenced by clang::TypePropertyCache< Private >::ensure(), clang::TypePropertyCache< Private >::get(), getDependence(), getLinkage(), getTypeClass(), getTypeClassName(), hasUnnamedOrLocalType(), isFromAST(), isLinkageValid(), setDependence(), and Type().
TypedefBitfields clang::Type::TypedefBits |
Definition at line 1922 of file Type.h.
Referenced by clang::TypedefType::typeMatchesDecl().
TypeOfBitfields clang::Type::TypeOfBits |
Definition at line 1921 of file Type.h.
Referenced by clang::TypeOfExprType::desugar(), clang::TypeOfType::desugar(), clang::TypeOfExprType::getKind(), clang::TypeOfType::getKind(), and clang::TypeOfExprType::TypeOfExprType().
TypeWithKeywordBitfields clang::Type::TypeWithKeywordBits |
Definition at line 1928 of file Type.h.
Referenced by clang::TypeWithKeyword::getKeyword(), and clang::TypeWithKeyword::TypeWithKeyword().
UsingBitfields clang::Type::UsingBits |
Definition at line 1923 of file Type.h.
Referenced by clang::UsingType::typeMatchesDecl().
VectorTypeBitfields clang::Type::VectorTypeBits |
Definition at line 1930 of file Type.h.
Referenced by clang::VectorType::getNumElements(), clang::VectorType::getVectorKind(), clang::DependentVectorType::getVectorKind(), and clang::VectorType::VectorType().