clang 22.0.0git
|
The base class of the type hierarchy. More...
#include "clang/AST/TypeBase.h"
Classes | |
class | ArrayTypeBitfields |
class | AttributedTypeBitfields |
class | AutoTypeBitfields |
class | BuiltinTypeBitfields |
class | ConstantArrayTypeBitfields |
class | CountAttributedTypeBitfields |
class | FunctionTypeBitfields |
FunctionTypeBitfields store various bits belonging to FunctionProtoType. More... | |
class | KeywordWrapperBitfields |
class | ObjCObjectTypeBitfields |
class | PackExpansionTypeBitfields |
class | PresefinedSugarTypeBitfields |
class | ReferenceTypeBitfields |
class | SubstPackTypeBitfields |
class | SubstTemplateTypeParmTypeBitfields |
class | TagTypeBitfields |
class | TemplateSpecializationTypeBitfields |
class | TemplateTypeParmTypeBitfields |
class | TypedefBitfields |
class | TypeOfBitfields |
class | UnresolvedUsingBitfields |
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. | |
bool | containsUnexpandedParameterPack () const |
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates. | |
bool | isCanonicalUnqualified () const |
Determines if this type would be canonical if it had no further qualification. | |
QualType | getLocallyUnqualifiedSingleStepDesugaredType () const |
Pull a single level of sugar off of this locally-unqualified type. | |
bool | isSizelessType () const |
As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other. | |
bool | isSizelessBuiltinType () const |
bool | isSizelessVectorType () const |
Returns true for all scalable vector types. | |
bool | isSVESizelessBuiltinType () const |
Returns true for SVE scalable vector types. | |
bool | isRVVSizelessBuiltinType () const |
Returns true for RVV scalable vector types. | |
bool | isWebAssemblyExternrefType () const |
Check if this is a WebAssembly Externref Type. | |
bool | isWebAssemblyTableType () const |
Returns true if this is a WebAssembly table type: either an array of reference types, or a pointer to a reference type (which can only be created by array to pointer decay). | |
bool | isSveVLSBuiltinType () 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. | |
QualType | getSveEltType (const ASTContext &Ctx) const |
Returns the representative type for the element of an SVE builtin type. | |
bool | isRVVVLSBuiltinType () const |
Determines if this is a sizeless type supported by the 'riscv_rvv_vector_bits' type attribute, which can be applied to a single RVV vector or mask. | |
QualType | getRVVEltType (const ASTContext &Ctx) const |
Returns the representative type for the element of an RVV builtin type. | |
QualType | getSizelessVectorEltType (const ASTContext &Ctx) const |
Returns the representative type for the element of a sizeless vector builtin type. | |
bool | isIncompleteType (NamedDecl **Def=nullptr) const |
Types are partitioned into 3 broad categories (C99 6.2.5p1): object types, function types, and incomplete types. | |
bool | isIncompleteOrObjectType () const |
Return true if this is an incomplete or object type, in other words, not a function type. | |
bool | isAlwaysIncompleteType () const |
bool | isObjectType () const |
Determine whether this type is an object type. | |
bool | isLiteralType (const ASTContext &Ctx) const |
Return true if this is a literal type (C++11 [basic.types]p10) | |
bool | isStructuralType () const |
Determine if this type is a structural type, per C++20 [temp.param]p7. | |
bool | isStandardLayoutType () const |
Test if this type is a standard-layout type. | |
bool | isBuiltinType () const |
Helper methods to distinguish type categories. | |
bool | isSpecificBuiltinType (unsigned K) const |
Test for a particular builtin type. | |
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. | |
const BuiltinType * | getAsPlaceholderType () const |
bool | isSpecificPlaceholderType (unsigned K) const |
Test for a specific placeholder type. | |
bool | isNonOverloadPlaceholderType () const |
Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType. | |
bool | isIntegerType () const |
isIntegerType() does not include complex integers (a GCC extension). | |
bool | isEnumeralType () const |
bool | isScopedEnumeralType () const |
Determine whether this type is a scoped enumeration type. | |
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. | |
bool | isUnicodeCharacterType () const |
bool | isIntegralType (const ASTContext &Ctx) const |
Determine whether this type is an integral type. | |
bool | isIntegralOrEnumerationType () const |
Determine whether this type is an integral or enumeration type. | |
bool | isIntegralOrUnscopedEnumerationType () const |
Determine whether this type is an integral or unscoped enumeration type. | |
bool | isUnscopedEnumerationType () const |
bool | isRealFloatingType () const |
Floating point categories. | |
bool | isComplexType () const |
isComplexType() does not include complex integers (a GCC extension). | |
bool | isAnyComplexType () const |
bool | isFloatingType () const |
bool | isHalfType () const |
bool | isFloat16Type () const |
bool | isFloat32Type () const |
bool | isDoubleType () const |
bool | isBFloat16Type () const |
bool | isMFloat8Type () 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. | |
bool | isFundamentalType () const |
Tests whether the type is categorized as a fundamental type. | |
bool | isCompoundType () const |
Tests whether the type is categorized as a compound type. | |
bool | isFunctionType () const |
bool | isFunctionNoProtoType () const |
bool | isFunctionProtoType () const |
bool | isPointerType () const |
bool | isPointerOrReferenceType () const |
bool | isSignableType (const ASTContext &Ctx) const |
bool | isSignablePointerType () const |
bool | isSignableIntegerType (const ASTContext &Ctx) const |
bool | isAnyPointerType () const |
bool | isCountAttributedType () const |
bool | isCFIUncheckedCalleeFunctionType () const |
bool | hasPointeeToToCFIUncheckedCalleeFunctionType () 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 | isArrayParameterType () const |
bool | isDependentSizedArrayType () const |
bool | isRecordType () const |
bool | isClassType () const |
bool | isStructureType () const |
bool | isStructureTypeWithFlexibleArrayMember () 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 | isPackedVectorBoolType (const ASTContext &ctx) const |
bool | isSubscriptableVectorType () 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. | |
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? | |
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>. | |
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>. | |
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. | |
bool | isCARCBridgableType () const |
Determine whether the given type T is a "bridgeable" C type. | |
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. | |
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 | isHLSLSpecificType () const |
bool | isHLSLBuiltinIntangibleType () const |
bool | isHLSLAttributedResourceType () const |
bool | isHLSLInlineSpirvType () const |
bool | isHLSLResourceRecord () const |
bool | isHLSLResourceRecordArray () const |
bool | isHLSLIntangibleType () const |
bool | isObjCARCImplicitlyUnretainedType () const |
Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong. | |
bool | isCUDADeviceBuiltinSurfaceType () const |
Check if the type is the CUDA device builtin surface type. | |
bool | isCUDADeviceBuiltinTextureType () const |
Check if the type is the CUDA device builtin texture type. | |
Qualifiers::ObjCLifetime | getObjCARCImplicitLifetime () const |
Return the implicit lifetime for this type, which must not be dependent. | |
ScalarTypeKind | getScalarTypeKind () const |
Given that this is a scalar type, classify it. | |
TypeDependence | getDependence () const |
bool | containsErrors () const |
Whether this type is an error type. | |
bool | isDependentType () const |
Whether this type is a dependent type, meaning that its definition somehow depends on a template parameter (C++ [temp.dep.type]). | |
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). | |
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. | |
bool | isVariablyModifiedType () const |
Whether this type is a variably-modified type (C99 6.7.5). | |
bool | hasSizedVLAType () const |
Whether this type involves a variable-length array type with a definite size. | |
bool | hasUnnamedOrLocalType () const |
Whether this type is or contains a local or unnamed type. | |
bool | isOverloadableType () const |
Determines whether this is a type for which one can define an overloaded operator. | |
bool | isElaboratedTypeSpecifier () const |
Determine wither this type is a C++ elaborated-type-specifier. | |
bool | canDecayToPointerType () const |
Determines whether this type can decay to a pointer type. | |
bool | hasPointerRepresentation () const |
Whether this type is represented natively as a pointer. | |
bool | hasObjCPointerRepresentation () const |
Whether this type can represent an objective pointer type for the purpose of GC'ability. | |
bool | hasIntegerRepresentation () const |
Determine whether this type has an integer representation of some sort, e.g., it is an integer type or a vector. | |
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. | |
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. | |
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. | |
bool | hasBooleanRepresentation () const |
Determine whether this type has a boolean representation – i.e., it is a boolean type, an enum type whose underlying type is a boolean type, or a vector of booleans. | |
const RecordType * | getAsStructureType () const |
const RecordType * | getAsUnionType () const |
NOTE: getAs*ArrayType are methods on ASTContext. | |
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. | |
CXXRecordDecl * | castAsCXXRecordDecl () const |
RecordDecl * | getAsRecordDecl () const |
Retrieves the RecordDecl this type refers to. | |
RecordDecl * | castAsRecordDecl () const |
EnumDecl * | getAsEnumDecl () const |
Retrieves the EnumDecl this type refers to. | |
EnumDecl * | castAsEnumDecl () const |
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. | |
TagDecl * | castAsTagDecl () const |
const CXXRecordDecl * | getPointeeCXXRecordDecl () const |
If this is a pointer or reference to a RecordType, return the CXXRecordDecl that the type refers to. | |
DeducedType * | getContainedDeducedType () const |
Get the DeducedType whose type will be deduced for a variable with an initializer of this type. | |
AutoType * | getContainedAutoType () const |
Get the AutoType whose type will be deduced for a variable with an initializer of this type. | |
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). | |
template<typename T> | |
const T * | getAs () const |
Member-template getAs<specific type>'. | |
template<typename T> | |
const T * | getAsCanonical () const |
If this type is canonically the specified type, return its canonical type cast to that specified type, otherwise returns null. | |
template<typename T> | |
const T * | castAsCanonical () const |
Return this type's canonical type cast to the specified type. | |
const TemplateSpecializationType * | getAsNonAliasTemplateSpecializationType () const |
Look through sugar for an instance of TemplateSpecializationType which is not a type alias, or null if there is no such type. | |
const TemplateSpecializationType * | castAsNonAliasTemplateSpecializationType () const |
template<typename T> | |
const T * | getAsAdjusted () const |
Member-template getAsAdjusted<specific type>. | |
const ArrayType * | getAsArrayTypeUnsafe () const |
A variant of getAs<> for array types which silently discards qualifiers from the outermost type. | |
template<typename T> | |
const T * | castAs () const |
Member-template castAs<specific type>. | |
const ArrayType * | castAsArrayTypeUnsafe () const |
A variant of castAs<> for array type which silently discards qualifiers from the outermost type. | |
NestedNameSpecifier | getPrefix () const |
If this type represents a qualified-id, this returns its nested name specifier. | |
bool | hasAttr (attr::Kind AK) const |
Determine whether this type had the specified attribute applied to it (looking through top-level type sugar). | |
const Type * | getBaseElementTypeUnsafe () const |
Get the base element type of this type, potentially discarding type qualifiers. | |
const Type * | getArrayElementTypeNoTypeQual () const |
If this is an array type, return the element type of the array, potentially with type qualifiers missing. | |
const Type * | getPointeeOrArrayElementType () const |
If this is a pointer type, return the pointee type. | |
QualType | getPointeeType () const |
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee. | |
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. | |
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. | |
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. | |
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. | |
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. | |
bool | isFixedPointType () const |
Return true if this is a fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. | |
bool | isFixedPointOrIntegerType () const |
Return true if this is a fixed point or integer type. | |
bool | isConvertibleToFixedPointType () const |
Return true if this can be converted to (or from) a fixed point type. | |
bool | isSaturatedFixedPointType () const |
Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. | |
bool | isUnsaturatedFixedPointType () const |
Return true if this is a saturated fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169. | |
bool | isSignedFixedPointType () const |
Return true if this is a fixed point type that is signed according to ISO/IEC JTC1 SC22 WG14 N1169. | |
bool | isUnsignedFixedPointType () const |
Return true if this is a fixed point type that is unsigned according to ISO/IEC JTC1 SC22 WG14 N1169. | |
bool | isConstantSizeType () const |
Return true if this is not a variable sized type, according to the rules of C99 6.7.5p3. | |
bool | isSpecifierType () const |
Returns true if this type can be represented by some set of type specifiers. | |
Linkage | getLinkage () const |
Determine the linkage of this type. | |
Visibility | getVisibility () const |
Determine the visibility of this type. | |
bool | isVisibilityExplicit () const |
Return true if the visibility was explicitly set is the code. | |
LinkageInfo | getLinkageAndVisibility () const |
Determine the linkage and visibility of this type. | |
bool | isLinkageValid () const |
True if the computed linkage is valid. | |
std::optional< NullabilityKind > | getNullability () const |
Determine the nullability of the given type. | |
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. | |
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. | |
bool | acceptsObjCTypeParams () const |
Determines if this is an ObjC interface type that may accept type parameters. | |
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. | |
template<> | |
const UsingType * | getAs () const |
template<> | |
const TemplateSpecializationType * | getAs () const |
This will check for a TemplateSpecializationType by removing any existing sugar until it reaches a TemplateSpecializationType or a non-sugared type. | |
template<> | |
const AttributedType * | getAs () const |
This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type. | |
template<> | |
const BoundsAttributedType * | getAs () const |
This will check for a BoundsAttributedType by removing any existing sugar until it reaches an BoundsAttributedType or a non-sugared type. | |
template<> | |
const CountAttributedType * | getAs () const |
This will check for a CountAttributedType by removing any existing sugar until it reaches an CountAttributedType or a non-sugared type. | |
template<> | |
const TypedefType * | getAs () const |
template<> | |
const UsingType * | getAs () const |
template<> | |
const TemplateSpecializationType * | getAs () const |
template<> | |
const AttributedType * | getAs () const |
template<> | |
const BoundsAttributedType * | getAs () const |
template<> | |
const CountAttributedType * | getAs () const |
Static Public Attributes | |
static constexpr int | FunctionTypeNumParamsWidth = 16 |
static constexpr int | FunctionTypeNumParamsLimit = (1 << 16) - 1 |
Protected Types | |
enum | { NumArrayTypeBits = NumTypeBits + 6 } |
enum | { NumTypeWithKeywordBits = NumTypeBits + 8 } |
enum class | PredefinedSugarKind { SizeT , SignedSizeT , PtrdiffT , Last = PtrdiffT } |
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.
Definition at line 1833 of file TypeBase.h.
|
protected |
Enumerator | |
---|---|
NumTypeWithKeywordBits |
Definition at line 2059 of file TypeBase.h.
|
protected |
Enumerator | |
---|---|
NumArrayTypeBits |
Definition at line 1909 of file TypeBase.h.
|
strongprotected |
Enumerator | |
---|---|
SizeT | The "size_t" type. |
SignedSizeT | The signed integer type corresponding to "size_t". |
PtrdiffT | The "ptrdiff_t" type. |
Last |
Definition at line 2273 of file TypeBase.h.
Enumerator | |
---|---|
STK_CPointer | |
STK_BlockPointer | |
STK_ObjCObjectPointer | |
STK_MemberPointer | |
STK_Bool | |
STK_Integral | |
STK_Floating | |
STK_IntegralComplex | |
STK_FloatingComplex | |
STK_FixedPoint |
Definition at line 2755 of file TypeBase.h.
Definition at line 1835 of file TypeBase.h.
|
inlineprotected |
Definition at line 2349 of file TypeBase.h.
References clang::Invalid, clang::ExtQualsTypeCommonBase::QualType, this_(), clang::TypeAlignment, and TypeBits.
Referenced by clang::AdjustedType::AdjustedType(), clang::ArrayType::ArrayType(), clang::AtomicType::ASTContext, clang::BlockPointerType::ASTContext, clang::BuiltinType::ASTContext, clang::ComplexType::ASTContext, clang::MacroQualifiedType::ASTContext, clang::MemberPointerType::ASTContext, clang::ObjCObjectPointerType::ASTContext, clang::ParenType::ASTContext, clang::PipeType::ASTContext, clang::PointerType::ASTContext, clang::BitIntType::BitIntType(), clang::BoundsAttributedType::BoundsAttributedType(), clang::AdjustedType::classof(), clang::ArrayType::classof(), clang::AtomicType::classof(), clang::BitIntType::classof(), clang::BlockPointerType::classof(), clang::BoundsAttributedType::classof(), clang::BuiltinType::classof(), clang::ComplexType::classof(), clang::DependentAddressSpaceType::classof(), clang::DependentBitIntType::classof(), clang::DependentSizedExtVectorType::classof(), clang::DependentVectorType::classof(), clang::FunctionType::classof(), clang::LocInfoType::classof(), clang::MacroQualifiedType::classof(), clang::MatrixType::classof(), clang::MemberPointerType::classof(), clang::ObjCObjectPointerType::classof(), clang::ParenType::classof(), clang::PipeType::classof(), clang::PointerType::classof(), clang::PredefinedSugarType::classof(), clang::ReferenceType::classof(), clang::TypeOfExprType::classof(), clang::VectorType::classof(), clang::DependentBitIntType::DependentBitIntType(), clang::FunctionType::FunctionType(), getArrayElementTypeNoTypeQual(), getAsAdjusted(), getBaseElementTypeUnsafe(), getNullability(), getPointeeOrArrayElementType(), getScalarTypeKind(), getUnqualifiedDesugaredType(), hasAttr(), isHLSLIntangibleType(), isHLSLResourceRecordArray(), isLiteralType(), isObjCARCImplicitlyUnretainedType(), isObjCLifetimeType(), isStandardLayoutType(), clang::MatrixType::MatrixType(), operator=(), operator=(), clang::ReferenceType::ReferenceType(), this_(), Type(), Type(), clang::TypeOfExprType::TypeOfExprType(), and clang::VectorType::VectorType().
bool Type::acceptsObjCTypeParams | ( | ) | const |
Determines if this is an ObjC interface type that may accept type parameters.
Definition at line 1759 of file Type.cpp.
References getAsObjCInterfaceType().
|
inlineprotected |
Definition at line 2372 of file TypeBase.h.
References getDependence(), and setDependence().
|
inline |
Determines whether this type can decay to a pointer type.
Definition at line 9038 of file TypeBase.h.
References canDecayToPointerType(), isArrayParameterType(), isArrayType(), and isFunctionType().
Referenced by BuiltinAlignment(), canDecayToPointerType(), checkArithmeticNull(), GetVTablePointer(), IsStandardConversion(), and 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 5035 of file Type.cpp.
References clang::cast(), getCanonicalTypeInternal(), clang::ExtQualsTypeCommonBase::QualType, clang::TagDecl::redecls(), and clang::ast_matchers::type.
Referenced by CheckNullabilityTypeSpecifier(), and clang::SemaObjC::getMessageSendResultType().
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 9165 of file TypeBase.h.
References clang::cast(), castAs(), getUnqualifiedDesugaredType(), clang::isa(), and clang::T.
Referenced by __clang_Interpreter_SetValueNoAlloc(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnNumericConstant(), clang::SemaObjC::ActOnPropertyImplDecl(), addBlockPointerConversion(), addFunctionPointerConversions(), AddObjCKeyValueCompletions(), clang::Sema::adjustCCAndNoReturn(), AdjustFunctionParmAndArgTypesForDeduction(), clang::ASTContext::adjustFunctionResultType(), adjustFunctionTypeForInstantiation(), adjustVectorType(), clang::Sema::anyAltivecTypes(), clang::applyObjCTypeArgs(), clang::ASTContext::areCommonBaseCompatible(), clang::ASTContext::areCompatibleVectorTypes(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildFieldReferenceExpr(), buildGlobalBlock(), clang::Sema::BuildMemberReferenceExpr(), clang::SemaObjC::BuildObjCArrayLiteral(), clang::SemaObjC::BuildObjCDictionaryLiteral(), clang::Sema::BuildResolvedCallExpr(), buildTypeForLambdaCallOperator(), clang::Sema::BuildVectorLiteral(), clang::Sema::BuiltinShuffleVector(), castAs(), checkArithmeticOnObjCPointer(), clang::checkBlockArgs(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::SemaHLSL::CheckBuiltinFunctionCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), checkBuiltinVectorMathArgTypes(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), CheckCompleteParameterTypesForMangler(), checkConditionalObjectPointersCompatibility(), checkConditionalPointerCompatibility(), CheckConstexprParameterTypes(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), checkEscapingByref(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckExtVectorComponent(), CheckFloatOrHalfRepresentation(), clang::CheckFloatOrHalfRepresentation(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), CheckIncrementDecrementOperand(), clang::SemaObjC::checkInitMethod(), clang::CheckInvalidVLENandLMUL(), checkObjCPointerTypesForAssignment(), clang::checkOpenCLEnqueueVariadicArgs(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverridingFunctionAttributes(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckParameterPacksForExpansion(), clang::SemaRISCV::checkRVVTypeSupport(), clang::Sema::CheckSizelessVectorConditionalTypes(), checkSizelessVectorShift(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), clang::checkSwiftAsyncErrorBlock(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CheckUnresolvedMemberAccess(), checkVAStartABI(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorConditionalTypes(), commonBuildCXXMemberOrOperatorCall(), commonEmitCXXMemberOrOperatorCall(), compareConversionFunctions(), CompareDerivedToBaseConversions(), completeFunctionType(), CompleteNonViableCandidate(), convertHalfVecBinOp(), clang::ConvertQualTypeToKind(), convertToComplexValue(), clang::Sema::ConvertVectorExpr(), create_std_move_forward(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeduceReturnType(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecArguments(), clang::Sema::DefineDefaultedComparison(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseCallingConvCast(), diagnoseListInit(), clang::ODRDiagsEmitter::diagnoseMismatch(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitComplexPrePostIncDec(), clang::CIRGen::CIRGenFunction::emitComplexToScalarConversion(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CIRGen::CIRGenFunction::emitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr(), clang::CIRGen::CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CIRGen::CIRGenFunction::emitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), emitDestructorsFunction(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitMatrixSubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitPointerToDataMemberBinaryExpr(), clang::CodeGen::CodeGenFunction::EmitPromotedValue(), emitProxyTaskFunction(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedLoad(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedStore(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitUnPromotedValue(), emitWritebackArg(), EvaluateBuiltinClassifyType(), clang::Sema::EvaluateImplicitExceptionSpec(), evaluateLValueAsAllocSize(), clang::exceptionSpecNotKnownYet(), clang::SemaObjC::FindCompositeObjCPointerType(), FindDesignatorMismatch(), clang::Sema::findInheritingConstructor(), findMethodDecl(), findSubobject(), funcHasParameterSizeMangling(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::CXXNewExpr::getAllocatedType(), clang::QualType::getBaseTypeIdentifier(), clang::FunctionDecl::getCallResultType(), clang::CallExpr::getCallReturnType(), getConversionOpReturnTyAsFunction(), clang::CXXConversionDecl::getConversionType(), clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getCorrespondingSignedFixedPointType(), clang::ASTContext::getCorrespondingUnsaturatedType(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getFixedPointIBits(), clang::ASTContext::getFixedPointScale(), clang::Decl::getFunctionType(), clang::CodeGen::CodeGenTypes::GetFunctionTypeForVTable(), clang::ASTContext::getFunctionTypeWithExceptionSpec(), clang::CXXRecordDecl::getLambdaStaticInvoker(), clang::CodeGen::CGCXXABI::getMemberPointerAdjustment(), clang::CXXMethodDecl::getMethodQualifiers(), clang::Sema::getMoreSpecializedTemplate(), getMostInformativeDerivedClassImpl(), clang::UnresolvedMemberExpr::getNamingClass(), clang::OverloadCandidate::getNumParams(), clang::ASTContext::getObjCEncodingForBlock(), clang::ASTContext::getObjCGCAttrKind(), getObjCSubstitutions(), clang::TemplateArgument::getPackExpansionPattern(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::ASTContext::getPointerAuthTypeDiscriminator(), clang::CXXMethodDecl::getRefQualifier(), clang::FunctionDecl::getReturnType(), getRVVEltType(), getSveEltType(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), getUsualDeleteParams(), clang::AtomicExpr::getValueType(), clang::ASTContext::getVectorType(), HandleArmSveVectorBitsTypeAttr(), clang::SemaSwift::handleAsyncAttr(), handleComplexFloatConversion(), handleComplexIntegerToFloatConversion(), clang::CompletionContextHandler::handleDeclaration(), handleFormatArgAttr(), handleFormatAttrCommon(), clang::Sema::HandleFunctionTypeMismatch(), handleIntegerVectorBinOpConversion(), HandleOpenCLAccessAttr(), HandleRISCVRVVVectorBitsTypeAttr(), handleSentinelAttr(), clang::SemaHLSL::handleVectorBinOpConversion(), handleVectorVectorBinOp(), hasDeducedReturnType(), hasDefaultCXXMethodCC(), HasNoThrowOperator(), libc_func_matchers::hasUnsafePrintfStringArg(), libc_func_matchers::hasUnsafeSnprintfBuffer(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::interp::interp__builtin_elementwise_maxmin(), clang::interp::interp__builtin_elementwise_triop(), clang::interp::interp__builtin_elementwise_triop_fp(), clang::CXXMethodDecl::isConst(), clang::CodeGen::CodeGenFunction::IsConstructorDelegationValid(), clang::CIRGen::CIRGenFunction::isConstructorDelegationValid(), clang::CXXConstructorDecl::isConvertingConstructor(), isDesignatorAtObjectEnd(), isNoexcept(), clang::SemaOpenMP::isOpenMPCapturedByRef(), clang::Sema::IsPointerConversion(), clang::ento::cocoa::isRefType(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isStdBuiltin(), IsStructurallyEquivalent(), isSwiftAsyncCallee(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), clang::CXXMethodDecl::isVolatile(), LookupMethodInReceiverType(), clang::Sema::LookupParsedName(), lookupPromiseType(), clang::Sema::LookupTemplateName(), clang::MangleContext::mangleName(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeFunctionTypes(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PrepareScalarCast(), clang::Sema::prepareVectorSplat(), PrintFloatingLiteral(), clang::APValue::printPretty(), ProcessAPINotes(), clang::Sema::ResolveExceptionSpec(), setObjCGCLValueClass(), clang::CXXNewExpr::shouldNullCheckAllocation(), shouldSkipNotingLambdaConversionDecl(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::ObjCObjectPointerType::stripObjCKindOfTypeAndQuals(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), tryEmitSpecializedAllocInit(), tryGCCVectorConvertAndSplat(), TryListConversion(), TryReferenceInit(), TryReferenceInitialization(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitConvertVectorExpr(), clang::ASTDeclReader::VisitFunctionDecl(), clang::ento::ExprEngine::VisitOffsetOfExpr(), clang::interp::Compiler< Emitter >::VisitShuffleVectorExpr(), and clang::interp::Compiler< Emitter >::VisitVectorBinOp().
|
inline |
A variant of castAs<> for array type which silently discards qualifiers from the outermost type.
Definition at line 9174 of file TypeBase.h.
References clang::cast(), castAsArrayTypeUnsafe(), getUnqualifiedDesugaredType(), and clang::isa().
Referenced by castAsArrayTypeUnsafe(), CheckEvaluationResult(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), FindDesignatorMismatch(), getArrayIndexingBound(), clang::QualType::getBaseTypeIdentifier(), getCoreType(), and clang::APValue::printPretty().
Return this type's canonical type cast to the specified type.
If the type is not canonically that specified type, the behaviour is undefined.
Definition at line 2928 of file TypeBase.h.
References clang::cast(), and clang::T.
Referenced by clang::Sema::checkEnumArithmeticConversions(), clang::CodeGen::CodeGenFunction::EmitCMSEClearRecord(), clang::CodeGen::CodeGenFunction::EmitCMSEClearRecord(), and findSubobject().
|
inline |
Definition at line 36 of file Type.h.
References clang::cast().
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::CheckMemberOperatorAccess(), clang::CodeGen::HLSLBufferLayoutBuilder::createLayoutType(), EmitBaseInitializer(), clang::CIRGen::CIRGenFunction::emitBaseInitializer(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CIRGen::CIRGenFunction::emitCastLValue(), EmitNullConstant(), clang::Sema::FindAllocationFunctions(), FindConversionForRefInit(), clang::Expr::getBestDynamicClassType(), isIncompleteType(), isInitializerOfDynamicClass(), isInitializerOfDynamicClass(), clang::InitializationSequence::Perform(), clang::Sema::RequireLiteralType(), clang::Expr::skipRValueSubobjectAdjustments(), TryConstructorInitialization(), clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryListInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
|
inline |
Definition at line 59 of file Type.h.
References clang::cast().
Referenced by clang::Sema::ActOnFinishSwitchStmt(), checkArithmeticOrEnumeralThreeWayCompare(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CIRGen::CIRGenTypes::convertType(), clang::Sema::DiagnoseAssignmentEnum(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), isIncompleteType(), isLayoutCompatible(), clang::Sema::PerformImplicitConversion(), TryListInitialization(), TryStaticCast(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
|
inline |
Definition at line 2947 of file TypeBase.h.
References getAsNonAliasTemplateSpecializationType().
|
inline |
Definition at line 48 of file Type.h.
References clang::cast().
Referenced by buildDeclareReductionRef(), CheckEvaluationResult(), checkIsValidOpenCLKernelParameter(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::InitializationSequence::Diagnose(), clang::CIRGen::CIRGenFunction::emitCallArg(), emitDependData(), emitDestructorsFunction(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), emitProxyTaskFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTaskPrivateMappingFunction(), clang::CastExpr::getTargetFieldForToUnionCast(), clang::Expr::isConstantInitializer(), isIdiomaticBraceElisionEntity(), isIncompleteType(), isLayoutCompatible(), and clang::APValue::printPretty().
|
inline |
Definition at line 71 of file Type.h.
References clang::cast().
Referenced by clang::Sema::computeDeclContext().
|
inline |
Whether this type is an error type.
Definition at line 2776 of file TypeBase.h.
References getDependence().
Referenced by clang::Sema::BuildReturnStmt(), clang::Sema::CheckFieldDecl(), and clang::Sema::MergeVarDeclTypes().
|
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 2405 of file TypeBase.h.
References getDependence().
Referenced by clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnPackIndexingType(), buildDeclareReductionRef(), buildUserDefinedMapperRef(), clang::Sema::CheckPackExpansion(), clang::Sema::containsUnexpandedParameterPacks(), clang::Sema::CreateGenericSelectionExpr(), clang::Sema::DiagnoseUnexpandedParameterPack(), getLambdaType(), clang::ASTContext::getPackExpansionType(), handleAlignedAttr(), hasUserDefinedMapper(), clang::MatrixType::MatrixType(), clang::Sema::SubstParmVarDecl(), and clang::TreeTransform< Derived >::TransformFunctionTypeParams().
LLVM_DUMP_METHOD void Type::dump | ( | ) | const |
Definition at line 196 of file ASTDumper.cpp.
References clang::ExtQualsTypeCommonBase::QualType.
LLVM_DUMP_METHOD void Type::dump | ( | llvm::raw_ostream & | OS, |
const ASTContext & | Context ) const |
Definition at line 198 of file ASTDumper.cpp.
References ASTContext, and clang::ExtQualsTypeCommonBase::QualType.
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 471 of file Type.cpp.
References clang::cast(), getUnqualifiedDesugaredType(), clang::isa(), and Type().
Referenced by clang::Sema::BuildExpressionFromDeclTemplateArgument(), CheckNullabilityTypeSpecifier(), clang::SemaSYCL::deepTypeCheckForDevice(), DiagnoseLocalRegisterBinding(), getResourceArrayHandleType(), isHLSLIntangibleType(), and isHLSLResourceRecordArray().
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.
If you are interested only in the canonical properties of this type, consider using getAsCanonical instead, as that is much faster.
Definition at line 9098 of file TypeBase.h.
References clang::cast(), getAs(), getUnqualifiedDesugaredType(), clang::isa(), and clang::T.
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(), actOnOMPReductionKindClause(), clang::SemaObjC::ActOnPropertyImplDecl(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddConversionCandidate(), clang::Sema::AddKnownFunctionAttributes(), clang::Sema::AddModeAttr(), AdjustFunctionParmAndArgTypesForDeduction(), clang::ASTContext::adjustFunctionResultType(), AdjustingCFIUncheckedCallee(), adjustVectorType(), AnalyzeCompoundAssignment(), appendFunctionType(), appendType(), clang::applyObjCTypeArgs(), clang::ASTContext::areComparableObjCPointerTypes(), clang::ASTContext::areCompatibleRVVTypes(), clang::SemaARM::areCompatibleSveTypes(), clang::ASTContext::areLaxCompatibleRVVTypes(), clang::SemaARM::areLaxCompatibleSveTypes(), clang::Sema::areMatrixTypesOfTheSameDimension(), clang::Sema::areMultiversionVariantFunctionsCompatible(), clang::ASTDeclReader::attachPreviousDeclImpl(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallToObjectOfClassType(), clang::SemaObjC::BuildClassMessage(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclRefExpr(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildFieldReferenceExpr(), clang::SemaObjC::BuildInstanceMessage(), clang::Sema::BuildMatrixType(), clang::Sema::BuildMemberExpr(), clang::SemaObjC::BuildObjCAtThrowStmt(), clang::SemaObjC::BuildObjCBoxedExpr(), clang::SemaObjC::BuildObjCDictionaryLiteral(), clang::Sema::BuildQualifiedType(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildVectorType(), BuiltinDumpStruct(), BuiltinInvoke(), clang::Sema::BuiltinIsBaseOf(), BuiltinIsWithinLifetime(), BuiltinMaskedLoad(), BuiltinMaskedStore(), BuiltinOverflow(), clang::SemaWasm::BuiltinWasmTestFunctionPointerSignature(), canAssignObjCObjectTypes(), clang::Sema::canCalleeThrow(), clang::SemaHLSL::CanPerformAggregateSplatCast(), CanThrow(), clang::FunctionProtoType::canThrow(), captureInBlock(), captureInLambda(), castVector(), CheckAnyScalarOrVector(), checkArithmeticIncompletePointerType(), checkArithmeticOpPointerOperand(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::SemaObjC::checkArrayLiteral(), CheckArrow(), clang::Sema::CheckAssignmentConstraints(), clang::SemaHLSL::CheckBuiltinFunctionCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), clang::Sema::CheckCastAlign(), clang::checkCollectionLiteralElement(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckCompleteDecompositionDeclaration(), checkConditionalPointerCompatibility(), clang::SemaObjC::CheckConversionToObjCLiteral(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDestructorDeclarator(), clang::SemaObjC::checkDictionaryLiteral(), clang::Sema::CheckEquivalentExceptionSpec(), CheckEvaluationResult(), clang::Sema::CheckExceptionSpecSubset(), CheckFallThroughForBody(), clang::Sema::CheckFloatComparison(), checkFoundationAPI(), checkFunParamsAreScopedLockable(), clang::checkGenericCastToPtr(), CheckIdentityFieldAssignment(), clang::Sema::CheckImplicitConversion(), CheckIncrementDecrementOperand(), CheckIndirectionOperand(), checkIsValidOpenCLKernelParameter(), clang::Sema::CheckLiteralOperatorDeclaration(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckMain(), checkMathBuiltinElementType(), clang::Sema::CheckMatrixElementwiseOperands(), clang::Sema::CheckMatrixMultiplyOperands(), clang::Sema::CheckMemberPointerConversion(), clang::SemaObjC::CheckMessageArgumentTypes(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckNoDoubleVectors(), CheckNullabilityTypeSpecifier(), clang::SemaObjC::CheckObjCARCUnavailableWeakConversion(), clang::SemaObjC::CheckObjCConversion(), clang::SemaObjC::CheckObjCForCollectionOperand(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), clang::checkPipePacketType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), CheckRelatedResultTypeCompatibility(), clang::Sema::CheckRemainderOperands(), CheckResourceHandle(), CheckScalarOrVector(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSizelessVectorCompareOperands(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), clang::SemaARM::CheckSMEFunctionDefAttributes(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), clang::Sema::CheckSubtractionOperands(), clang::checkSwiftAsyncErrorBlock(), CheckTautologicalComparison(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentIsCompatibleWithParameter(), checkTypedefTypeForCapability(), clang::Sema::checkTypeSupport(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), CheckUnsignedIntVecRepresentation(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorLogicalOperands(), clang::Sema::CheckVectorOperands(), checkVectorResult(), CheckVectorSelect(), checkVectorShift(), CheckWaveActive(), clang::CodeGen::DefaultABIInfo::classifyArgumentType(), classifyCapability(), clang::CodeGen::DefaultABIInfo::classifyReturnType(), clang::SemaCodeCompletion::CodeCompleteMemberReferenceExpr(), CollectVRQualifiers(), CompareDerivedToBaseConversions(), CompareStandardConversionSequences(), CompleteNonViableCandidate(), clang::PredefinedExpr::ComputeName(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::ConvertQualTypeToKind(), ConvertTypeToDiagnosticString(), convertVector(), create_call_once(), create_dispatch_once(), create_OSAtomicCompareAndSwap(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::interp::Program::createDescriptor(), CreateFunctionRefExpr(), clang::Sema::DeclClonePragmaWeak(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateSpecArguments(), clang::Sema::DefaultArgumentPromotion(), clang::desugarForDiagnostic(), DetectPrecisionLossInComplexDivision(), clang::InitializationSequence::Diagnose(), diagnoseBadCast(), DiagnoseBadConversion(), DiagnoseBadTarget(), DiagnoseCastOfObjCSEL(), clang::ODRDiagsEmitter::diagnoseMismatch(), DiagnoseNarrowingInInitList(), clang::SemaObjC::DiagnosePropertyAccessorMismatch(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSentinelCalls(), diagnoseSubMismatchMethodParameters(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAMDGPUDevicePrintfCallExpr(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CIRGen::CIRGenFunction::emitCallee(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CIRGen::ConstantEmitter::emitForMemory(), clang::CIRGen::ConstantEmitter::emitForMemory(), clang::CodeGen::ConstantEmitter::emitForMemory(), clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), EmitHLSLElementwiseCast(), EmitHLSLScalarFlatCast(), clang::CodeGen::CodeGenFunction::EmitLoadOfExtVectorElementLValue(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitLValue(), clang::CIRGen::CIRGenModule::emitNullConstant(), clang::CodeGen::CodeGenFunction::EmitPointerArithmetic(), emitPointerArithmetic(), EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CIRGen::CIRGenFunction::evaluateExprAsBool(), extractPBaseFlags(), clang::Sema::ExtractUnqualifiedFunctionType(), clang::Sema::FindCompositePointerType(), FindConversionForRefInit(), clang::FieldDecl::findCountedByField(), findSubobject(), FixDependencyOfIdExpressionsInLambdaWithDependentObjectParameter(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), FunctionCanThrow(), GeneralizeFunctionType(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::FunctionEffectsRef::get(), getAbsoluteValueArgumentType(), getAs(), getAsComplexIntegerType(), getAsNonAliasTemplateSpecializationType(), getAsObjCInterfacePointerType(), getAsObjCInterfaceType(), getAsObjCQualifiedClassType(), getAsObjCQualifiedIdType(), getAsObjCQualifiedInterfaceType(), GetBaseType(), clang::QualType::getBaseTypeIdentifier(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallReturnType(), clang::FunctionType::getCFIUncheckedCalleeAttr(), clang::ASTContext::getCommentForDecl(), getConversionOpReturnTyAsFunction(), clang::GetCountedByAttrOnIncompletePointee(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::CallEvent::getDeclaredResultType(), getDependentArraySubscriptType(), clang::FunctionDecl::getEllipsisLoc(), GetExprType(), GetFixedPointRank(), getFuchsiaHandleSymbols(), GetFullTypeForDeclarator(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedNestedNameSpecifier(), clang::TypeName::getFullyQualifiedType(), clang::getFunctionExtInfo(), clang::CodeGen::CGDebugInfo::getFunctionType(), clang::Decl::getFunctionType(), clang::CIRGen::CIRGenTypes::getFunctionTypeForVTable(), GetGCAttrTypeForType(), getInlineSpirvType(), clang::ASTContext::getLegacyIntegralTypeEncoding(), clang::CodeGen::CodeGenModule::getMemberFunctionPointerAuthInfo(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::ento::getNullabilityAnnotation(), clang::FunctionDecl::getNumParams(), clang::ASTContext::getObjCObjectType(), getObjCSubstitutions(), getPointeeType(), getPrettyTypeName(), clang::ASTContext::getPromotedIntegerType(), GetReturnType(), clang::extractapi::TypedefUnderlyingTypeResolver::getSymbolReferenceForType(), getTemplateArgsFromVariant(), getTypeExpansion(), clang::ASTContext::getUnconstrainedType(), clang::extractapi::TypedefUnderlyingTypeResolver::getUnderlyingTypeDecl(), clang::Expr::getUnusedResultAttrImpl(), handleAsDoubleBuiltin(), HandleBaseToDerivedCast(), handleCleanupAttr(), handleFormatArgAttr(), handleFunctionTypeAttr(), clang::Sema::HandleFunctionTypeMismatch(), handleGlobalAttr(), handleHlslClip(), handleHlslSplitdouble(), HandleMemberPointerAccess(), handleNonBlockingNonAllocatingTypeAttr(), HandleOpenCLAccessAttr(), clang::SemaObjC::HandlePropertyInClassExtension(), clang::Sema::handlerCanCatch(), clang::SemaHLSL::handleVectorBinOpConversion(), clang::hasArmZAState(), clang::hasArmZT0State(), hasAttr(), clang::FunctionProtoType::hasDependentExceptionSpec(), hasIsEqualMethod(), hasPointeeToToCFIUncheckedCalleeFunctionType(), clang::ASTNodeImporter::hasReturnTypeDeclaredInside(), hasSizedVLAType(), hasTypedefNamed(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ASTNodeImporter::ImportFieldDeclDefinition(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::ASTReader::InitializeContext(), clang::InitializationSequence::InitializeFrom(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::interp::interp__builtin_atomic_lock_free(), is32Or64BitBasicType(), IsAddressSpaceConversion(), isArithmeticArgumentPromotion(), clang::IsArmStreamingFunction(), isAtLeastAsSpecializedAs(), isBlockCompatibleObjCPointerType(), clang::Sema::IsBlockPointerConversion(), isBooleanType(), isCanonicalExceptionSpecification(), IsCFError(), isCFIUncheckedCalleeFunctionType(), clang::ento::cocoa::isCocoaObjectRef(), clang::Sema::IsComplexPromotion(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::sema::isCopyLikeConstructor(), isCountAttributedType(), isDispatchBlock(), clang::isErrorParameter(), clang::Sema::IsFloatingPointPromotion(), clang::CodeGen::CodeGenTypes::isFuncParamTypeConvertible(), clang::Sema::IsFunctionConversion(), isFunctionNoProtoType(), isFunctionPointerType(), isFunctionProtoType(), isFunctionReferenceType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::Sema::IsIntegralPromotion(), clang::Sema::isLaxVectorConversion(), isLiteralType(), isMemberDataPointerType(), isMemberFunctionPointerType(), clang::Sema::IsMemberPointerConversion(), IsNSError(), clang::BinaryOperator::isNullPointerArithmeticExtension(), clang::Expr::isNullPointerConstant(), isObjCClassOrClassKindOfType(), isObjCClassType(), isObjCIdOrObjectKindOfType(), isObjCIdType(), isObjCIndependentClassType(), isObjCIndirectLifetimeType(), isObjCNSObjectType(), clang::Sema::isObjCPointerConversion(), isObjCQualifiedClassType(), isObjCQualifiedIdType(), isObjCSelType(), clang::SemaObjC::isObjCWritebackConversion(), isObjectPointerType(), clang::NonTypeTemplateParmDecl::isPackExpansion(), isPermittedNeonBaseType(), clang::Sema::IsPointerConversion(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), clang::CodeGen::ABIInfo::isPromotableIntegerTypeForABI(), clang::ento::cocoa::isRefType(), isRVVSizelessBuiltinType(), isRVVVLSBuiltinType(), isSafeToConvert(), IsSameCharType(), clang::ASTContext::isSameEntity(), clang::Sema::isSameOrCompatibleFunctionType(), clang::CodeGen::isSIMDVectorType(), isSizelessBuiltinType(), isSmartPtrType(), isSpecificBuiltinType(), IsStandardConversion(), isStdClassTemplate(), isStreamingCompatible(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), isSubstitutedType(), isSVESizelessBuiltinType(), isSveVLSBuiltinType(), isTypedefNameType(), clang::SemaHLSL::IsTypedResourceElementCompatible(), isTypeSubstitutable(), clang::isValidSwiftErrorResultType(), clang::isValidSwiftIndirectResultType(), clang::Sema::isValidVarArgType(), isVector(), IsVectorConversion(), isWebAssemblyExternrefType(), clang::CIRGen::CIRGenTypes::isZeroInitializable(), loadToBegin(), LookupDirect(), clang::Sema::LookupInlineAsmField(), LookupMemberExpr(), LookupMethodInReceiverType(), clang::Sema::LookupParsedName(), clang::Sema::LookupTemplateName(), MarkUsedTemplateParameters(), clang::ast_matchers::matchEachArgumentWithParamTypeImpl(), clang::analyze_format_string::ArgType::matchesArgType(), clang::analyze_format_string::ArgType::matchesType(), maybeAdjustInterfaceForSubscriptingCheck(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclExceptionSpecs(), namedTypeToLengthModifierKind(), needsConversionOfHalfVec(), NoteSurrogateCandidate(), ObjCEnumerationCollection(), clang::ASTContext::ObjCObjectAdoptsQTypeProtocols(), OpenCLConvertScalarsToVectors(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitObjectArgumentInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::DeclarationName::print(), clang::APValue::printPretty(), ProcessAPINotes(), clang::SemaCodeCompletion::ProduceCallSignatureHelp(), clang::ASTContext::QIdProtocolsAdoptObjCObjectProtocols(), clang::TreeTransform< Derived >::RebuildUnresolvedUsingType(), REGISTER_MAP_WITH_PROGRAMSTATE(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFP2Ret(), clang::CodeGen::CodeGenModule::ReturnTypeUsesFPRet(), SetElementTypeAsReturnType(), clang::CodeGen::CodeGenModule::setKCFIType(), ShouldDiagnoseUnusedDecl(), shouldNotPrintDirectly(), ShouldTryAgainWithRedefinitionType(), clang::Expr::skipRValueSubobjectAdjustments(), clang::Sema::SpecialMemberIsTrivial(), clang::CodeGen::CodeGenFunction::StartFunction(), TryAddressSpaceCast(), tryAtomicConversion(), TryConstCast(), TryDeconstructFunctionLike(), clang::Sema::tryExprAsCall(), tryGCCVectorConvertAndSplat(), tryGetFunctionProtoType(), TryLValueToRValueCast(), TryObjectArgumentInitialization(), TryReferenceInit(), TryRefInitWithConversionFunction(), TryReinterpretCast(), TryStaticCast(), TryStaticMemberPointerUpcast(), TryStaticPointerDowncast(), TryStaticReferenceDowncast(), TypeHasMayAlias(), unsupportedTypeConversion(), clang::ASTContext::UnwrapSimilarTypes(), clang::QualType::UseExcessPrecision(), clang::Sema::UsualArithmeticConversions(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitComplexBinOp(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::interp::Compiler< Emitter >::VisitCXXScalarValueInitExpr(), clang::interp::Compiler< Emitter >::VisitExtVectorElementExpr(), clang::ASTNodeTraverser< Derived, NodeDelegateType >::VisitFriendDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), clang::TextNodeDumper::VisitFunctionDecl(), clang::interp::Compiler< Emitter >::VisitImplicitValueInitExpr(), clang::interp::Compiler< Emitter >::visitInitList(), clang::ento::SValExplainer::VisitSymbolicRegion(), clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr(), clang::interp::Compiler< Emitter >::VisitVectorBinOp(), and clang::interp::Compiler< Emitter >::VisitVectorUnaryOperator().
const TypedefType * clang::Type::getAs | ( | ) | const |
This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type.
References getAs().
const TemplateSpecializationType * clang::Type::getAs | ( | ) | const |
const AttributedType * clang::Type::getAs | ( | ) | const |
const BoundsAttributedType * clang::Type::getAs | ( | ) | const |
This will check for a BoundsAttributedType by removing any existing sugar until it reaches an BoundsAttributedType or a non-sugared type.
References getAs().
const CountAttributedType * clang::Type::getAs | ( | ) | const |
This will check for a CountAttributedType by removing any existing sugar until it reaches an CountAttributedType or a non-sugared type.
References getAs().
const TypedefType * clang::Type::getAs | ( | ) | const |
Definition at line 626 of file Type.cpp.
References getAsSugar().
const UsingType * clang::Type::getAs | ( | ) | const |
Definition at line 630 of file Type.cpp.
References getAsSugar().
const TemplateSpecializationType * clang::Type::getAs | ( | ) | const |
Definition at line 634 of file Type.cpp.
References getAsSugar().
const AttributedType * clang::Type::getAs | ( | ) | const |
Definition at line 638 of file Type.cpp.
References getAsSugar().
const BoundsAttributedType * clang::Type::getAs | ( | ) | const |
Definition at line 642 of file Type.cpp.
References getAsSugar().
const CountAttributedType * clang::Type::getAs | ( | ) | const |
Definition at line 646 of file Type.cpp.
References getAsSugar().
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 9115 of file TypeBase.h.
References getAsAdjusted(), clang::isa(), clang::T, and Type().
Referenced by clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), CreateNewFunctionDecl(), and getAsAdjusted().
|
inline |
A variant of getAs<> for array types which silently discards qualifiers from the outermost type.
Definition at line 9151 of file TypeBase.h.
References clang::cast(), getAsArrayTypeUnsafe(), getUnqualifiedDesugaredType(), and clang::isa().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPUsesAllocatorClause(), clang::Sema::ActOnSourceLocExpr(), clang::ODRHash::AddStructuralValue(), appendType(), clang::Sema::BuildCXXForRangeStmt(), clang::SemaObjC::BuildObjCEncodeExpression(), buildUserDefinedMapperRef(), BuiltinLaunder(), canInitializeArrayWithEmbedDataString(), clang::interp::CheckFieldsInitialized(), clang::interp::EvaluationResult::checkFullyInitialized(), CheckStringInit(), clang::interp::Program::createDescriptor(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), getAsArrayTypeUnsafe(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getConstantArrayElementCount(), getDependentArraySubscriptType(), getDesignatedType(), getTypeString(), hasSizedVLAType(), clang::InitListExpr::isStringLiteralInit(), TypeHasMayAlias(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().
If this type is canonically the specified type, return its canonical type cast to that specified type, otherwise returns null.
Definition at line 2921 of file TypeBase.h.
References clang::T.
Referenced by appendType(), clang::Sema::BuiltinIsBaseOf(), CheckAggExprForMemSetUse(), CheckDeductionConsistency(), checkEnumTypesInSwitchStmt(), checkHLSLSpirvTypeOperand(), clang::Sema::checkIllFormedTrivialABIStruct(), checkLiteralOperatorTemplateParameterList(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseRecursiveConstFields(), DiagnoseRecursiveConstFields(), doesUsualArrayDeleteWantSize(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), EvaluateBinaryTypeTrait(), GetNumNonZeroBytesInInit(), getObjCBridgeAttr(), getPointeeCXXRecordDecl(), getRecordDecl(), clang::interp::Compiler< Emitter >::getRecordTy(), isAlignValT(), isCARCBridgableType(), clang::SemaObjC::isCFStringType(), isClassType(), isComplexType(), isCUDADeviceBuiltinSurfaceType(), isCUDADeviceBuiltinTextureType(), clang::ParmVarDecl::isDestroyedInCallee(), clang::CodeGen::isEmptyField(), isIntegerLikeType(), isInterfaceType(), clang::RecordDecl::isOrContainsUnion(), isScopedEnumeralType(), isStdByteType(), isStructureOrClassType(), isStructureType(), isStructureTypeWithFlexibleArrayMember(), isSubstitutedType(), isTemplateArgumentTemplateParameter(), isUnionType(), IsUserDefinedConversion(), isVoidPointerType(), clang::FieldDecl::isZeroSize(), clang::Sema::LookupInlineAsmField(), clang::CodeGen::CodeGenModule::MayDropFunctionReturn(), clang::ASTContext::mergeTypes(), printCXXConstructorDestructorName(), setUsedBits(), TryClassUnification(), and clang::RetainTypeChecker::visitTypedef().
const ComplexType * Type::getAsComplexIntegerType | ( | ) | const |
Definition at line 745 of file Type.cpp.
References Complex, and getAs().
Referenced by handleComplexIntConversion(), and isComplexIntegerType().
|
inline |
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 26 of file Type.h.
References clang::cast(), and clang::isa().
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXTryBlock(), clang::SemaOpenACC::ActOnRoutineName(), clang::SemaOpenACC::ActOnVariableInit(), clang::Sema::AddMemberOperatorCandidates(), AddTypedNameChunk(), clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::Sema::AttachBaseSpecifiers(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildCXXConstructExpr(), clang::Sema::BuildExceptionDeclaration(), BuildNonArrayForRange(), BuiltinInvoke(), calculateOffset(), clang::interp::CallVirt(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::canThrow(), clang::canVarDeclThrow(), clang::Sema::CaptureHasSideEffects(), clang::Sema::CheckBaseClassAccess(), clang::Sema::CheckCompleteDecompositionDeclaration(), clang::Sema::CheckCompleteVariableDeclaration(), CheckCXX98CompatAccessibleCopy(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckDestructor(), checkDestructorReference(), clang::CheckEquivalentExceptionSpecImpl(), clang::Sema::CheckFieldDecl(), checkForConsumableClass(), checkMoveAssignmentForRepeatedMove(), clang::Sema::CheckNonDependentConversions(), clang::Sema::CheckNontrivialField(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerToMemberOperands(), checkTrivialClassMembers(), checkTrivialSubobjectCall(), checkTupleLikeDecomposition(), CheckUnaryTypeTraitTypeCompleteness(), collectSmartPtrFieldRegions(), CollectVRQualifiers(), computeBlockInfo(), clang::dataflow::copyRecord(), create_call_once(), clang::Sema::CreateBuiltinBinOp(), createFieldForHostLayoutStruct(), clang::ConstructionContext::createFromLayers(), clang::TypeName::createNestedNameSpecifierForScopeOf(), CXXRecordMembersNamed(), DeduceTemplateArgumentsByTypeMatch(), DeduceTemplateBases(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), diagnoseBadCast(), DiagnoseReinterpretUpDownCast(), DiagnoseTypeAwareAllocators(), clang::Sema::DiagnoseTypeTraitDetails(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CIRGen::CIRGenFunction::emitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitCXXConstructLValue(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CIRGen::CIRGenFunction::emitCXXDestructorCall(), EmitDeclDestroy(), EmitDestroyingObjectDelete(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EmitNullInitialization(), clang::CIRGen::CIRGenFunction::emitNullInitialization(), EmitObjectDelete(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), clang::ento::StoreManager::evalBaseToDerived(), EvaluateUnaryTypeTrait(), FieldHasTrivialDestructorBody(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindCompositePointerType(), findDeleteForPromise(), findSubobject(), clang::NestedNameSpecifier::getAsRecordDecl(), getBaseAlignmentAndOffsetFromPtr(), clang::ASTContext::getCommentForDecl(), getConstructedRegion(), getContainedDynamicClass(), getDerivedToBaseAlignmentAndOffset(), clang::CFGImplicitDtor::getDestructorDecl(), clang::Sema::getDestructorName(), clang::dataflow::getFieldsFromClassHierarchy(), clang::LambdaExpr::getLambdaClass(), clang::ento::ProgramState::getLValue(), clang::CodeGen::CodeGenModule::getMinimumObjectSize(), getNoteTag(), getOpenCLKernelParameterType(), clang::CodeGen::CodeGenFunction::getOverlapForFieldInit(), clang::interp::Context::getOverridingFunction(), getPointeeCXXRecordDecl(), getPrettyTypeName(), clang::interp::GetPtrDerivedPop(), clang::CXXMemberCallExpr::getRecordDecl(), clang::ento::BlockCall::getRuntimeDefinition(), getTupleLikeElementType(), getUnionInitName(), HandleBaseToDerivedCast(), HandleLValueBase(), HandleLValueBasePath(), HandleMemberPointerAccess(), hasAnyVptr(), hasNonTrivialConstructorCall(), hasTrivialABIAttr(), clang::Sema::inferGslPointerAttribute(), clang::SemaCUDA::inferTargetForImplicitSpecialMember(), clang::interp::InterpretOffsetOf(), clang::CXXDynamicCastExpr::isAlwaysNull(), isAttributedCoroAwaitElidable(), isAutoCastType(), isConstNotMutableType(), isConsumableType(), clang::CFGCXXRecordTypedCall::isCXXRecordTypedCall(), clang::Sema::IsCXXReplaceableType(), clang::Sema::IsCXXTriviallyRelocatableType(), clang::Sema::IsDerivedFrom(), clang::Sema::IsDerivedFrom(), isDestroyingDeleteT(), isInvalidConstantBufferLeafElementType(), clang::ento::iterator::isIteratorType(), clang::ento::RetainSummaryManager::isKnownSmartPointer(), clang::QualType::isNonConstantStorage(), isNothrowT(), clang::SemaOpenMP::isOpenMPPrivateDecl(), isOSObjectRelated(), clang::Sema::IsPointerInterconvertibleBaseOf(), isPointerToObject(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), clang::FieldDecl::isPotentiallyOverlapping(), clang::sema::isRecordWithAttr(), isRvalueByValueRecordWithSmartPtr(), isStdBasicOstream(), clang::ento::smartptr::isStdSmartPtr(), isStdSmartPtr(), isStructuralType(), clang::dataflow::isSupportedOptionalType(), isTriviallyEqualityComparableType(), IsTriviallyRelocatableType(), clang::QualType::isTrivialType(), isTupleLike(), clang::Expr::isUnusedResultAWarning(), isValidBaseClass(), clang::isValidSubjectOfOSAttribute(), clang::Sema::isValidVarArgType(), clang::CodeGen::CodeGenFunction::isVptrCheckRequired(), LeastDerivedClassWithSameLayout(), clang::ComparisonCategories::lookupInfoForType(), lookupPromiseType(), mapConsumableAttrState(), MarkFieldDestructorReferenced(), clang::CIRGen::mayDropFunctionReturn(), NoteIndirectBases(), PerformConstructorInitialization(), PerformReturnAdjustment(), print_elem(), print_initializer(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::SemaCodeCompletion::ProduceCallSignatureHelp(), pushTemporaryCleanup(), pushTemporaryCleanup(), recoverFromMSUnqualifiedLookup(), regionMatchesCXXRecordType(), requiresImplicitBufferLayoutStructure(), clang::CXXRecordDecl::setBases(), shouldAddReversedEqEq(), clang::SemaOpenMP::tryCaptureOpenMPLambdas(), TryOrBuildParenListInitialization(), TypeRequiresBuiltinLaunderImp(), clang::dataflow::UncheckedOptionalAccessModel::UncheckedOptionalAccessModel(), usesMultipleInheritanceModel(), clang::Value::Value(), clang::UsedDeclVisitor< DeferredDiagnosticsEmitter >::VisitCXXDeleteExpr(), clang::ento::ExprEngine::VisitCXXDestructor(), and warnAboutAmbiguousFunction().
|
inline |
Retrieves the EnumDecl this type refers to.
Definition at line 53 of file Type.h.
References clang::EnumDecl::getDefinitionOrSelf().
Referenced by __clang_Interpreter_SetValueNoAlloc(), clang::Sema::ActOnUsingEnumDeclaration(), AnalyzeBitFieldAssignment(), BuildExpressionFromIntegralTemplateArgumentValue(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckTemplateArgument(), clang::CodeGen::DefaultABIInfo::classifyArgumentType(), clang::CodeGen::DefaultABIInfo::classifyReturnType(), clang::ConvertQualTypeToKind(), findEnumForBlockReturn(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), getFixedEnumPromtion(), clang::StandardConversionSequence::getNarrowingKind(), clang::ASTContext::getPromotedIntegerType(), getRangeForType(), hasBooleanRepresentation(), clang::Sema::IgnoredValueConversions(), clang::Sema::IsIntegralPromotion(), isSignedIntegerOrEnumerationType(), isSignedIntegerType(), isUnsignedIntegerOrEnumerationType(), isUnsignedIntegerType(), clang::analyze_format_string::ArgType::matchesType(), and clang::ASTContext::mergeFunctionTypes().
const TemplateSpecializationType * Type::getAsNonAliasTemplateSpecializationType | ( | ) | const |
Look through sugar for an instance of TemplateSpecializationType which is not a type alias, or null if there is no such type.
This is used when you want as-written template arguments or the template name for a class template specialization.
Definition at line 1921 of file Type.cpp.
References getAs().
Referenced by castAsNonAliasTemplateSpecializationType(), DeduceTemplateSpecArguments(), and isStdClassTemplate().
const ObjCObjectPointerType * Type::getAsObjCInterfacePointerType | ( | ) | const |
Definition at line 1901 of file Type.cpp.
References getAs().
Referenced by clang::SemaObjC::BuildInstanceMessage(), CheckObjCBridgeNSCast(), clang::SemaCodeCompletion::CodeCompleteMemberReferenceExpr(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), clang::CodeGen::CodeGenFunction::EmitObjCCollectionLiteral(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), and clang::SemaObjC::SelectorsForTypoCorrection().
const ObjCObjectType * Type::getAsObjCInterfaceType | ( | ) | const |
Definition at line 1893 of file Type.cpp.
References getAs().
Referenced by acceptsObjCTypeParams(), and getBaseMessageSendResultType().
const ObjCObjectPointerType * Type::getAsObjCQualifiedClassType | ( | ) | const |
Definition at line 1883 of file Type.cpp.
References getAs().
Referenced by clang::SemaObjC::BuildInstanceMessage().
const ObjCObjectPointerType * Type::getAsObjCQualifiedIdType | ( | ) | const |
Definition at line 1873 of file Type.cpp.
References getAs().
Referenced by clang::SemaObjC::BuildInstanceMessage(), and clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage().
const ObjCObjectType * Type::getAsObjCQualifiedInterfaceType | ( | ) | const |
Definition at line 1859 of file Type.cpp.
References getAs(), and clang::T.
Referenced by isObjCQualifiedInterfaceType().
|
inline |
Definition at line 8860 of file TypeBase.h.
References getAsPlaceholderType().
Referenced by clang::Sema::BuildBinOp(), clang::Sema::BuildUnaryOp(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckPlaceholderExpr(), checkPlaceholderForOverload(), clang::Sema::DefaultVariadicArgumentPromotion(), getAsPlaceholderType(), and clang::isValidPreserveFieldInfoArg().
|
inline |
Retrieves the RecordDecl this type refers to.
Definition at line 41 of file Type.h.
References clang::cast().
Referenced by clang::Sema::ActOnFields(), clang::SemaObjC::ActOnPropertyImplDecl(), BitsContainNoUserData(), clang::Sema::BuildBuiltinOffsetOf(), BuiltinDumpStruct(), clang::interp::CallVirt(), CheckC23ConstexprVarType(), clang::Sema::CheckCoroutineWrapper(), clang::SemaOpenACC::CheckReductionVar(), clang::Sema::CheckSpecifiedExceptionType(), classifyCapability(), clang::CodeGen::classifyReturnType(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), create_call_once(), clang::interp::Program::createDescriptor(), clang::SemaSYCL::deepTypeCheckForDevice(), clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), DiagnoseVariableSizedIvars(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), emitReadOnlyPlacementAttrWarning(), getConstField(), getFieldOffsetInBits(), clang::dataflow::getFieldsFromClassHierarchy(), clang::VarDecl::getFlexibleArrayInitChars(), getGEPIndicesToField(), getInlineSpirvType(), getRecordDecl(), getTypeAlignIfRequired(), getTypeExpansion(), hasBPFPreserveStaticOffset(), clang::VarDecl::hasFlexibleArrayInit(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ASTNodeImporter::ImportFieldDeclDefinition(), clang::InitializationSequence::InitializeFrom(), clang::interp::InterpretOffsetOf(), clang::QualType::isCXX11PODType(), clang::CIRGen::isEmptyRecordForLayout(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isLiteralType(), isObjCBoxableRecordType(), clang::CodeGen::isRecordWithSIMDVectorType(), isSafeToConvert(), isStandardLayoutType(), clang::ento::tagged_union_modeling::isStdType(), isTrackedVar(), isTriviallyCopyableTypeImpl(), IsTriviallyRelocatableType(), isValidBaseType(), isVarDeclStrongDefinition(), isVarDeclStrongDefinition(), isVariableCapturable(), clang::CIRGen::CIRGenTypes::isZeroInitializable(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::SemaCodeCompletion::ProduceConstructorSignatureHelp(), clang::sema::shouldTrackFirstArgumentForConstructor(), threadSafetyCheckIsPointer(), clang::interp::Pointer::toAPValue(), clang::interp::Compiler< Emitter >::VisitCXXUuidofExpr(), clang::interp::Compiler< Emitter >::VisitImplicitValueInitExpr(), and clang::ASTNodeImporter::VisitTypedefNameDecl().
const RecordType * Type::getAsStructureType | ( | ) | const |
Definition at line 768 of file Type.cpp.
References clang::cast(), and getUnqualifiedDesugaredType().
|
inline |
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 65 of file Type.h.
References clang::TagDecl::getDefinitionOrSelf().
Referenced by clang::Expr::getUnusedResultAttrImpl(), getUuidAttrOfType(), isStdClassTemplate(), clang::extractapi::impl::ExtractAPIVisitorBase< std::conditional_t< std::is_same_v< Derived, void >, ExtractAPIVisitor<>, Derived > >::maybeMergeWithAnonymousTag(), TypeHasMayAlias(), and clang::Sema::warnOnCTypeHiddenInCPlusPlus().
const RecordType * Type::getAsUnionType | ( | ) | const |
NOTE: getAs*ArrayType are methods on ASTContext.
Definition at line 787 of file Type.cpp.
References clang::cast(), and getUnqualifiedDesugaredType().
Referenced by CheckNonNullExpr(), GeneralizeTransparentUnion(), IsTransparentUnionStandardConversion(), and clang::CodeGen::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 9051 of file TypeBase.h.
References clang::ast_matchers::arrayType, getBaseElementTypeUnsafe(), Type(), and clang::ast_matchers::type.
Referenced by clang::Sema::BuildCXXConstructExpr(), clang::canVarDeclThrow(), clang::Sema::checkIllFormedTrivialABIStruct(), CheckUnaryTypeTraitTypeCompleteness(), clang::Sema::DiagnoseUnusedButSetDecl(), doesUsualArrayDeleteWantSize(), clang::CodeGen::CGOpenMPRuntime::emitTargetGlobalVariable(), clang::FunctionEffectsRef::get(), getBaseElementTypeUnsafe(), getUuidAttrOfType(), clang::ASTNodeImporter::ImportFieldDeclDefinition(), InitializationHasSideEffects(), clang::QualType::isCXX11PODType(), isLiteralType(), isStandardLayoutType(), clang::CodeGen::CGCXXABI::mayNeedDestruction(), print_elem(), pushTemporaryCleanup(), and pushTemporaryCleanup().
|
inline |
Definition at line 3119 of file TypeBase.h.
References clang::ExtQualsTypeCommonBase::QualType.
Referenced by addAssociatedClassesAndNamespaces(), canHaveNullability(), clang::checkPipePacketType(), DeduceTemplateArgumentsByTypeMatch(), clang::MemberPointerType::desugar(), clang::PredefinedSugarType::desugar(), getCanonicalTypeUnqualified(), getConstantArrayExtents(), clang::diff::SyntaxTree::Impl::getDeclValue(), clang::ASTContext::getObjCEncodingForBlock(), clang::ASTContext::getObjCEncodingForFunctionDecl(), clang::ASTContext::getObjCEncodingForMethodDecl(), clang::ASTContext::getObjCGCAttrKind(), clang::analyze_format_string::ArgType::getRepresentativeType(), clang::LocInfoType::getType(), isLinkageValid(), isLiteralType(), and isObjCARCImplicitlyUnretainedType().
|
inline |
Definition at line 215 of file CanonicalType.h.
References clang::CanQual< Type >::CreateUnsafe(), and getCanonicalTypeInternal().
Referenced by adjustReturnValue(), clang::CIRGen::CIRGenTypes::arrangeCXXMethodCall(), clang::CIRGen::CIRGenTypes::arrangeCXXMethodDeclaration(), clang::CIRGen::CIRGenTypes::arrangeCXXMethodType(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodType(), arrangeFreeFunctionLikeCall(), clang::CIRGen::CIRGenTypes::arrangeFunctionDeclaration(), clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), clang::Sema::checkExceptionSpecification(), evaluateCDTSize(), findDirectBaseWithType(), clang::ASTContext::getCanonicalTypeDeclType(), GetFormalType(), getFormalType(), GetReturnType(), clang::Sema::HandleFunctionTypeMismatch(), clang::SemaHLSL::handleInitialization(), clang::Sema::IsPointerInterconvertibleBaseOf(), isSmartPtrType(), setCUDAKernelCallingConvention(), and clang::dataflow::transferSmartPointerLikeCachedDeref().
|
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 2899 of file TypeBase.h.
References getContainedDeducedType().
Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCForCollectionStmt(), clang::Sema::BuildReturnStmt(), clang::NonTypeTemplateParmDecl::Create(), clang::Sema::DeduceAutoType(), clang::CodeGen::CGDebugInfo::EmitUsingDecl(), clang::ASTContext::getUnconstrainedType(), clang::NonTypeTemplateParmDecl::hasPlaceholderTypeConstraint(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::MergeFunctionDecl(), 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 2056 of file Type.cpp.
Referenced by clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::CheckPackExpansion(), clang::Sema::CheckTemplateArgument(), clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::deduceVarTypeFromInitializer(), getContainedAutoType(), isUndeducedType(), LookupDirect(), and clang::ASTDeclWriter::VisitVarDecl().
|
inline |
Definition at line 2771 of file TypeBase.h.
References TypeBits.
Referenced by addDependence(), clang::AdjustedType::AdjustedType(), clang::ArrayType::ArrayType(), clang::AtomicType::ASTContext, clang::BlockPointerType::ASTContext, clang::ComplexType::ASTContext, clang::FunctionNoProtoType::ASTContext, clang::MacroQualifiedType::ASTContext, clang::MemberPointerType::ASTContext, clang::ObjCObjectPointerType::ASTContext, clang::ParenType::ASTContext, clang::PipeType::ASTContext, clang::PointerType::ASTContext, clang::BoundsAttributedType::BoundsAttributedType(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), containsErrors(), containsUnexpandedParameterPack(), clang::DependentBitIntType::DependentBitIntType(), getTemplateSpecializationTypeDependence(), isDependentType(), isInstantiationDependentType(), isVariablyModifiedType(), clang::MatrixType::MatrixType(), clang::ReferenceType::ReferenceType(), clang::TypeOfExprType::TypeOfExprType(), and clang::VectorType::VectorType().
Linkage Type::getLinkage | ( | ) | const |
Determine the linkage of this type.
Definition at line 4899 of file Type.cpp.
References clang::TypePropertyCache< Private >::ensure(), and TypeBits.
Referenced by checkUndefinedButUsed(), getTypeInfoLinkage(), and clang::Sema::isExternalWithNoLinkageType().
LinkageInfo Type::getLinkageAndVisibility | ( | ) | const |
Determine the linkage and visibility of this type.
Definition at line 5018 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 521 of file Type.cpp.
References getTypeClass(), and clang::ExtQualsTypeCommonBase::QualType.
Referenced by QualTypeToString().
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 5022 of file Type.cpp.
References clang::ExtQualsTypeCommonBase::QualType, clang::ExtQualsTypeCommonBase::Type, and Type().
Referenced by clang::SemaObjC::BuildObjCBoxedExpr(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), CheckNonNullExpr(), CheckNullabilityTypeSpecifier(), clang::SemaObjC::CheckObjCPropertyAttributes(), computeConditionalNullability(), clang::Sema::deduceClosureReturnType(), clang::Sema::diagnoseNullableToNonnullConversion(), clang::CodeGen::CodeGenFunction::EmitNullabilityCheck(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), clang::ASTContext::getArrayDecayedType(), clang::SemaObjC::getMessageSendResultType(), clang::ASTContext::hasSameNullabilityTypeQualifier(), mergeParamDeclTypes(), and mergeTypeNullabilityForRedecl().
Qualifiers::ObjCLifetime Type::getObjCARCImplicitLifetime | ( | ) | const |
Return the implicit lifetime for this type, which must not be dependent.
Definition at line 5254 of file Type.cpp.
References isObjCARCImplicitlyUnretainedType(), clang::Qualifiers::OCL_ExplicitNone, and clang::Qualifiers::OCL_Strong.
Referenced by clang::Sema::BuildCXXNew(), clang::SemaObjC::handlePreciseLifetimeAttr(), and clang::tryMakeVariablePseudoStrong().
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 1678 of file Type.cpp.
References ASTContext, castAs(), getAs(), clang::ObjCCategoryDecl::getClassInterface(), clang::ASTContext::getObjCObjectType(), clang::DeclContext::getParentASTContext(), clang::ObjCCategoryDecl::getTypeParamList(), clang::QualType::isNull(), clang::ASTContext::ObjCBuiltinIdTy, and clang::ExtQualsTypeCommonBase::QualType.
Referenced by clang::SemaObjC::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 1909 of file Type.cpp.
References getAsCanonical(), getAsCXXRecordDecl(), getPointeeType(), and clang::ExtQualsTypeCommonBase::QualType.
Referenced by adjustReturnValue(), DiagnoseReinterpretUpDownCast(), emitBadConversionNotes(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::ento::retaincountchecker::RetainCountChecker::errorKindToBugKind(), clang::SourceLocExpr::EvaluateInContext(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), clang::ento::CXXInstanceCall::getDeclForDynamicType(), GetVTablePointer(), HandleDynamicCast(), isOSObjectPtr(), isSetOnReadPtrType(), mangleOverrideDiscrimination(), clang::QualType::mayBeDynamicClass(), clang::QualType::mayBeNotDynamicClass(), regionMatchesCXXRecordType(), and clang::sema::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 9058 of file TypeBase.h.
References getPointeeOrArrayElementType(), Type(), and clang::ast_matchers::type.
Referenced by clang::SemaOpenMP::ActOnOpenMPMessageClause(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), checkIsValidOpenCLKernelParameter(), clang::Sema::DiagnoseAssignmentResult(), getOpenCLKernelParameterType(), getPointeeOrArrayElementType(), handleNonStringAttr(), and clang::InitializationSequence::Perform().
QualType Type::getPointeeType | ( | ) | const |
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
Definition at line 752 of file Type.cpp.
References getAs(), getPointeeType(), and clang::ExtQualsTypeCommonBase::QualType.
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishFunctionBody(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOMPArrayShapingExpr(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPDependClause(), clang::Sema::AddConversionCandidate(), adjustCVQualifiersForCXXThisWithinLambda(), AdjustingCFIUncheckedCallee(), clang::sema::analyzePathForGSLPointer(), clang::ASTContext::AtomicUsesUnsupportedLibcall(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildCallExpr(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildFieldReferenceExpr(), clang::SemaObjC::BuildObjCBoxedExpr(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildQualifiedType(), clang::Sema::BuildResolvedCallExpr(), BuildSimilarlyQualifiedPointerType(), builtinAllocaAddrSpace(), clang::SemaARM::BuiltinARMMemoryTaggingCall(), BuiltinDumpStruct(), BuiltinLaunder(), BuiltinMaskedLoad(), BuiltinMaskedStore(), BuiltinOverflow(), clang::Sema::BuiltinRemovePointer(), BuiltinTriviallyRelocate(), clang::SemaWasm::BuiltinWasmTestFunctionPointerSignature(), clang::interp::CallVirt(), clang::Sema::canCalleeThrow(), CanThrow(), clang::Sema::CaptureHasSideEffects(), captureInBlock(), captureInLambda(), clang::ento::StoreManager::castRegion(), castToBase(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticOpPointerOperand(), CheckArrow(), clang::Sema::CheckAssignmentConstraints(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), checkConditionalPointerCompatibility(), clang::SemaAMDGPU::checkCoopAtomicFunctionCall(), clang::Sema::CheckCountedByAttrOnField(), clang::Sema::CheckCXXThisCapture(), clang::Sema::CheckCXXThrowOperand(), clang::interp::CheckDowncast(), CheckFallThroughForBody(), CheckIndirectionOperand(), clang::Sema::CheckLiteralOperatorDeclaration(), checkMapConflicts(), clang::Sema::CheckNonDependentConversions(), CheckNullabilityTypeSpecifier(), CheckObjCBridgeNSCast(), clang::SemaObjC::CheckObjCConversion(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverridingFunctionReturnType(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPointerToMemberOperands(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubtractionOperands(), CheckSufficientAllocSize(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), classifyCapability(), CollectVRQualifiers(), CompareStandardConversionSequences(), CompleteNonViableCandidate(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), create_call_once(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DeduceReturnType(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::SemaSYCL::deepTypeCheckForDevice(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::hlsl::BuiltinTypeMethodBuilder::dereference(), dereference(), diagnoseArithmeticOnTwoFunctionPointers(), clang::Sema::DiagnoseAssignmentResult(), diagnoseBadCast(), DiagnoseCastOfObjCSEL(), DiagnoseDivisionSizeofPointerOrArray(), clang::SemaSwift::DiagnoseName(), diagnoseOpenCLTypes(), diagnoseStringPlusChar(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::emitAlignmentAssumptionCheck(), clang::CodeGen::CodeGenFunction::EmitArraySectionExpr(), EmitAtomicCmpXchgForMSIntrin(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), emitBadConversionNotes(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallee(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), emitFrexpBuiltin(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::EmitIncompleteCountedByPointeeNotes(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), EmitISOVolatileLoad(), EmitISOVolatileStore(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CIRGen::CIRGenFunction::emitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue(), clang::CIRGen::CIRGenFunction::emitLoadOfReferenceLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), clang::CIRGen::CIRGenFunction::emitMemberExpr(), emitModfBuiltin(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIsaExpr(), clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue(), emitPointerArithmetic(), EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), emitSincosBuiltin(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedLoad(), clang::CodeGen::CodeGenFunction::EmitSVEMaskedStore(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(), clang::ento::StoreManager::evalBaseToDerived(), clang::ento::ExprEngine::evalCall(), EvaluateBuiltinStrLen(), EvaluateCharRangeAsStringImpl(), clang::Sema::FindCompositePointerType(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), GeneralizeType(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), clang::FunctionEffectsRef::get(), getAArch64LS(), getAlignmentAndOffsetFromBinAddOrSub(), getBaseAlignmentAndOffsetFromPtr(), clang::QualType::getBaseTypeIdentifier(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallReturnType(), getCoreType(), clang::GetCountedByAttrOnIncompletePointee(), clang::ento::CXXInstanceCall::getDeclForDynamicType(), GetExplicitObjectExpr(), getFuchsiaHandleSymbols(), clang::TypeName::getFullyQualifiedType(), clang::PointerLikeTypeLoc< Derived, TypeClass, LocalData >::getInnerType(), clang::ento::StoreManager::getLValueElement(), clang::QualType::getNonLValueExprType(), clang::OverloadCandidate::getNumParams(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCQualType(), clang::CXXMemberCallExpr::getObjectType(), getOpenCLKernelParameterType(), clang::interp::Program::getOrCreateDummy(), getPointee2TypeText(), getPointeeCXXRecordDecl(), clang::ento::SymbolicRegion::getPointeeStaticType(), getPointeeType(), clang::getPointeeTypeText(), clang::ASTContext::getPointerAuthTypeDiscriminator(), getPresumedAlignmentOfPointer(), getPrettyTypeName(), clang::CXXMemberCallExpr::getRecordDecl(), clang::ASTContext::getTargetNullPointerValue(), clang::CodeGen::CGCXXABI::getThisAddress(), getUuidAttrOfType(), clang::CodeGen::getVAListElementType(), GetVTablePointer(), HandleBaseToDerivedCast(), clang::consumed::ConsumedStmtVisitor::handleCall(), handleCallbackAttr(), clang::ento::tagged_union_modeling::handleConstructorAndAssignment(), clang::Sema::HandleFunctionTypeMismatch(), HandleMemberPointerAccess(), handleMSPointerTypeQualifierAttr(), handleObjCOwnershipTypeAttr(), clang::Sema::handlerCanCatch(), HandleWebAssemblyFuncrefAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), hasBPFPreserveStaticOffset(), hasIsEqualMethod(), hasNonTrivialConstructorCall(), hasPointeeToToCFIUncheckedCalleeFunctionType(), InitCatchParam(), clang::interp::interp__builtin_atomic_lock_free(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Sema::IsBlockPointerConversion(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), isEffectivelyConstRegion(), clang::isErrorParameter(), isIndirectPointerType(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::Expr::isNullPointerConstant(), clang::Sema::isObjCPointerConversion(), clang::SemaObjC::isObjCWritebackConversion(), isOSObjectRelated(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), isPointerToConst(), isPointerToConst(), isPointerToConst(), isPointerToObject(), isPtrBufferSafe(), isSafeSpanTwoParamConstruct(), isStdStreamVar(), clang::Sema::IsStringLiteralToNonConstPointerConversion(), isSubstitutedType(), isSwiftAsyncCallee(), IsTypeModifiable(), clang::isUnretained(), clang::RetainTypeChecker::isUnretained(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), clang::SemaObjC::isValidOSObjectOutParameter(), clang::isValidSubjectOfOSAttribute(), clang::isValidSwiftContextType(), clang::isValidSwiftErrorResultType(), clang::isValidSwiftIndirectResultType(), isVoidPointerToNonConst(), clang::AtomicExpr::isVolatile(), loadToBegin(), clang::Sema::LookupInlineAsmField(), MakeBinaryAtomicValue(), clang::ast_matchers::matchEachArgumentWithParamTypeImpl(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::MergeVarDeclExceptionSpecs(), needsAmpersandOnTemplateArg(), NoteSurrogateCandidate(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformImplicitObjectArgumentInitialization(), clang::Sema::PerformObjectMemberConversion(), clang::Sema::PerformQualificationConversion(), PerformReturnAdjustment(), clang::Sema::PrepareScalarCast(), clang::APValue::printPretty(), processImplicitMapsWithDefaultMappers(), recoverFromMSUnqualifiedLookup(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::ASTContext::removePtrSizeAddrSpace(), resolveAllocationOverloadInterior(), rewriteBuiltinFunctionDecl(), shouldSkipNotingLambdaConversionDecl(), clang::Sema::tryExprAsCall(), tryGetFunctionProtoType(), TryObjectArgumentInitialization(), TryReinterpretCast(), TryStaticCast(), TryToFixInvalidVariablyModifiedType(), unwrapCastAwayConstnessLevel(), clang::ASTContext::UnwrapSimilarTypes(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::interp::Compiler< Emitter >::VisitCXXReinterpretCastExpr(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), and clang::RetainTypeChecker::visitTypedef().
NestedNameSpecifier Type::getPrefix | ( | ) | const |
If this type represents a qualified-id, this returns its nested name specifier.
For example, for the qualified-id "foo::bar::baz", this returns "foo::bar". Returns null if this type represents an unqualified-id.
Definition at line 1928 of file Type.cpp.
References clang::cast(), and getTypeClass().
Referenced by clang::NestedNameSpecifier::isFullyQualified(), and warnAboutRedundantParens().
QualType Type::getRVVEltType | ( | const ASTContext & | Ctx | ) | const |
Returns the representative type for the element of an RVV builtin type.
This is used to represent fixed-length RVV vectors created with the 'riscv_rvv_vector_bits' type attribute as VectorType.
Definition at line 2678 of file Type.cpp.
References ASTContext, castAs(), clang::ASTContext::BuiltinVectorTypeInfo::ElementType, clang::ASTContext::getBuiltinVectorTypeInfo(), clang::BuiltinType::getKind(), isRVVVLSBuiltinType(), and clang::ExtQualsTypeCommonBase::QualType.
Referenced by clang::ASTContext::areLaxCompatibleRVVTypes(), getSizelessVectorEltType(), and HandleRISCVRVVVectorBitsTypeAttr().
Type::ScalarTypeKind Type::getScalarTypeKind | ( | ) | const |
Given that this is a scalar type, classify it.
Definition at line 2364 of file Type.cpp.
References clang::isa(), isBitIntType(), isScalarType(), STK_BlockPointer, STK_Bool, STK_CPointer, STK_FixedPoint, STK_Floating, STK_FloatingComplex, STK_Integral, STK_IntegralComplex, STK_MemberPointer, STK_ObjCObjectPointer, clang::T, and Type().
Referenced by clang::SemaHLSL::CanPerformScalarCast(), matchTypes(), clang::Sema::PrepareScalarCast(), and clang::Sema::ScalarTypeToBooleanCastKind().
QualType Type::getSizelessVectorEltType | ( | const ASTContext & | Ctx | ) | const |
Returns the representative type for the element of a sizeless vector builtin type.
Definition at line 2635 of file Type.cpp.
References ASTContext, getRVVEltType(), getSveEltType(), isRVVSizelessBuiltinType(), isSizelessVectorType(), isSVESizelessBuiltinType(), and clang::ExtQualsTypeCommonBase::QualType.
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 2647 of file Type.cpp.
References ASTContext, castAs(), clang::ASTContext::BuiltinVectorTypeInfo::ElementType, clang::ASTContext::getBuiltinVectorTypeInfo(), clang::BuiltinType::getKind(), isSveVLSBuiltinType(), clang::ExtQualsTypeCommonBase::QualType, and clang::ASTContext::UnsignedCharTy.
Referenced by clang::SemaARM::areCompatibleSveTypes(), clang::SemaARM::areLaxCompatibleSveTypes(), clang::Sema::CheckImplicitConversion(), clang::Sema::CheckSizelessVectorConditionalTypes(), checkSizelessVectorShift(), clang::Sema::CreateBuiltinArraySubscriptExpr(), getSizelessVectorEltType(), and HandleArmSveVectorBitsTypeAttr().
|
inline |
Definition at line 2385 of file TypeBase.h.
References TypeBits.
Referenced by clang::TypoCorrectionConsumer::addNamespaces(), clang::ASTContext::adjustType(), BuildSimilarlyQualifiedPointerType(), captureVariablyModifiedType(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CIRGen::CIRGenTypes::convertType(), clang::Sema::CreateParsedType(), DeduceTemplateArgumentsByTypeMatch(), clang::desugarForDiagnostic(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::CIRGen::CIRGenFunction::emitVariablyModifiedType(), EvaluateBuiltinClassifyType(), getAsSugar(), clang::QualType::getBaseTypeIdentifier(), getCommonNonSugarTypeNode(), getCommonSugarTypeNode(), clang::Sema::getCopyElisionCandidate(), getLocallyUnqualifiedSingleStepDesugaredType(), getPrefix(), clang::TypeLoc::getTypeLocClass(), clang::UnqualTypeLoc::getTypeLocClass(), getUnqualifiedDesugaredType(), clang::ASTContext::getVariableArrayDecayedType(), clang::QualType::isCXX98PODType(), isLayoutCompatible(), isSpecifierType(), IsStructurallyEquivalent(), isSubstitutedType(), clang::ASTContext::mergeTypes(), clang::ConstantMatrixType::Profile(), and clang::VectorType::Profile().
const char * Type::getTypeClassName | ( | ) | const |
Definition at line 3351 of file Type.cpp.
References TypeBits.
Referenced by clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().
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 653 of file Type.cpp.
References getTypeClass(), and Type().
Referenced by clang::Sema::ActOnFunctionDeclarator(), castAs(), castAsArrayTypeUnsafe(), createHostLayoutStruct(), createHostLayoutStructForBuffer(), getArrayElementTypeNoTypeQual(), getAs(), getAsArrayTypeUnsafe(), getAsStructureType(), getAsUnionType(), getResourceArrayHandleType(), clang::ASTContext::getTargetNullPointerValue(), clang::ASTContext::getUnqualifiedArrayType(), handleCallbackAttr(), clang::SemaHLSL::handleInitialization(), isHLSLIntangibleType(), isHLSLResourceRecordArray(), isInvalidConstantBufferLeafElementType(), clang::ento::iterator::isIteratorType(), IsPreserveAIArrayBase(), isSafeArraySubscript(), clang::SemaHLSL::isSemanticValid(), isZeroSizedArray(), SourceLocationForUserDeclaredType(), and TryReferenceListInitialization().
|
inline |
Determine the visibility of this type.
Definition at line 3065 of file TypeBase.h.
References getLinkageAndVisibility().
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 1951 of file Type.cpp.
References getAs(), and Type().
Referenced by clang::sema::isCopyLikeConstructor(), IsPreserveAIArrayBase(), clang::Expr::isUnusedResultAWarning(), and IsVectorConversion().
bool Type::hasAutoForTrailingReturnType | ( | ) | const |
Determine whether this type was written with a leading 'auto' corresponding to a trailing return type (possibly for a nested function type within a pointer to function type or similar).
Definition at line 2061 of file Type.cpp.
Referenced by clang::Sema::FinalizeDeclaratorGroup().
bool Type::hasBooleanRepresentation | ( | ) | const |
Determine whether this type has a boolean representation – i.e., it is a boolean type, an enum type whose underlying type is a boolean type, or a vector of booleans.
Definition at line 2354 of file Type.cpp.
References getAsEnumDecl(), and isBooleanType().
Referenced by clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), and clang::CodeGen::CodeGenFunction::EmitToMemory().
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 2312 of file Type.cpp.
References isFloatingType().
Referenced by clang::Sema::ActOnParenExpr(), canApplyNoFPClass(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), clang::Sema::CheckBitwiseOperands(), clang::SemaHLSL::CheckBuiltinFunctionCall(), CheckFloatingOrIntRepresentation(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckSizelessVectorCompareOperands(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), clang::Sema::CheckVectorCompareOperands(), clang::Sema::CheckVectorLogicalOperands(), diagnoseTautologicalComparison(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr(), and handleTransparentUnionAttr().
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 2066 of file Type.cpp.
References clang::cast(), and isIntegerType().
Referenced by clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::Sema::BuiltinShuffleVector(), clang::Sema::CheckBitwiseOperands(), CheckFloatingOrIntRepresentation(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr().
|
inline |
Whether this type can represent an objective pointer type for the purpose of GC'ability.
Definition at line 9047 of file TypeBase.h.
References hasObjCPointerRepresentation(), and isObjCObjectPointerType().
Referenced by hasObjCPointerRepresentation().
|
inline |
Definition at line 8574 of file TypeBase.h.
References getAs(), getPointeeType(), hasPointeeToToCFIUncheckedCalleeFunctionType(), isCFIUncheckedCalleeFunctionType(), and clang::ExtQualsTypeCommonBase::QualType.
Referenced by clang::CodeGen::CodeGenFunction::EmitCall(), and hasPointeeToToCFIUncheckedCalleeFunctionType().
|
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 9042 of file TypeBase.h.
References hasPointerRepresentation(), isBlockPointerType(), isNullPtrType(), isObjCObjectPointerType(), isPointerType(), and isReferenceType().
Referenced by clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr(), EvaluateBuiltinStrLen(), EvaluatePointer(), clang::SemaSwift::handleError(), hasPointerRepresentation(), ignorePointerCastsAndParens(), is32Or64BitBasicType(), and clang::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 2243 of file Type.cpp.
References isSignedIntegerOrEnumerationType().
Referenced by actOnOMPReductionKindClause(), AnalyzeComparison(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), castValueToType(), checkOpenMPLoop(), checkPointerTypesForAssignment(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), emitOMPAtomicCompareExpr(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(), clang::CodeGen::ABIArgInfo::getExtend(), getFirstBitHighIntrinsic(), handleIntegerConversion(), handleIntegerVectorBinOpConversion(), 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 5351 of file Type.cpp.
References clang::cast(), getAs(), getAsArrayTypeUnsafe(), clang::isa(), and isVariablyModifiedType().
bool Type::hasUnnamedOrLocalType | ( | ) | const |
Whether this type is or contains a local or unnamed type.
Definition at line 4904 of file Type.cpp.
References clang::TypePropertyCache< Private >::ensure(), and TypeBits.
Referenced by clang::Sema::CheckTemplateArgument().
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 2291 of file Type.cpp.
References clang::cast(), and isUnsignedIntegerOrEnumerationType().
Referenced by checkOpenMPLoop(), CheckUnsignedIntRepresentation(), DiagnoseBadShiftValues(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), getFirstBitHighIntrinsic(), and handleAsDoubleBuiltin().
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 2411 of file Type.cpp.
References clang::isa().
Referenced by clang::Sema::AddInitializerToDecl(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), EvaluateUnaryTypeTrait(), TryConstructorInitialization(), TryConstructorOrParenListInitialization(), TryListConversion(), and TryListInitialization().
bool Type::isAlignValT | ( | ) | const |
Definition at line 3180 of file Type.cpp.
References getAsCanonical(), and clang::IdentifierInfo::isStr().
Referenced by clang::Sema::AddAllocAlignAttr(), getUsualDeleteParams(), and clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation().
bool Type::isAlwaysIncompleteType | ( | ) | const |
E.g. For void this is true but for struct ForwardDecl; this is false because a definition for ForwardDecl could be provided later on in the translation unit.
Note even for types that this function returns true for it is still possible for the declarations that contain this type to later have a complete type in a translation unit. E.g.:
Definition at line 2516 of file Type.cpp.
References clang::isa(), and isIncompleteType().
Referenced by clang::Sema::CheckCountedByAttrOnField().
bool Type::isAnyCharacterType | ( | ) | const |
Determine whether this type is any of the built-in character types.
Definition at line 2168 of file Type.cpp.
Referenced by clang::SemaOpenMP::ActOnOpenMPMessageClause(), clang::Sema::CheckCompatibleReinterpretCast(), diagnoseStringPlusChar(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::UserDefinedLiteral::getLiteralOperatorKind(), handleNonStringAttr(), libc_func_matchers::hasUnsafeSnprintfBuffer(), clang::Sema::IsIntegralPromotion(), and TryPrintAsStringLiteral().
|
inline |
Definition at line 8657 of file TypeBase.h.
References clang::isa(), and isAnyComplexType().
Referenced by actOnOMPReductionKindClause(), checkArithmeticOrEnumeralCompare(), clang::interp::CheckBCPResult(), CheckIncrementDecrementOperand(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CIRGen::CIRGenFunction::emitAggregateCopy(), clang::CodeGen::CodeGenFunction::EmitComplexToScalarConversion(), clang::CIRGen::CIRGenFunction::emitComplexToScalarConversion(), clang::CIRGen::CIRGenFunction::emitLValue(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), EvaluateComparisonBinaryOperator(), EvaluateComplex(), clang::CodeGen::CodeGenFunction::EvaluateExprAsBool(), clang::CIRGen::CIRGenFunction::evaluateExprAsBool(), FindDesignatorMismatch(), findSubobject(), clang::CodeGen::CodeGenFunction::GenerateOpenMPCapturedStmtFunction(), isAnyComplexType(), isLiteralType(), IsStandardConversion(), clang::APValue::printPretty(), TryListInitialization(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::visitBool(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitComplexBinOp(), clang::interp::Compiler< Emitter >::VisitComplexUnaryOperator(), clang::interp::Compiler< Emitter >::VisitImaginaryLiteral(), clang::ento::ExprEngine::VisitUnaryOperator(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
|
inline |
Definition at line 8530 of file TypeBase.h.
References isAnyPointerType(), isObjCObjectPointerType(), and isPointerType().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPCopyprivateClause(), clang::SemaOpenMP::ActOnOpenMPFirstprivateClause(), clang::SemaOpenMP::ActOnOpenMPPrivateClause(), AreTypesCompatible(), clang::tooling::buildAccess(), clang::Sema::BuildQualifiedType(), clang::SemaARM::BuiltinARMMemoryTaggingCall(), CastsAwayConstness(), clang::Sema::CheckAdditionOperands(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkArithmeticNull(), checkArithmeticOpPointerOperand(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), clang::Sema::CheckCompareOperands(), checkConditionalNullPointer(), CheckLValueConstantExpression(), checkMapConflicts(), clang::Sema::CheckMSVCRTEntryPoint(), CheckNullabilityTypeSpecifier(), clang::SemaObjC::CheckObjCConversion(), CheckOriginalCallArgDeduction(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckPtrComparisonWithNullChar(), clang::Sema::CheckSubtractionOperands(), computeConditionalNullability(), convertPointersToCompositeType(), clang::SemaSYCL::deepTypeCheckForDevice(), diagnoseArithmeticOnTwoFunctionPointers(), DiagnoseBadFunctionCast(), DiagnoseCastQual(), diagnosePointerIncompatibility(), diagnoseStringPlusChar(), clang::ento::SMTConv::doTypeConversion(), emitPointerArithmetic(), clang::Sema::FindCompositePointerType(), findStmtsInUnspecifiedPointerContext(), clang::ento::SMTConv::fromCast(), clang::ento::SMTConv::getBinExpr(), clang::extractapi::DeclarationFragmentsBuilder::getFragmentsForFunction(), getFuchsiaHandleSymbols(), clang::ASTContext::getObjCGCAttrKind(), clang::ASTContext::getObjCGCQualType(), clang::CXXMemberCallExpr::getRecordDecl(), getVariableCategoryFromDecl(), clang::ento::SMTConv::getZeroExpr(), handleRestrictAttr(), isAnyPointerType(), isIndirectPointerType(), clang::SemaOpenMP::isOpenMPCapturedByRef(), isOverloadableType(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), isPointerToConst(), isPointerToConst(), clang::ASTContext::isSentinelNullExpr(), IsStandardConversion(), clang::Sema::isValidPointerAttrType(), threadSafetyCheckIsPointer(), TryReinterpretCast(), and clang::FunctionCallFilterCCC::ValidateCandidate().
bool Type::isArithmeticType | ( | ) | const |
Definition at line 2337 of file Type.cpp.
References clang::isa(), and isBitIntType().
Referenced by actOnOMPReductionKindClause(), clang::SemaObjC::ActOnPropertyImplDecl(), clang::Sema::CheckAdditionOperands(), checkArithmeticOrEnumeralCompare(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), DiagnoseLocalRegisterBinding(), clang::SemaObjC::DiagnosePropertyAccessorMismatch(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitUnaryOpLValue(), clang::CIRGen::CIRGenFunction::emitUnaryOpLValue(), isFundamentalType(), IsStandardConversion(), clang::SemaHLSL::IsTypedResourceElementCompatible(), IsVectorConversion(), IsVectorElementConversion(), tryGCCVectorConvertAndSplat(), and clang::Sema::UsualArithmeticConversions().
|
inline |
Definition at line 8637 of file TypeBase.h.
References clang::isa(), and isArrayParameterType().
Referenced by canDecayToPointerType(), clang::ASTContext::getArrayParameterType(), clang::InitializationSequence::InitializeFrom(), isArrayParameterType(), IsStandardConversion(), and clang::Sema::PerformImplicitConversion().
|
inline |
Definition at line 8621 of file TypeBase.h.
References clang::isa(), and isArrayType().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnCXXDelete(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPAlignedClause(), clang::SemaOpenMP::ActOnOpenMPDeclareReductionType(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPFirstprivateClause(), clang::SemaOpenMP::ActOnOpenMPIsDevicePtrClause(), clang::SemaOpenMP::ActOnOpenMPMessageClause(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), buildUserDefinedMapperRef(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorType(), BuiltinAlignment(), clang::Sema::BuiltinDecay(), clang::SemaPPC::BuiltinPPCMMACall(), canDecayToPointerType(), canInitializeArrayWithEmbedDataString(), captureInBlock(), CheckArrow(), clang::Sema::CheckConversionDeclarator(), CheckConvertibilityForTypeTraits(), clang::interp::CheckFieldsInitialized(), checkForArray(), checkIsValidOpenCLKernelParameter(), CheckNullabilityTypeSpecifier(), clang::SemaPPC::CheckPPCMMAType(), CheckStringInit(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), CheckUnaryTypeTraitTypeCompleteness(), clang::Sema::ConstantFoldAttrArgs(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateGenericSelectionExpr(), createReferenceTemporary(), DecodeTypeFromStr(), clang::Sema::DeduceAutoType(), clang::Sema::deduceOpenCLAddressSpace(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::deduceVarTypeFromInitializer(), clang::SemaSYCL::deepTypeCheckForDevice(), clang::Sema::DefaultFunctionArrayConversion(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseLocalRegisterBinding(), diagnoseTautologicalComparison(), doRewriteToUTF8StringBoxedExpressionHelper(), clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CIRGen::CIRGenFunction::emitArrayDestroy(), clang::CodeGen::CodeGenFunction::emitArrayDestroy(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), emitOMPArraySectionBase(), clang::CodeGen::CodeGenFunction::EmitOMPCopy(), clang::CodeGen::CodeGenFunction::EmitOMPUseDeviceAddrClause(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), emitPrivatesInit(), emitReadOnlyPlacementAttrWarning(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), clang::CodeGen::CGOpenMPRuntime::emitSingleReductionCombiner(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), Evaluate(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), clang::interp::Context::evaluateAsInitializer(), EvaluateInPlace(), EvaluateUnaryTypeTrait(), clang::Sema::FinalizeVarWithDestructor(), findCompleteObject(), FindDesignatorMismatch(), findSubobject(), clang::FunctionEffectsRef::get(), getAsArrayToPointerDecayedDecl(), clang::QualType::getBaseTypeIdentifier(), clang::ASTContext::GetBuiltinType(), getCoreType(), clang::ASTContext::getCountAttributedType(), getOpenCLKernelParameterType(), clang::CIRGen::OpenACCRecipeBuilder< RecipeTy >::getOrCreateRecipe(), getUuidAttrOfType(), GetVTablePointer(), handleLifetimeCategoryAttr(), handleNonStringAttr(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ASTNodeImporter::ImportFieldDeclDefinition(), clang::InitializationSequence::InitializeFrom(), isArrayType(), isCompoundType(), clang::Expr::isConstantInitializer(), isHLSLResourceRecordArray(), isOverloadableType(), IsStandardConversion(), isTriviallyEqualityComparableType(), clang::SemaHLSL::IsTypedResourceElementCompatible(), clang::Expr::isUnusedResultAWarning(), isZeroSized(), clang::Sema::MergeVarDeclTypes(), needsAmpersandOnTemplateArg(), clang::InitializationSequence::Perform(), pushTemporaryCleanup(), rebuildPotentialResultsAsNonOdrUsed(), setObjCGCLValueClass(), clang::interp::Pointer::toAPValue(), tryDiagnoseOverloadedCast(), TryReferenceInit(), TryReferenceInitializationCore(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), clang::interp::Compiler< Emitter >::VisitImplicitValueInitExpr(), clang::interp::Compiler< Emitter >::visitInitList(), clang::ento::ExprEngine::VisitMemberExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().
|
inline |
Definition at line 8704 of file TypeBase.h.
References clang::isa(), and isAtomicType().
Referenced by AnalyzeAssignment(), AnalyzeCompoundAssignment(), AnalyzeImplicitConversions(), clang::Sema::BuildAtomicExpr(), CheckBoolLikeConversion(), CheckC23ConstexprVarType(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), diagnoseRedundantReturnTypeQualifiers(), clang::CodeGen::CodeGenFunction::EmitAtomicInit(), clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), EvaluateAtomic(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), getOpenCLKernelParameterType(), isAtomicType(), clang::InitializationSequence::Perform(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
|
inline |
Definition at line 8899 of file TypeBase.h.
References isBFloat16Type(), and isSpecificBuiltinType().
Referenced by clang::SemaRISCV::checkRVVTypeSupport(), clang::Sema::checkTypeSupport(), isBFloat16Type(), and IsFloatingPointConversion().
|
inline |
Definition at line 8787 of file TypeBase.h.
References clang::isa(), and isBitIntType().
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnMSAsmStmt(), clang::Sema::AddModeAttr(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildVectorType(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkTypeSupport(), DetermineNoUndef(), DiagnoseBadShiftValues(), clang::CodeGen::ConstantEmitter::emitForMemory(), clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::ASTContext::getExtVectorType(), getScalarTypeKind(), clang::ASTContext::getVectorType(), isArithmeticType(), isBitIntType(), isIntegerType(), isIntegralOrEnumerationType(), isIntegralOrUnscopedEnumerationType(), isIntegralType(), clang::ASTContext::isPromotableBitField(), isRealType(), and isScalarType().
bool Type::isBlockCompatibleObjCPointerType | ( | ASTContext & | ctx | ) | const |
Definition at line 5221 of file Type.cpp.
References ASTContext, getAs(), clang::ASTContext::getNSCopyingName(), and clang::ASTContext::getNSObjectName().
Referenced by clang::applyObjCTypeArgs(), clang::Sema::CheckAssignmentConstraints(), and clang::Sema::CheckCompareOperands().
|
inline |
Definition at line 8542 of file TypeBase.h.
References clang::isa(), and isBlockPointerType().
Referenced by clang::SemaObjC::ActOnObjCForCollectionStmt(), clang::applyObjCTypeArgs(), clang::ASTContext::BlockRequiresCopying(), clang::Sema::BuildArrayType(), clang::SemaObjC::BuildInstanceMessage(), clang::SemaObjC::BuildObjCBridgedCast(), BuiltinDumpStruct(), CanThrow(), clang::ento::StoreManager::castRegion(), CastsAwayConstness(), checkArithmeticNull(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::Sema::CheckAssignmentConstraints(), checkBlockType(), clang::SemaRISCV::CheckBuiltinFunctionCall(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), checkConditionalBlockPointerCompatibility(), checkConditionalNullPointer(), clang::Sema::CheckConditionalOperands(), clang::SemaObjC::CheckMessageArgumentTypes(), CheckObjCCollectionLiteralElement(), clang::SemaObjC::CheckObjCPropertyAttributes(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckSingleAssignmentConstraints(), clang::SemaObjC::CheckSubscriptingKind(), compareConversionFunctions(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::CodeCompletionResult::createCodeCompletionStringForDecl(), clang::Sema::DefaultVariadicArgumentPromotion(), DiagnoseBadFunctionCast(), diagnoseObjCARCConversion(), diagnoseTautologicalComparison(), DiagnoseUninitializedUse(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitARCStoreStrong(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallExpr(), clang::ento::SMTConv::fromCast(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::ASTContext::getByrefLifetime(), GetFullTypeForDeclarator(), clang::Decl::getFunctionType(), GetGCAttrTypeForType(), clang::ASTContext::getObjCGCAttrKind(), getPointerAuthInfoForType(), clang::ObjCPropertyDecl::getSetterKind(), clang::ento::CallEventManager::getSimpleCall(), clang::ento::SMTConv::getZeroExpr(), handleAnalyzerNoReturnAttr(), clang::SemaSwift::handleAsyncAttr(), handleRestrictAttr(), handleSentinelAttr(), hasPointerRepresentation(), is32Or64BitBasicType(), clang::isBlockPointer(), isBlockPointerType(), isCallback(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), isObjCARCBridgableType(), isObjCRetainableType(), clang::Sema::IsPointerConversion(), IsStandardConversion(), clang::Sema::isValidPointerAttrType(), isVariableCapturable(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::maybeExtendBlockObject(), clang::ASTContext::mergeTypes(), clang::Sema::PerformImplicitConversion(), shouldEmitSeparateBlockRetain(), SuggestInitializationFixit(), TryReinterpretCast(), and TryStaticCast().
|
inline |
Definition at line 9008 of file TypeBase.h.
References isBooleanType().
Referenced by clang::Sema::ActOnGCCAsmStmt(), AddObjCKeyValueCompletions(), AddOrdinaryNameResults(), AnalyzeBitFieldAssignment(), clang::ento::SMTConstraintManager::assumeSym(), buildCoawaitCalls(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVectorType(), ChangeIntegralSignedness(), checkArithmeticOrEnumeralThreeWayCompare(), clang::SemaHLSL::CheckBuiltinFunctionCall(), CheckConvertedConstantConversions(), clang::Sema::CheckCountedByAttrOnField(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckImplicitConversion(), CheckIncrementDecrementOperand(), checkIntToPointerCast(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), clang::Sema::CheckSingleAssignmentConstraints(), CheckTautologicalComparison(), clang::Sema::CheckTemplateArgument(), checkVectorResult(), clang::interp::convertBoolVectorToInt(), create_OSAtomicCompareAndSwap(), clang::Sema::CreateOverloadedBinOp(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), clang::Sema::DiagnoseStaticAssertDetails(), clang::CodeGen::CodeGenFunction::EmitBitfieldConversionCheck(), clang::CIRGen::CIRGenFunction::emitComplexToScalarConversion(), clang::CIRGen::CIRGenFunction::emitLoadOfScalar(), ExprLooksBoolean(), clang::ento::SMTConv::fromCast(), getOpenCLKernelParameterType(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), HandleIntToIntCast(), handleVecTypeHint(), hasBooleanRepresentation(), clang::InitializationSequence::InitializeFrom(), isBooleanType(), isBooleanType(), clang::Sema::IsIntegralPromotion(), isIntOrBool(), clang::Expr::isKnownToHaveBooleanValue(), IsStandardConversion(), clang::SemaHLSL::IsTypedResourceElementCompatible(), IsVectorElementConversion(), clang::ento::SMTConv::mkSort(), clang::Sema::PerformImplicitConversion(), clang::Sema::prepareVectorSplat(), clang::APValue::printPretty(), clang::ento::ConditionBRVisitor::printValue(), rewriteToNumericBoxedExpression(), TryListInitialization(), TryReinterpretCast(), TryStaticCast(), tryVectorConvertAndSplat(), clang::Sema::VerifyBitField(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitCXXNoexceptExpr(), and clang::interp::Compiler< Emitter >::VisitTypeTraitExpr().
|
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 8645 of file TypeBase.h.
References clang::isa(), and isBuiltinType().
Referenced by clang::Sema::BuildVectorType(), builtinCommonTypeImpl(), clang::Sema::CreateBuiltinArraySubscriptExpr(), EmitHLSLElementwiseCast(), clang::ASTContext::getExtVectorType(), clang::ASTContext::getVectorType(), clang::SemaObjC::handleIBOutletCollection(), isBuiltinType(), isHLSLIntangibleType(), IsStructurallyEquivalent(), isTypeSubstitutable(), clang::Sema::PerformImplicitConversion(), and QualTypeToString().
|
inline |
Determines if this type would be canonical if it had no further qualification.
Definition at line 2411 of file TypeBase.h.
References clang::ExtQualsTypeCommonBase::QualType.
Referenced by areCompatMatrixTypes(), areCompatVectorTypes(), clang::Sema::CheckTemplateIdType(), clang::Sema::getCopyElisionCandidate(), and clang::FunctionProtoType::Profile().
bool Type::isCARCBridgableType | ( | ) | const |
Determine whether the given type T is a "bridgeable" C type.
Definition at line 5324 of file Type.cpp.
References getAsCanonical(), isRecordType(), isVoidType(), Pointer, and clang::ExtQualsTypeCommonBase::QualType.
Referenced by clang::SemaObjC::BuildObjCBridgedCast().
|
inline |
Definition at line 8568 of file TypeBase.h.
References getAs(), and isCFIUncheckedCalleeFunctionType().
Referenced by EmitFunctionDeclLValue(), hasPointeeToToCFIUncheckedCalleeFunctionType(), and isCFIUncheckedCalleeFunctionType().
bool Type::isChar16Type | ( | ) | const |
Definition at line 2154 of file Type.cpp.
Referenced by clang::Sema::BuiltinChangeSignedness(), and TryPrintAsStringLiteral().
bool Type::isChar32Type | ( | ) | const |
Definition at line 2160 of file Type.cpp.
Referenced by TryPrintAsStringLiteral().
bool Type::isChar8Type | ( | ) | const |
Definition at line 2148 of file Type.cpp.
Referenced by IsStringInit(), and TryPrintAsStringLiteral().
bool Type::isCharType | ( | ) | const |
Definition at line 2132 of file Type.cpp.
Referenced by clang::Sema::CheckLoopHintExpr(), checkParamIsIntegerType(), checkPointerTypesForAssignment(), DiagnoseDivisionSizeofPointerOrArray(), clang::analyze_printf::PrintfSpecifier::fixType(), handleFormatArgAttr(), handleFormatAttrCommon(), clang::InitializationSequence::InitializeFrom(), clang::Sema::IsIntegralPromotion(), clang::BinaryOperator::isNullPointerArithmeticExtension(), isPtrBufferSafe(), IsStringInit(), and clang::analyze_format_string::ArgType::matchesType().
bool Type::isClassType | ( | ) | const |
Definition at line 672 of file Type.cpp.
References getAsCanonical().
|
inline |
Definition at line 8764 of file TypeBase.h.
References isClkEventT(), and isSpecificBuiltinType().
Referenced by clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::Sema::CheckCompareOperands(), diagnoseOpenCLTypes(), isClkEventT(), and isOpenCLSpecificType().
bool Type::isComplexIntegerType | ( | ) | const |
Definition at line 730 of file Type.cpp.
References getAsComplexIntegerType().
Referenced by clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CreateBuiltinUnaryOp(), DiagnoseBadFunctionCast(), handleComplexIntegerToFloatConversion(), handleIntToFloatConversion(), 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 724 of file Type.cpp.
References getAsCanonical().
Referenced by clang::Sema::AddModeAttr(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CreateBuiltinUnaryOp(), DiagnoseBadFunctionCast(), clang::StandardConversionSequence::getNarrowingKind(), handleComplexIntegerToFloatConversion(), clang::Sema::UsualArithmeticConversions(), and clang::Sema::UsualUnaryFPConversions().
|
inline |
Tests whether the type is categorized as a compound type.
Definition at line 8496 of file TypeBase.h.
References isArrayType(), isCompoundType(), isEnumeralType(), isFunctionType(), isMemberPointerType(), isPointerType(), isRecordType(), isReferenceType(), and isUnionType().
Referenced by isCompoundType().
|
inline |
Definition at line 8625 of file TypeBase.h.
References clang::isa(), and isConstantArrayType().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::Sema::deduceVarTypeFromInitializer(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), EquivalentArrayTypes(), clang::ASTContext::getArrayParameterType(), clang::CIRGen::OpenACCRecipeBuilder< RecipeTy >::getOrCreateRecipe(), isConstantArrayType(), isInvalidConstantBufferLeafElementType(), isQualificationConversionStep(), IsStandardConversion(), and clang::Value::Value().
|
inline |
Definition at line 8683 of file TypeBase.h.
References clang::isa(), and isConstantMatrixType().
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckSubtractionOperands(), clang::CIRGen::CIRGenTypes::convertType(), clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CIRGen::CIRGenFunction::createMemTemp(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CIRGen::CIRGenFunction::emitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CIRGen::CIRGenFunction::emitStoreOfScalar(), and isConstantMatrixType().
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 2426 of file Type.cpp.
References clang::isa(), isDependentType(), and isIncompleteType().
Referenced by clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), getAlignmentAndOffsetFromBinAddOrSub(), clang::ASTContext::getConstantArrayType(), clang::CIRGen::CIRGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), HandleSizeof(), isSafeSpanTwoParamConstruct(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().
|
inline |
Return true if this can be converted to (or from) a fixed point type.
Definition at line 8946 of file TypeBase.h.
References isConvertibleToFixedPointType(), isFixedPointOrIntegerType(), and isRealFloatingType().
Referenced by isConvertibleToFixedPointType(), and IsStandardConversion().
bool Type::isCountAttributedType | ( | ) | const |
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 5334 of file Type.cpp.
References getAsCanonical().
Referenced by clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and clang::SemaCUDA::IdentifyTarget().
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 5343 of file Type.cpp.
References getAsCanonical().
Referenced by clang::CodeGen::CodeGenFunction::EmitAggregateCopy(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and clang::SemaCUDA::IdentifyTarget().
|
inline |
Definition at line 8746 of file TypeBase.h.
References clang::isa(), and isDecltypeType().
Referenced by isDecltypeType().
|
inline |
Definition at line 8687 of file TypeBase.h.
References clang::isa(), and isDependentAddressSpaceType().
Referenced by isDependentAddressSpaceType().
|
inline |
Definition at line 8641 of file TypeBase.h.
References clang::isa(), and isDependentSizedArrayType().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), EquivalentArrayTypes(), and isDependentSizedArrayType().
|
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 2782 of file TypeBase.h.
References getDependence().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCaseExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnInitializerError(), clang::SemaObjC::ActOnObjCForCollectionStmt(), clang::SemaOpenMP::ActOnOpenMPCopyinClause(), clang::Sema::ActOnPseudoDestructorExpr(), clang::SemaOpenACC::ActOnRoutineName(), clang::Sema::ActOnSEHExceptBlock(), clang::Sema::ActOnStartOfFunctionDef(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::SemaObjC::ActOnStartOfObjCMethodDef(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::ActOnUsingEnumDeclaration(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAllocAlignAttr(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddModeAttr(), clang::applyObjCTypeArgs(), clang::Sema::AttachBaseSpecifiers(), clang::Sema::BuildAsTypeExpr(), clang::Sema::BuildBuiltinBitCastExpr(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCaptureField(), clang::SemaObjC::BuildClassMessage(), buildCoawaitCalls(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::BuildCoyieldExpr(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildCXXNamedCast(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildCXXUuidof(), buildDeclareReductionRef(), clang::Sema::BuildExceptionDeclaration(), buildLambdaScopeReturnType(), clang::Sema::BuildMatrixType(), clang::Sema::BuildMemberReferenceExpr(), clang::SemaObjC::BuildObjCAtThrowStmt(), clang::SemaObjC::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildResolvedCoawaitExpr(), clang::Sema::BuildReturnStmt(), buildUserDefinedMapperRef(), clang::Sema::BuildVAArgExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::BuildVectorType(), clang::SemaPPC::BuiltinVSX(), canCaptureVariableByCopy(), clang::Sema::canFullyTypeCheckRedeclaration(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::canThrow(), captureInLambda(), checkAcquireOrderAttrCommon(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckAllocatedType(), clang::Sema::checkArrayElementAlignment(), checkBuiltinTemplateIdType(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompatibleReinterpretCast(), clang::Sema::CheckCompleteDecompositionDeclaration(), CheckConstexprMissingReturn(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckEnumConstant(), clang::Sema::CheckEnumRedeclaration(), clang::Sema::CheckExplicitlyDefaultedComparison(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckNonDependentConversions(), clang::Sema::CheckNontrivialField(), clang::SemaOpenMP::CheckOMPThreadPrivateDecl(), checkOpenMPIterationSpace(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionReturnType(), clang::SemaSYCL::CheckSYCLEntryPointFunctionDecl(), CheckSYCLKernelName(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkTypeSupport(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::SemaOpenACC::CheckVarIsPointerType(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::computeDependence(), clang::Sema::ConvertVectorExpr(), clang::CoroutineSuspendExpr::CoroutineSuspendExpr(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::SemaOpenACC::CreateFirstPrivateInitRecipe(), clang::Sema::CreateGenericSelectionExpr(), clang::SemaOpenACC::CreatePrivateInitRecipe(), clang::SemaOpenACC::CreateReductionInitRecipe(), clang::Sema::DeduceAutoType(), clang::Sema::deduceClosureReturnType(), DeduceFromInitializerList(), deduceOpenCLPointeeAddrSpace(), DeduceTemplateArgumentsByTypeMatch(), clang::DependentCoawaitExpr::DependentCoawaitExpr(), DiagnoseDivisionSizeofPointerOrArray(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseTypeTraitDetails(), EvaluateBinaryTypeTrait(), EvaluateVarDecl(), findTemplateParameter(), FixDependencyOfIdExpressionsInLambdaWithDependentObjectParameter(), clang::Expr::getBestDynamicClassType(), clang::CallExpr::getCallReturnType(), clang::ASTContext::getConstantArrayType(), clang::Sema::getCopyElisionCandidate(), clang::ento::CallEvent::getDeclaredResultType(), clang::Sema::getDestructorName(), clang::Sema::getDestructorTypeForDecltype(), clang::ASTContext::getExtVectorType(), clang::dataflow::getFieldsFromClassHierarchy(), getOpenCLKernelParameterType(), clang::ASTContext::getTypeSizeInCharsIfKnown(), clang::ASTContext::getUnconstrainedType(), HandleHLSLParamModifierAttr(), clang::SemaObjC::handlePreciseLifetimeAttr(), HandleSizeof(), clang::FunctionProtoType::hasDependentExceptionSpec(), clang::CoroutineBodyStmt::hasDependentPromiseType(), hasUserDefinedMapper(), clang::InitializationSequence::InitializeFrom(), IsAcceptableNonMemberOperatorCandidate(), isConstantSizeType(), clang::QualType::isCXX11PODType(), clang::Sema::isIncompatibleTypedef(), isLiteralType(), isOverloadableType(), isStandardLayoutType(), isTriviallyCopyableTypeImpl(), isTriviallyEqualityComparableType(), clang::QualType::isTrivialType(), clang::CXXMethodDecl::isUsualDeallocationFunction(), clang::isValidSubjectOfCFAttribute(), clang::isValidSubjectOfNSAttribute(), clang::isValidSubjectOfNSReturnsRetainedAttribute(), clang::isValidSubjectOfOSAttribute(), clang::isValidSwiftContextType(), clang::isValidSwiftErrorResultType(), clang::isValidSwiftIndirectResultType(), clang::Sema::isValidVarArgType(), LookupDirect(), LookupMemberExprInRecord(), clang::Sema::LookupParsedName(), clang::Sema::LookupQualifiedName(), clang::Sema::LookupTemplateName(), clang::Sema::MarkThisReferenced(), MatchTemplateParameterKind(), clang::Sema::MergeVarDeclTypes(), clang::InitializationSequence::Perform(), clang::Sema::PerformObjectMemberConversion(), clang::TreeTransform< Derived >::RebuildQualifiedType(), clang::CXXRecordDecl::setBases(), TryToFixInvalidVariablyModifiedType(), VariableCanNeverBeAConstantExpression(), clang::Sema::VerifyBitField(), clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr(), and clang::TextNodeDumper::VisitVarDecl().
|
inline |
Definition at line 8895 of file TypeBase.h.
References isDoubleType(), and isSpecificBuiltinType().
Referenced by clang::Sema::CheckRemainderOperands(), and isDoubleType().
bool Type::isElaboratedTypeSpecifier | ( | ) | const |
Determine wither this type is a C++ elaborated-type-specifier.
Definition at line 3331 of file Type.cpp.
References clang::Keyword, clang::KeywordHelpers::KeywordIsTagTypeKind(), and clang::T.
|
inline |
Definition at line 8653 of file TypeBase.h.
References clang::isa(), and isEnumeralType().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFinishSwitchStmt(), clang::SemaOpenACC::ActOnIntExpr(), clang::Sema::AddModeAttr(), argTypeIsABIEquivalent(), clang::Sema::BuildCXXNew(), BuildExpressionFromIntegralTemplateArgumentValue(), checkArithmeticOrEnumeralCompare(), checkArithmeticOrEnumeralThreeWayCompare(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), CheckIncrementDecrementOperand(), checkIntToPointerCast(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSwitchCondition(), CheckTautologicalComparison(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadFunctionCast(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), getSpecConstBuiltinId(), HasEnumType(), is32Or64BitBasicType(), IsAcceptableNonMemberOperatorCandidate(), isCompoundType(), isEnumeralType(), isFundamentalType(), clang::Sema::IsIntegralPromotion(), isNullPointerConstantForConversion(), isOverloadableType(), clang::ASTContext::isPromotableBitField(), isSignableIntegerType(), isTriviallyEqualityComparableType(), clang::SemaHLSL::IsTypedResourceElementCompatible(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), isValidSizelessVectorForConditionalCondition(), isValidVectorForConditionalCondition(), clang::SemaOpenMP::PerformOpenMPImplicitIntegerConversion(), clang::ento::ExprEngine::processSwitch(), rewriteToNumericBoxedExpression(), tryGCCVectorConvertAndSplat(), TryListInitialization(), TryStaticCast(), clang::Sema::VerifyIntegerConstantExpression(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
|
inline |
Definition at line 8760 of file TypeBase.h.
References isEventT(), and isSpecificBuiltinType().
Referenced by diagnoseOpenCLTypes(), getOpenCLKernelParameterType(), isEventT(), isOpenCLSpecificType(), IsStandardConversion(), clang::InitializationSequence::Perform(), and TryOCLZeroOpaqueTypeInitialization().
|
inline |
Definition at line 8669 of file TypeBase.h.
References clang::cast(), isExtVectorBoolType(), and isExtVectorType().
Referenced by BuiltinCountZeroBitsGeneric(), BuiltinPopcountg(), clang::Sema::CheckAssignmentConstraints(), CheckMaskedBuiltinArgs(), clang::Sema::CheckVectorOperands(), checkVectorShift(), clang::CodeGen::ConstantEmitter::emitForMemory(), clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::CodeGen::CodeGenFunction::EmitLoadOfExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::Sema::GetSignedVectorType(), isExtVectorBoolType(), isPackedVectorBoolType(), and IsVectorConversion().
|
inline |
Definition at line 8665 of file TypeBase.h.
References clang::isa(), and isExtVectorType().
Referenced by clang::Sema::areLaxCompatibleVectorTypes(), clang::Sema::BuiltinShuffleVector(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckVectorConditionalTypes(), clang::Sema::CheckVectorOperands(), convertVector(), clang::Sema::CreateBuiltinUnaryOp(), handleVecTypeHint(), clang::InitializationSequence::InitializeFrom(), isExtVectorBoolType(), isExtVectorType(), isValidVectorForConditionalCondition(), clang::InitializationSequence::Perform(), clang::Sema::prepareVectorSplat(), and TryReinterpretCast().
|
inline |
Return true if this is a fixed point or integer type.
Definition at line 8942 of file TypeBase.h.
References isFixedPointOrIntegerType(), isFixedPointType(), and isIntegerType().
Referenced by clang::Sema::CheckShiftOperands(), handleFixedPointConversion(), isConvertibleToFixedPointType(), and isFixedPointOrIntegerType().
|
inline |
Return true if this is a fixed point type according to ISO/IEC JTC1 SC22 WG14 N1169.
Definition at line 8934 of file TypeBase.h.
References isFixedPointType().
Referenced by clang::Sema::CreateBuiltinBinOp(), DiagnoseBadFunctionCast(), DiagnoseBadShiftValues(), EvaluateAsFixedPoint(), EvaluateComparisonBinaryOperator(), EvaluateFixedPoint(), EvaluateFixedPointOrInteger(), clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getCorrespondingUnsaturatedType(), clang::ASTContext::getFixedPointIBits(), clang::ASTContext::getFixedPointMax(), clang::ASTContext::getFixedPointMin(), clang::ASTContext::getFixedPointScale(), clang::ASTContext::getFixedPointSemantics(), handleFixedPointConversion(), handleFloatConversion(), isFixedPointOrIntegerType(), isFixedPointType(), IsStandardConversion(), isUnsaturatedFixedPointType(), isUnsignedFixedPointType(), clang::Sema::PerformImplicitConversion(), clang::Sema::UsualArithmeticConversions(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitFixedPointBinOp(), clang::interp::Compiler< Emitter >::VisitFixedPointLiteral(), clang::interp::Compiler< Emitter >::VisitFixedPointUnaryOperator(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
|
inline |
Definition at line 8907 of file TypeBase.h.
References isFloat128Type(), and isSpecificBuiltinType().
Referenced by clang::Sema::checkTypeSupport(), and isFloat128Type().
|
inline |
Definition at line 8887 of file TypeBase.h.
References isFloat16Type(), and isSpecificBuiltinType().
Referenced by clang::CheckFloatOrHalfScalarRepresentation(), clang::SemaRISCV::checkRVVTypeSupport(), clang::Sema::checkTypeSupport(), isFloat16Type(), and IsFloatingPointConversion().
|
inline |
Definition at line 8891 of file TypeBase.h.
References isFloat32Type(), and isSpecificBuiltinType().
Referenced by clang::CheckFloatOrHalfScalarRepresentation(), and isFloat32Type().
bool Type::isFloatingType | ( | ) | const |
Definition at line 2304 of file Type.cpp.
Referenced by actOnOMPReductionKindClause(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddModeAttr(), clang::Sema::BuildAtomicExpr(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), checkCondition(), clang::Sema::checkEnumArithmeticConversions(), clang::Sema::CheckImplicitConversion(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckRemainderOperands(), DetectPrecisionLossInComplexDivision(), diagnoseIfNeedsFPReg(), DiagnoseLocalRegisterBinding(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicOp(), clang::CIRGen::CIRGenFunction::emitComplexToScalarConversion(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr(), getAArch64PBV(), getDotProductIntrinsic(), clang::UserDefinedLiteral::getLiteralOperatorKind(), handleVectorVectorBinOp(), handleVecTypeHint(), hasFloatingRepresentation(), clang::interp::interp__builtin_elementwise_abs(), clang::Sema::PerformImplicitConversion(), clang::Sema::prepareVectorSplat(), rewriteToNumberLiteral(), clang::interp::Pointer::toRValue(), TryListInitialization(), unsupportedTypeConversion(), clang::Sema::UsualUnaryFPConversions(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::InterfaceKindVisitor::VisitBuiltinType(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitCompoundAssignOperator(), clang::interp::Compiler< Emitter >::VisitFloatCompoundAssignOperator(), and clang::ento::ExprEngine::VisitUnaryOperator().
|
inline |
Whether this type comes from an AST file.
Definition at line 2388 of file TypeBase.h.
References TypeBits.
|
inline |
Definition at line 2600 of file TypeBase.h.
References getAs().
Referenced by clang::Sema::ActOnFunctionDeclarator(), checkCastFunctionType(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), clang::CodeGen::CodeGenFunction::getUBSanFunctionTypeHash(), and setPrototype().
|
inline |
Definition at line 8589 of file TypeBase.h.
References getAs(), isFunctionPointerType(), and clang::T.
Referenced by clang::Sema::ActOnVariableDeclarator(), clang::CodeGen::CodeGenFunction::authPointerToPointerCast(), clang::CodeGen::CodeGenFunction::authPointerToPointerCast(), BuiltinAlignment(), BuiltinDumpStruct(), BuiltinLaunder(), CanThrow(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), checkPointerTypesForAssignment(), DiagnoseCallingConvCast(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CIRGen::CIRGenFunction::emitCall(), clang::CodeGen::CodeGenModule::getFunctionPointer(), clang::Decl::getFunctionType(), getPointee2TypeText(), clang::getPointeeTypeText(), handleAnalyzerNoReturnAttr(), handleCallbackAttr(), handleSentinelAttr(), isCallback(), clang::Decl::isFunctionPointerType(), isFunctionPointerType(), isSmartPtrCall(), clang::QualType::isWebAssemblyFuncrefType(), clang::ast_matchers::matchEachArgumentWithParamTypeImpl(), maybeDiagnoseAssignmentToFunction(), QualTypeToString(), ResolveOverloadForDeduction(), TryConstCast(), TryReinterpretCast(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
|
inline |
Definition at line 2601 of file TypeBase.h.
References getAs().
Referenced by clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), clang::Sema::CreateBuiltin(), CreateNewFunctionDecl(), FindPossiblePrototype(), clang::FunctionType::getFastTypeQuals(), clang::Sema::MergeVarDeclExceptionSpecs(), clang::InitializationSequence::Perform(), and setPrototype().
|
inline |
Definition at line 8596 of file TypeBase.h.
References getAs(), isFunctionReferenceType(), and clang::T.
Referenced by checkCastFunctionType(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenModule::getFunctionPointer(), clang::Decl::getFunctionType(), HandleConstructorCall(), and isFunctionReferenceType().
|
inline |
Definition at line 8518 of file TypeBase.h.
References clang::isa(), and isFunctionType().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPDeclareReductionType(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuiltinDecay(), BuiltinDumpStruct(), BuiltinLaunder(), clang::Sema::CallExprUnaryConversions(), canDecayToPointerType(), captureInLambda(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAllocatedType(), checkArithmeticBinOpPointerOperands(), checkArithmeticNull(), checkArithmeticOpPointerOperand(), CheckArrow(), checkCastFunctionType(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckConversionDeclarator(), CheckConvertibilityForTypeTraits(), clang::Sema::CheckCountedByAttrOnField(), clang::SemaOpenMP::checkOpenMPDeclareVariantFunction(), CheckOriginalCallArgDeduction(), clang::Sema::CheckPointerConversion(), checkPointerTypesForAssignment(), clang::Sema::CheckSubtractionOperands(), CheckSufficientAllocSize(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), ClassifyBinaryOp(), clang::Sema::CompareReferenceRelationship(), clang::Sema::ConstantFoldAttrArgs(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefaultFunctionArrayConversion(), determineEndOffset(), DiagnoseNonConstructibleReason(), clang::CodeGen::CodeGenFunction::EmitCallee(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CIRGen::CIRGenFunction::emitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitPointerArithmetic(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), EvaluateBooleanTypeTrait(), EvaluateLValue(), FindConversionForRefInit(), clang::CodeGen::CodeGenModule::getFunctionPointer(), clang::ASTContext::getObjCEncodingForBlock(), clang::ASTContext::getObjCEncodingForFunctionDecl(), clang::ASTContext::getObjCEncodingForMethodDecl(), getPointerAuthInfoForPointeeType(), HandleAddressSpaceTypeAttribute(), clang::Sema::HandleDeclarator(), HandleOperatorNewCall(), HandleSizeof(), clang::Sema::IgnoredValueConversions(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), isCompoundType(), clang::Declarator::isDeclarationOfFunction(), isFunctionType(), isIncompleteOrObjectType(), IsModifiable(), isObjectType(), isOverloadableType(), clang::Sema::IsPointerConversion(), IsStandardConversion(), isVariableAlreadyCapturedInScopeInfo(), maybeDiagnoseAssignmentToFunction(), maybeSynthesizeBlockSignature(), clang::ASTContext::mergeObjCGCQualifiers(), clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate(), ResolveOverloadForDeduction(), TryReferenceInit(), TryReferenceInitializationCore(), and TryStaticCast().
|
inline |
Tests whether the type is categorized as a fundamental type.
Definition at line 8485 of file TypeBase.h.
References isArithmeticType(), isEnumeralType(), isFundamentalType(), isNullPtrType(), and isVoidType().
Referenced by isFundamentalType().
|
inline |
Definition at line 8882 of file TypeBase.h.
References isHalfType(), and isSpecificBuiltinType().
Referenced by clang::Sema::BuildFunctionType(), clang::Sema::CheckAssignmentOperands(), clang::CheckFloatOrHalfScalarRepresentation(), checkIsValidOpenCLKernelParameter(), clang::Sema::CreateBuiltinUnaryOp(), diagnoseOpenCLTypes(), GetFullTypeForDeclarator(), getOpenCLKernelParameterType(), handleFloatConversion(), IsFloatingPointConversion(), isHalfType(), clang::Sema::PerformImplicitConversion(), and clang::Sema::UsualUnaryFPConversions().
|
inline |
Definition at line 8835 of file TypeBase.h.
References clang::isa(), and isHLSLAttributedResourceType().
Referenced by isHLSLAttributedResourceType(), isHLSLSpecificType(), isInvalidConstantBufferLeafElementType(), and TryImplicitConversion().
|
inline |
Definition at line 8823 of file TypeBase.h.
References isHLSLBuiltinIntangibleType().
Referenced by isHLSLBuiltinIntangibleType(), isHLSLIntangibleType(), isHLSLSpecificType(), and isInvalidConstantBufferLeafElementType().
|
inline |
Definition at line 8839 of file TypeBase.h.
References clang::isa(), and isHLSLInlineSpirvType().
Referenced by isHLSLInlineSpirvType(), and isHLSLSpecificType().
bool Type::isHLSLIntangibleType | ( | ) | const |
Definition at line 5383 of file Type.cpp.
References getArrayElementTypeNoTypeQual(), getUnqualifiedDesugaredType(), clang::isa(), isBuiltinType(), clang::TagDecl::isCompleteDefinition(), isHLSLBuiltinIntangibleType(), clang::CXXRecordDecl::isHLSLIntangible(), and Type().
Referenced by clang::SemaHLSL::ActOnVariableDeclarator().
bool Type::isHLSLResourceRecord | ( | ) | const |
Definition at line 5370 of file Type.cpp.
Referenced by clang::SemaHLSL::ActOnUninitializedVarDecl(), clang::SemaHLSL::deduceAddressSpace(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), isHLSLResourceRecordArray(), isInvalidConstantBufferLeafElementType(), and isResourceRecordTypeOrArrayOf().
bool Type::isHLSLResourceRecordArray | ( | ) | const |
Definition at line 5374 of file Type.cpp.
References getArrayElementTypeNoTypeQual(), getUnqualifiedDesugaredType(), clang::isa(), isArrayType(), isHLSLResourceRecord(), and Type().
Referenced by clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnUninitializedDecl(), clang::SemaHLSL::ActOnUninitializedVarDecl(), clang::SemaHLSL::ActOnVariableDeclarator(), clang::SemaHLSL::deduceAddressSpace(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), getResourceArrayHandleType(), isInvalidConstantBufferLeafElementType(), and isResourceRecordTypeOrArrayOf().
|
inline |
Definition at line 8830 of file TypeBase.h.
References isHLSLAttributedResourceType(), isHLSLBuiltinIntangibleType(), isHLSLInlineSpirvType(), and isHLSLSpecificType().
Referenced by isHLSLSpecificType().
|
inline |
Definition at line 8911 of file TypeBase.h.
References isIbm128Type(), and isSpecificBuiltinType().
Referenced by clang::Sema::checkTypeSupport(), and isIbm128Type().
|
inline |
Definition at line 8776 of file TypeBase.h.
References isImageType().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), getOpenCLKernelParameterType(), HandleOpenCLAccessAttr(), isImageType(), and isOpenCLSpecificType().
|
inline |
Definition at line 8629 of file TypeBase.h.
References clang::isa(), and isIncompleteArrayType().
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::BuildCountAttributedArrayOrPointerType(), clang::interp::CheckFieldsInitialized(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), CheckUnaryTypeTraitTypeCompleteness(), clang::computeDependence(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), DiagnoseRetainableFlexibleArrayMember(), DiagnoseVariableSizedIvars(), EvaluateBinaryTypeTrait(), EvaluateBooleanTypeTrait(), clang::Sema::getCompletedType(), hasCompatibleArrayTypes(), isIncompleteArrayType(), isQualificationConversionStep(), clang::ASTContext::isSameEntity(), clang::Sema::MergeVarDeclTypes(), clang::InitializationSequence::Perform(), setUsedBits(), clang::SemaHLSL::transformInitList(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), TryOrBuildParenListInitialization(), clang::interp::Compiler< Emitter >::VisitCXXNewExpr(), and clang::interp::Compiler< Emitter >::VisitImplicitValueInitExpr().
|
inline |
Return true if this is an incomplete or object type, in other words, not a function type.
Definition at line 2485 of file TypeBase.h.
References isFunctionType().
Referenced by clang::Sema::BuildQualifiedType(), checkConditionalObjectPointersCompatibility(), checkPointerTypesForAssignment(), clang::Sema::CheckTemplateArgument(), 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 2436 of file Type.cpp.
References ASTContext, clang::cast(), castAsCXXRecordDecl(), castAsEnumDecl(), castAsRecordDecl(), clang::Enum, clang::Decl::getASTContext(), clang::Decl::hasAttr(), clang::Interface, clang::TagDecl::isDependentType(), and isVoidType().
Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnGCCAsmStmt(), clang::SemaOpenMP::ActOnOMPArrayShapingExpr(), clang::Sema::BuildCaptureField(), calculateOffset(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::checkArrayElementAlignment(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckCastAlign(), clang::Sema::CheckCompareOperands(), clang::SemaOpenMP::checkDeclIsAllowedInOpenMPTarget(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckFunctionDeclaration(), computeOffset(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), determineEndOffset(), clang::InitializationSequence::Diagnose(), DiagnoseBadConversion(), DiagnoseForRangeVariableCopies(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CIRGen::CIRGenModule::emitGlobalVarDefinition(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), clang::CodeGen::CodeGenFunction::EmitTypeCheck(), EvaluateComparisonBinaryOperator(), clang::CodeGen::CodeGenTBAA::getAccessInfo(), clang::ento::ElementRegion::getAsArrayOffset(), clang::ASTContext::getConstantArrayType(), clang::ASTContext::getDeclAlign(), clang::dataflow::getFieldsFromClassHierarchy(), clang::Sema::getNamedReturnInfo(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::ento::MemRegionManager::getStaticSize(), clang::ASTContext::getTypeSizeInCharsIfKnown(), HandleOperatorNewCall(), handlePackedAttr(), handleTransparentUnionAttr(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::interp::interp__builtin_atomic_lock_free(), clang::interp::interp__builtin_memchr(), clang::interp::interp__builtin_memcpy(), isAlwaysIncompleteType(), isConstantSizeType(), clang::QualType::isCXX11PODType(), clang::Sema::IsCXXReplaceableType(), clang::Sema::IsCXXTriviallyRelocatableType(), isLiteralType(), isOnePastTheEndOfCompleteObject(), isStandardLayoutType(), isTriviallyCopyableTypeImpl(), isTriviallyEqualityComparableType(), IsTriviallyRelocatableType(), clang::Sema::isValidVarArgType(), isZeroSized(), clang::Sema::LookupParsedName(), clang::Sema::LookupTemplateName(), matchTypes(), clang::CodeGen::SanitizerMetadata::reportGlobal(), TryToFixInvalidVariablyModifiedType(), and clang::ASTNodeImporter::VisitTypedefNameDecl().
|
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 2790 of file TypeBase.h.
References getDependence().
Referenced by clang::SemaOpenMP::ActOnOpenMPCopyinClause(), buildDeclareReductionRef(), clang::Sema::BuildResolvedCallExpr(), buildUserDefinedMapperRef(), clang::SemaOpenMP::CheckOMPThreadPrivateDecl(), clang::Sema::CheckTemplateArgument(), clang::computeDependence(), clang::computeDependence(), getCommonNonSugarTypeNode(), clang::Sema::HandleFunctionTypeMismatch(), handleGlobalAttr(), clang::FunctionProtoType::hasInstantiationDependentExceptionSpec(), hasUserDefinedMapper(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), and clang::Sema::SubstType().
|
inline |
isIntegerType() does not include complex integers (a GCC extension).
isComplexIntegerType() can be used to test for complex integers.
Definition at line 8922 of file TypeBase.h.
References isBitIntType(), clang::IsEnumDeclComplete(), clang::IsEnumDeclScoped(), and isIntegerType().
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::SemaOpenACC::ActOnIntExpr(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPCanonicalLoop(), clang::SemaOpenMP::ActOnOpenMPInterchangeDirective(), clang::SemaOpenMP::ActOnOpenMPSizesClause(), clang::Sema::ActOnSEHExceptBlock(), AddObjCKeyValueCompletions(), areEqualIntegers(), clang::ASTContext::areLaxCompatibleRVVTypes(), clang::SemaARM::areLaxCompatibleSveTypes(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildBuiltinOffsetOf(), clang::SemaObjC::BuildInstanceMessage(), clang::SemaObjC::BuildObjCDictionaryLiteral(), clang::Sema::BuildVectorType(), BuiltinAnnotation(), clang::SemaARM::BuiltinARMMemoryTaggingCall(), BuiltinOverflow(), castValueToType(), clang::SemaARM::CheckARMBuiltinExclusiveCall(), clang::Sema::CheckAssignmentConstraints(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::SemaHLSL::CheckBuiltinFunctionCall(), clang::SemaRISCV::CheckBuiltinFunctionCall(), clang::SemaOpenCL::checkBuiltinRWPipe(), clang::SemaOpenACC::CheckCollapseLoopCount(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCountedByAttrOnField(), clang::Sema::CheckImplicitConversion(), CheckIncrementDecrementOperand(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckLoopHintExpr(), checkMathBuiltinElementType(), checkOpenCLConditionVector(), clang::checkOpenCLEnqueueIntType(), checkOpenMPIterationSpace(), checkParamIsIntegerType(), clang::Sema::CheckRemainderOperands(), clang::SemaRISCV::checkRVVTypeSupport(), clang::Sema::CheckSubtractionOperands(), clang::SemaOpenACC::CheckTileSizeExpr(), clang::Sema::checkTypeSupport(), clang::Sema::CheckVectorOperands(), clang::CheckWasmBuiltinArgIsInteger(), convertVector(), create_dispatch_once(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinMatrixSubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DefaultArgumentPromotion(), clang::Sema::DiagnoseAlwaysNonNullPointer(), clang::Sema::DiagnoseAssignmentEnum(), DiagnoseBadFunctionCast(), diagnoseStringPlusChar(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), EvaluateFixedPointOrInteger(), expandStringLiteral(), extractStringLiteralCharacter(), getAArch64PBV(), clang::ASTContext::getFixedPointSemantics(), getIntegerWidthAndSignedness(), clang::UserDefinedLiteral::getLiteralOperatorKind(), getUsualDeleteParams(), handleComplexIntegerToFloatConversion(), handleIntToFloatConversion(), handleVectorElementCast(), handleVectorVectorBinOp(), hasIntegerRepresentation(), libc_func_matchers::hasUnsafePrintfStringArg(), clang::interp::interp__builtin_elementwise_abs(), clang::interp::interp__builtin_elementwise_maxmin(), clang::interp::interp__builtin_ia32_bzhi(), clang::interp::interp__builtin_ia32_lzcnt(), clang::interp::interp__builtin_ia32_tzcnt(), isAcceptableMethodMismatch(), isFixedPointOrIntegerType(), isIntegerType(), clang::Sema::IsIntegralPromotion(), isIntOrBool(), isKnownToHaveUnsignedValue(), isNullPointerConstantForConversion(), clang::InitListExpr::isStringLiteralInit(), mergeEnumWithInteger(), OpenCLArithmeticConversions(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), PromotionIsPotentiallyEligibleForImplicitIntegerConversionCheck(), sharedGetConstructorDestructorAttrExpr(), clang::interp::Pointer::toRValue(), tryVectorConvertAndSplat(), clang::interp::Compiler< Emitter >::VisitGNUNullExpr(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
Determine whether this type is an integral or enumeration type.
Definition at line 8996 of file TypeBase.h.
References isBitIntType(), clang::IsEnumDeclComplete(), and isIntegralOrEnumerationType().
Referenced by clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddModeAttr(), BuildConvertedConstantExpression(), BuildExpressionFromIntegralTemplateArgumentValue(), clang::Sema::CheckCaseExpression(), CheckICE(), clang::Sema::CheckMSVCRTEntryPoint(), clang::SemaObjC::CheckSubscriptingKind(), clang::Sema::CheckTemplateArgument(), conjureOffsetSymbolOnLocation(), DecodeTypeFromStr(), diagnoseNonConstVariable(), clang::ento::SMTConv::doTypeConversion(), EmitCompare(), EvaluateAsInt(), EvaluateComparisonBinaryOperator(), EvaluateIntegerOrLValue(), clang::Sema::FinalizeDeclaration(), clang::ento::SMTConv::fromCast(), getBuiltinAlignArguments(), clang::CodeGen::ABIArgInfo::getExtend(), getPreferredTypeOfBinaryRHS(), clang::CodeGen::ABIArgInfo::getSignExtend(), clang::ento::SMTConv::getZeroExpr(), clang::CodeGen::ABIArgInfo::getZeroExtend(), clang::ASTContext::hasUniqueObjectRepresentations(), clang::ObjCSubscriptRefExpr::isArraySubscriptRefExpr(), isIntegralOrEnumerationType(), clang::Expr::isKnownToHaveBooleanValue(), clang::Sema::isLaxVectorConversion(), clang::ASTContext::isMSStaticDataMemberInlineDefinition(), clang::Sema::prepareVectorSplat(), clang::ento::ConditionBRVisitor::printValue(), TryReinterpretCast(), TryStaticCast(), clang::Sema::VerifyBitField(), clang::InterfaceKindVisitor::VisitBuiltinType(), clang::interp::Compiler< Emitter >::VisitCastExpr(), and clang::interp::Compiler< Emitter >::visitDeclRef().
bool Type::isIntegralOrUnscopedEnumerationType | ( | ) | const |
Determine whether this type is an integral or unscoped enumeration type.
Definition at line 2115 of file Type.cpp.
References isBitIntType(), and isUnscopedEnumerationType().
Referenced by adjustBlockReturnsToEnum(), clang::Sema::BuildArrayType(), checkArraySize(), clang::Sema::CheckBitwiseOperands(), CheckConvertedConstantConversions(), checkPointerAuthValue(), clang::Sema::CreateOverloadedBinOp(), diagnoseScopedEnums(), diagnoseStringPlusInt(), EvaluateCPlusPlus11IntegralConstantExpr(), getDependentArraySubscriptType(), clang::StandardConversionSequence::getNarrowingKind(), IsStandardConversion(), IsVectorElementConversion(), TryListInitialization(), clang::Sema::UsualUnaryConversions(), and clang::Sema::VerifyIntegerConstantExpression().
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 2103 of file Type.cpp.
References ASTContext, clang::ASTContext::getLangOpts(), isBitIntType(), and clang::IsEnumDeclComplete().
Referenced by clang::SemaOpenMP::ActOnOMPIteratorExpr(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::AddAllocAlignAttr(), argTypeIsABIEquivalent(), checkBuiltinTemplateIdType(), checkIntToPointerCast(), clang::SemaObjC::CheckObjCConversion(), clang::checkSwiftAsyncErrorBlock(), clang::Sema::CheckVectorCast(), create_OSAtomicCompareAndSwap(), DiagnoseBinOpPrecedence(), DiagnoseLocalRegisterBinding(), clang::StandardConversionSequence::getNarrowingKind(), getScalarCastKind(), clang::SemaSwift::handleError(), clang::SemaHLSL::handleVectorBinOpConversion(), handleVecTypeHint(), clang::Expr::IgnoreParenNoopCasts(), clang::Sema::IsIntegralPromotion(), isSignableIntegerType(), IsStandardConversion(), isValidSizelessVectorForConditionalCondition(), isValidVectorForConditionalCondition(), IsVectorElementConversion(), clang::Sema::PerformImplicitConversion(), tryGCCVectorConvertAndSplat(), TryReinterpretCast(), TryStaticCast(), and tryVectorConvertAndSplat().
bool Type::isInterfaceType | ( | ) | const |
Definition at line 700 of file Type.cpp.
References getAsCanonical().
bool Type::isLinkageValid | ( | ) | const |
True if the computed linkage is valid.
Used for consistency checking. Should always return true.
Definition at line 4999 of file Type.cpp.
References clang::LinkageComputer::computeTypeLinkageInfo(), getCanonicalTypeInternal(), clang::LinkageInfo::getLinkage(), and TypeBits.
bool Type::isLiteralType | ( | const ASTContext & | Ctx | ) | const |
Return true if this is a literal type (C++11 [basic.types]p10)
Definition at line 2994 of file Type.cpp.
References ASTContext, getAs(), getAsRecordDecl(), getBaseElementTypeUnsafe(), getCanonicalTypeInternal(), clang::ASTContext::getLangOpts(), clang::isa(), isAnyComplexType(), isDependentType(), isIncompleteType(), isReferenceType(), isScalarType(), isVariableArrayType(), isVectorType(), isVoidType(), and Type().
Referenced by clang::Sema::AddInitializerToDecl(), CheckLiteralType(), clang::CXXRecordDecl::isLiteral(), and clang::MaterializeTemporaryExpr::isUsableInConstantExpressions().
|
inline |
Definition at line 8550 of file TypeBase.h.
References clang::isa(), and isLValueReferenceType().
Referenced by alignReferenceTypes(), clang::Sema::CheckTemplateArgument(), checkTupleLikeDecomposition(), create_call_once_funcptr_call(), createPrivatesRecordDecl(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DefineImplicitCopyAssignment(), DiagnoseCastQual(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), emitTaskPrivateMappingFunction(), EvaluateBinaryTypeTrait(), FindConversionForRefInit(), clang::ento::ExprEngine::handleLValueBitCast(), clang::CXXConstructorDecl::isCopyConstructor(), isLValueReferenceType(), clang::sema::isNormalAssignmentOperator(), isRelevantAttr(), isStructuralType(), clang::InitializationSequence::Perform(), TryListConversion(), TryReferenceInitializationCore(), and TryRefInitWithConversionFunction().
|
inline |
Definition at line 8679 of file TypeBase.h.
References clang::isa(), and isMatrixType().
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::areMatrixTypesOfTheSameDimension(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::CheckMatrixCast(), isMatrixType(), clang::Sema::PerformImplicitConversion(), and TryStaticCast().
|
inline |
Definition at line 8614 of file TypeBase.h.
References getAs(), isMemberDataPointerType(), and clang::T.
Referenced by clang::CIRGen::CIRGenModule::emitNullConstant(), EvaluateBuiltinClassifyType(), and isMemberDataPointerType().
|
inline |
Definition at line 8607 of file TypeBase.h.
References getAs(), isMemberFunctionPointerType(), and clang::T.
Referenced by checkCastFunctionType(), diagnoseOpenCLTypes(), clang::Decl::getFunctionType(), isMemberFunctionPointerType(), clang::ast_matchers::matchEachArgumentWithParamTypeImpl(), pointerAuthResignMemberFunctionPointer(), ResolveOverloadForDeduction(), and TryConstCast().
|
inline |
Definition at line 8603 of file TypeBase.h.
References clang::isa(), and isMemberPointerType().
Referenced by clang::Sema::ActOnGCCAsmStmt(), AddOrdinaryNameResults(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildQualifiedType(), CastsAwayConstness(), checkArithmeticNull(), clang::Sema::CheckCompareOperands(), CheckNullabilityTypeSpecifier(), CheckOriginalCallArgDeduction(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentPointerToMember(), CompareDerivedToBaseConversions(), convertPointersToCompositeType(), DeduceNullPtrTemplateArgument(), clang::Sema::DeduceTemplateArguments(), DetermineNoUndef(), EvaluateComparisonBinaryOperator(), EvaluateMemberPointer(), clang::Sema::FindCompositePointerType(), clang::Sema::HandleFunctionTypeMismatch(), handleMSPointerTypeQualifierAttr(), clang::Sema::handlerCanCatch(), isCompoundType(), isIndirectPointerType(), isMemberPointerType(), isOverloadableType(), IsStandardConversion(), needsAmpersandOnTemplateArg(), QualTypeToString(), TryConstCast(), TryReinterpretCast(), clang::Value::Value(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
|
inline |
Definition at line 8903 of file TypeBase.h.
References isMFloat8Type(), and isSpecificBuiltinType().
Referenced by breakDownVectorType(), clang::Sema::CheckVectorOperands(), clang::CodeGen::CodeGenTypes::ConvertType(), isMFloat8Type(), and isTriviallyCopyableTypeImpl().
|
inline |
Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType.
Definition at line 8872 of file TypeBase.h.
References isNonOverloadPlaceholderType().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::Sema::ActOnArraySubscriptExpr(), clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaPseudoObject::checkAssignment(), and isNonOverloadPlaceholderType().
bool Type::isNothrowT | ( | ) | const |
Definition at line 3171 of file Type.cpp.
References getAsCXXRecordDecl(), clang::NamedDecl::getIdentifier(), clang::Decl::isInStdNamespace(), and clang::IdentifierInfo::isStr().
Referenced by HandleOperatorNewCall(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), and clang::interp::Compiler< Emitter >::VisitCXXNewExpr().
|
inline |
Definition at line 8915 of file TypeBase.h.
References isNullPtrType(), and isSpecificBuiltinType().
Referenced by clang::interp::BitCastPrim(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), CheckConvertedConstantConversions(), clang::Sema::CheckMSVCRTEntryPoint(), checkPointerAuthValue(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), clang::Sema::DefaultArgumentPromotion(), DetermineNoUndef(), DiagnoseNullConversion(), clang::Sema::diagnoseZeroToNullptrConversion(), clang::ento::SMTConv::doTypeConversion(), clang::dataflow::evaluateBooleanEquality(), EvaluateComparisonBinaryOperator(), clang::Sema::FindCompositePointerType(), clang::ASTContext::getTargetNullPointerValue(), clang::Sema::handlerCanCatch(), hasPointerRepresentation(), clang::InitializationSequence::InitializeFrom(), isFundamentalType(), isNullPointerValueTemplateArgument(), isNullPtrType(), clang::Sema::IsPointerConversion(), clang::sema::isPointerLikeType(), clang::ASTContext::isSentinelNullExpr(), clang::analyze_format_string::ArgType::matchesType(), mustVisitNullValue(), TryContextuallyConvertToBool(), TryReinterpretCast(), and clang::InterfaceKindVisitor::VisitBuiltinType().
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 5319 of file Type.cpp.
References isBlockPointerType(), and isObjCObjectPointerType().
Referenced by clang::SemaObjC::BuildObjCBridgedCast().
bool Type::isObjCARCImplicitlyUnretainedType | ( | ) | const |
Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong.
Definition at line 5260 of file Type.cpp.
References getCanonicalTypeInternal(), clang::QualType::getTypePtr(), isObjCLifetimeType(), and Type().
Referenced by checkARCPropertyImpl(), clang::SemaObjC::CheckObjCPropertyAttributes(), getObjCARCImplicitLifetime(), inferARCWriteback(), and clang::Sema::MaybeBindToTemporary().
bool Type::isObjCBoxableRecordType | ( | ) | const |
Definition at line 694 of file Type.cpp.
References getAsRecordDecl().
|
inline |
Definition at line 8742 of file TypeBase.h.
References isObjCBuiltinType(), isObjCClassType(), isObjCIdType(), and isObjCSelType().
Referenced by clang::ASTContext::canAssignObjCInterfacesInBlockPointer(), checkObjCPointerTypesForAssignment(), clang::SemaObjC::FindCompositeObjCPointerType(), isObjCBuiltinType(), and clang::Sema::isObjCPointerConversion().
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 834 of file Type.cpp.
References getAs().
Referenced by clang::SemaObjC::BuildInstanceMessage().
|
inline |
Definition at line 8730 of file TypeBase.h.
References getAs(), and isObjCClassType().
Referenced by clang::SemaObjC::BuildInstanceMessage(), clang::Sema::CheckAssignmentConstraints(), checkObjCPointerTypesForAssignment(), clang::SemaObjC::CheckObjCPropertyAttributes(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::SemaObjC::FindCompositeObjCPointerType(), findMethodDecl(), getBaseMessageSendResultType(), clang::SemaObjC::getMessageSendResultType(), isObjCBuiltinType(), isObjCClassType(), isSignablePointerType(), and clang::SemaObjC::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 807 of file Type.cpp.
References ASTContext, and getAs().
Referenced by clang::SemaObjC::BuildInstanceMessage().
|
inline |
Definition at line 8724 of file TypeBase.h.
References getAs(), and isObjCIdType().
Referenced by clang::SemaObjC::BuildInstanceMessage(), BuildSimilarlyQualifiedPointerType(), clang::ento::RetainSummaryManager::canEval(), clang::Sema::CheckAssignmentConstraints(), CheckObjCBridgeNSCast(), clang::SemaObjC::CheckSubscriptingKind(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), clang::Sema::deduceVarTypeFromInitializer(), clang::SemaObjC::FindCompositeObjCPointerType(), findMethodDecl(), clang::ObjCMethodDecl::getMethodFamily(), clang::SemaObjC::handleIBOutletCollection(), hasIsEqualMethod(), isObjCBuiltinType(), isObjCIdType(), clang::ASTContext::mergeTypes(), clang::Sema::SelectBestMethod(), and clang::SemaObjC::SelectorsForTypoCorrection().
bool Type::isObjCIndependentClassType | ( | ) | const |
Definition at line 5285 of file Type.cpp.
References getAs(), and clang::ast_matchers::typedefType.
Referenced by clang::SemaObjC::ActOnMethodDeclaration().
bool Type::isObjCIndirectLifetimeType | ( | ) | const |
Definition at line 5296 of file Type.cpp.
References getAs(), and 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 2668 of file TypeBase.h.
References hasAttr().
bool Type::isObjCLifetimeType | ( | ) | const |
Returns true if objects of this type have lifetime semantics under ARC.
Definition at line 5310 of file Type.cpp.
References Type(), and clang::ast_matchers::type.
Referenced by clang::Sema::BuildCXXNew(), clang::Sema::BuildVAArgExpr(), clang::Sema::CheckAllocatedType(), createObjCPropertyGetter(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseRetainableFlexibleArrayMember(), clang::SemaObjC::handlePreciseLifetimeAttr(), isObjCARCImplicitlyUnretainedType(), isObjCIndirectLifetimeType(), clang::SemaObjC::isObjCWritebackConversion(), and clang::Sema::isValidVarArgType().
bool Type::isObjCNSObjectType | ( | ) | const |
Definition at line 5279 of file Type.cpp.
References getAs(), and clang::ast_matchers::typedefType.
Referenced by clang::applyObjCTypeArgs(), clang::ASTContext::isObjCNSObjectType(), isObjCRetainableType(), and clang::isValidSubjectOfNSAttribute().
|
inline |
Definition at line 8699 of file TypeBase.h.
References clang::isa(), and isObjCObjectOrInterfaceType().
Referenced by clang::SemaCodeCompletion::CodeCompleteMemberReferenceExpr(), clang::Sema::CompareReferenceRelationship(), isObjCObjectOrInterfaceType(), and clang::Sema::LookupTemplateName().
|
inline |
Definition at line 8691 of file TypeBase.h.
References clang::isa(), and isObjCObjectPointerType().
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnFields(), clang::SemaObjC::ActOnObjCForCollectionStmt(), clang::SemaObjC::actOnObjCTypeParam(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddKnownFunctionAttributes(), AddObjCKeyValueCompletions(), adjustReturnValue(), clang::ASTContext::BlockRequiresCopying(), clang::SemaObjC::BuildObjCAtThrowStmt(), clang::ento::StoreManager::castRegion(), clang::Sema::CheckAdditionOperands(), checkArithmeticOnObjCPointer(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckFunctionDeclaration(), CheckIncrementDecrementOperand(), clang::SemaObjC::CheckMessageArgumentTypes(), checkMethodFamilyMismatch(), CheckNullabilityTypeSpecifier(), clang::SemaObjC::CheckObjCARCUnavailableWeakConversion(), CheckObjCCollectionLiteralElement(), checkObjCPointerIntrospection(), clang::SemaObjC::CheckObjCPropertyAttributes(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckSubtractionOperands(), clang::SemaCodeCompletion::CodeCompleteMemberReferenceExpr(), clang::Sema::DiagnoseAssignmentResult(), clang::ento::SMTConv::doTypeConversion(), emitBadConversionNotes(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CIRGen::CIRGenFunction::emitCXXThrowExpr(), EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EnterCXXTryStmt(), clang::SemaObjC::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::ASTContext::getByrefLifetime(), GetGCAttrTypeForType(), clang::ASTContext::getObjCGCAttrKind(), hasIsEqualMethod(), hasObjCPointerRepresentation(), hasPointerRepresentation(), isAnyPointerType(), clang::ento::cocoa::isCocoaObjectRef(), isIndirectPointerType(), isObjCARCBridgableType(), isObjCObjectPointerType(), isObjCPointer(), isObjCRetainableType(), clang::Sema::IsPointerConversion(), clang::isValidSubjectOfNSAttribute(), clang::analyze_format_string::ArgType::matchesType(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeObjCGCQualifiers(), clang::ASTContext::mergeTypes(), clang::Sema::MergeVarDeclTypes(), clang::ento::ConditionBRVisitor::patternMatch(), clang::Sema::PerformImplicitConversion(), clang::ento::ConditionBRVisitor::printValue(), clang::TreeTransform< AdjustConstraintDepth >::RebuildCXXForRangeStmt(), clang::SemaObjC::SelectorsForTypoCorrection(), TryConstCast(), tryEmitSpecializedAllocInit(), tryGenerateSpecializedMessageSend(), TryReinterpretCast(), TryStaticCast(), and validateBoxingMethod().
|
inline |
Definition at line 8695 of file TypeBase.h.
References clang::isa(), and isObjCObjectType().
Referenced by clang::Sema::ActOnFields(), clang::SemaObjC::ActOnForwardClassDeclaration(), clang::SemaObjC::actOnObjCTypeParam(), CastsAwayConstness(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAssignmentOperands(), clang::Sema::checkVariadicArgument(), clang::SemaObjC::handleIBOutletCollection(), inferARCWriteback(), isObjCObjectType(), clang::Sema::isValidVarArgType(), and transferARCOwnership().
|
inline |
Definition at line 8718 of file TypeBase.h.
References getAs(), and isObjCQualifiedClassType().
Referenced by clang::SemaObjC::BuildInstanceMessage(), checkObjCPointerTypesForAssignment(), clang::SemaObjC::CheckObjCPropertyAttributes(), clang::SemaCodeCompletion::CodeCompleteObjCInstanceMessage(), getBaseMessageSendResultType(), isObjCQualifiedClassType(), isSignablePointerType(), and clang::SemaObjC::SelectorsForTypoCorrection().
|
inline |
Definition at line 8712 of file TypeBase.h.
References getAs(), and isObjCQualifiedIdType().
Referenced by BuildSimilarlyQualifiedPointerType(), checkObjCPointerTypesForAssignment(), clang::Sema::DiagnoseAssignmentResult(), isObjCQualifiedIdType(), clang::ASTContext::ObjCObjectAdoptsQTypeProtocols(), clang::ASTContext::QIdProtocolsAdoptObjCObjectProtocols(), and clang::SemaObjC::SelectorsForTypoCorrection().
bool Type::isObjCQualifiedInterfaceType | ( | ) | const |
Definition at line 1869 of file Type.cpp.
References getAsObjCQualifiedInterfaceType().
bool Type::isObjCRetainableType | ( | ) | const |
Definition at line 5291 of file Type.cpp.
References isBlockPointerType(), isObjCNSObjectType(), and isObjCObjectPointerType().
Referenced by clang::SemaObjC::ActOnPropertyImplDecl(), AdjustObjCObjectType(), clang::ASTContext::BlockRequiresCopying(), clang::SemaObjC::BuildInstanceMessage(), clang::SemaObjC::CheckObjCPropertyAttributes(), clang::ento::retaincountchecker::RetainCountChecker::checkPostStmt(), clang::Sema::checkUnsafeExprAssigns(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitFunctionEpilog(), findWeakLValue(), clang::analyze_printf::PrintfSpecifier::fixType(), handleObjCOwnershipTypeAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), inferARCWriteback(), clang::isValidSubjectOfNSReturnsRetainedAttribute(), clang::Sema::MaybeBindToTemporary(), MaybeProduceObjCObject(), clang::CodeGen::CodeGenFunction::StartFunction(), transferARCOwnership(), transferARCOwnershipToDeclSpec(), and clang::tryMakeVariablePseudoStrong().
|
inline |
Definition at line 8736 of file TypeBase.h.
References getAs(), and isObjCSelType().
Referenced by clang::ObjCMethodDecl::getMethodFamily(), isObjCBuiltinType(), isObjCSelType(), and LookupMemberExpr().
|
inline |
Definition at line 8558 of file TypeBase.h.
References getAs(), isObjectPointerType(), and clang::T.
Referenced by isObjectPointerType().
|
inline |
Determine whether this type is an object type.
Definition at line 2510 of file TypeBase.h.
References isFunctionType(), isReferenceType(), and isVoidType().
Referenced by BuiltinLaunder(), CheckConvertibilityForTypeTraits(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), DiagnoseNonConstructibleReason(), clang::CodeGen::CodeGenFunction::EmitLoadOfReference(), EvaluateBooleanTypeTrait(), clang::Sema::FindCompositePointerType(), clang::Sema::getNamedReturnInfo(), clang::Sema::handlerCanCatch(), IsTriviallyRelocatableType(), and clang::Value::Value().
|
inline |
Definition at line 8805 of file TypeBase.h.
References isOCLExtOpaqueType().
Referenced by isOCLExtOpaqueType(), and isOpenCLSpecificType().
|
inline |
Definition at line 8797 of file TypeBase.h.
References isOCLIntelSubgroupAVCType().
Referenced by isOCLIntelSubgroupAVCType(), clang::InitializationSequence::Perform(), and TryOCLZeroOpaqueTypeInitialization().
|
inline |
Definition at line 8812 of file TypeBase.h.
References isClkEventT(), isEventT(), isImageType(), isOCLExtOpaqueType(), isOpenCLSpecificType(), isPipeType(), isQueueT(), isReserveIDT(), and isSamplerT().
Referenced by getOpenCLKernelParameterType(), isOpenCLSpecificType(), and isTypeSubstitutable().
|
inline |
Determines whether this is a type for which one can define an overloaded operator.
Definition at line 9021 of file TypeBase.h.
References isAnyPointerType(), isArrayType(), isDependentType(), isEnumeralType(), isFunctionType(), isMemberPointerType(), isOverloadableType(), and isRecordType().
Referenced by clang::Sema::BuildBinOp(), buildCounterUpdate(), clang::Sema::BuildUnaryOp(), checkOpenMPIterationSpace(), isOverloadableType(), and clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr().
bool Type::isPackedVectorBoolType | ( | const ASTContext & | ctx | ) | const |
Definition at line 418 of file Type.cpp.
References ASTContext, clang::ASTContext::getLangOpts(), and isExtVectorBoolType().
Referenced by CheckBitcastType(), clang::CodeGen::ConstantEmitter::emitForMemory(), clang::CodeGen::CodeGenFunction::EmitFromMemory(), and enumerateData().
|
inline |
Definition at line 8783 of file TypeBase.h.
References clang::isa(), and isPipeType().
Referenced by clang::Sema::BuildArrayType(), clang::checkPipeArg(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), HandleOpenCLAccessAttr(), isOpenCLSpecificType(), and isPipeType().
|
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 8854 of file TypeBase.h.
References isPlaceholderType().
Referenced by clang::Sema::BuildExprRequirement(), CheckIncrementDecrementOperand(), DeduceTemplateArgumentsByTypeMatch(), clang::Expr::hasPlaceholderType(), and isPlaceholderType().
|
inline |
Definition at line 8526 of file TypeBase.h.
References isPointerOrReferenceType(), isPointerType(), and isReferenceType().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::sema::analyzePathForGSLPointer(), clang::interp::CallVirt(), clang::Sema::CheckTemplateArgument(), classifyCapability(), clang::interp::ByteCodeEmitter::compileFunc(), clang::QualType::getBaseTypeIdentifier(), getCoreType(), clang::OverloadCandidate::getNumParams(), getOpenCLKernelParameterType(), clang::interp::Program::getOrCreateDummy(), getUuidAttrOfType(), clang::consumed::ConsumedStmtVisitor::handleCall(), handleMSAllocatorAttr(), isAutoCastType(), isConsumableType(), isEffectivelyConstRegion(), clang::CXXTypeidExpr::isMostDerived(), isPointerOrReferenceType(), print(), clang::interp::Compiler< Emitter >::VisitCastExpr(), and clang::interp::Compiler< Emitter >::VisitCXXReinterpretCastExpr().
|
inline |
Definition at line 8522 of file TypeBase.h.
References clang::isa(), and isPointerType().
Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::SemaOpenMP::ActOnOMPArrayShapingExpr(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPAlignedClause(), clang::SemaOpenMP::ActOnOpenMPDeclareSimdDirective(), clang::SemaOpenMP::ActOnOpenMPIsDevicePtrClause(), clang::SemaOpenMP::ActOnOpenMPMessageClause(), clang::SemaOpenMP::ActOnOpenMPUseDevicePtrClause(), clang::Sema::ActOnVariableDeclarator(), addCastTransition(), clang::Sema::AddFunctionCandidates(), addInstanceOfTransition(), AddOrdinaryNameResults(), argTypeIsABIEquivalent(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildAtomicExpr(), buildCapture(), clang::Sema::BuildCountAttributedArrayOrPointerType(), BuildCXXCastArgument(), clang::Sema::BuildCXXForRangeStmt(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::SemaObjC::BuildInstanceMessage(), clang::Sema::BuildPseudoDestructorExpr(), BuiltinAlignment(), builtinAllocaAddrSpace(), BuiltinCallWithStaticChain(), BuiltinDumpStruct(), BuiltinLaunder(), clang::SemaPPC::BuiltinPPCMMACall(), BuiltinTriviallyRelocate(), clang::ento::RetainSummaryManager::canEval(), castToBase(), clang::Sema::CheckAdditionOperands(), checkArrayExpressionDoesNotReferToWholeSize(), CheckArrow(), clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::sema::checkExprLifetimeImpl(), clang::Sema::CheckExtVectorCast(), clang::Sema::CheckFunctionCall(), CheckIncrementDecrementOperand(), checkIsValidOpenCLKernelParameter(), clang::Sema::CheckNonDependentConversions(), checkOpenMPIterationSpace(), checkPointerAuthValue(), checkPointerIntegerMismatch(), clang::SemaPPC::CheckPPCMMAType(), clang::Sema::CheckSingleAssignmentConstraints(), CheckSufficientAllocSize(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::SemaOpenACC::CheckVarIsPointerType(), CompareDerivedToBaseConversions(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), convertPointersToCompositeType(), clang::Sema::CreateBuiltinUnaryOp(), createSpanTypeForVarDecl(), clang::CStyleCastPtrExpr(), clang::Sema::DeduceAutoType(), clang::Sema::DeduceTemplateArguments(), clang::Sema::DiagnoseAlwaysNonNullPointer(), DiagnoseDivisionSizeofPointerOrArray(), clang::SemaSwift::DiagnoseName(), diagnoseObjCARCConversion(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenFunction::EmitArraySectionExpr(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), EmitAtomicIncrementValue(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), EmitCompare(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), EmitDynamicCastToNull(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CodeGenFunction::EmitLoadOfGlobalRegLValue(), emitOutlinedFunctionPrologue(), emitParallelOrTeamsOutlinedFunction(), EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitStoreThroughGlobalRegLValue(), clang::CodeGen::CGOpenMPRuntime::emitTaskOutlinedFunction(), clang::ento::ExprEngine::evalCall(), EvaluateComparisonBinaryOperator(), ExprLooksBoolean(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), fixVariable(), GeneralizeType(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), getAArch64LS(), getAArch64PBV(), getBuiltinAlignArguments(), clang::CodeGen::CodeGenModule::GetConstantArrayFromStringLiteral(), clang::CIRGen::CIRGenModule::getConstantArrayFromStringLiteral(), clang::ASTContext::getCountAttributedType(), clang::CodeGen::CodeGenFunction::GetCountedByFieldExprGEP(), GetExplicitObjectExpr(), clang::dataflow::getImplicitObjectLocation(), clang::UserDefinedLiteral::getLiteralOperatorKind(), getObjCBridgeAttr(), clang::ASTContext::getObjCGCAttrKind(), clang::CXXMemberCallExpr::getObjectType(), getOpenCLKernelParameterType(), clang::CIRGen::OpenACCRecipeBuilder< RecipeTy >::getOrCreateRecipe(), getPointee2TypeText(), clang::getPointeeTypeText(), getPreferredTypeOfBinaryRHS(), handleAllocSizeAttr(), handleFormatArgAttr(), handleFormatAttrCommon(), clang::Sema::HandleFunctionTypeMismatch(), handleNonStringAttr(), handleObjCOwnershipTypeAttr(), clang::Sema::handlerCanCatch(), handleRestrictAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), hasPointerRepresentation(), clang::ASTContext::hasUniqueObjectRepresentations(), libc_func_matchers::hasUnsafePrintfStringArg(), libc_func_matchers::hasUnsafeSnprintfBuffer(), clang::interp::interp__builtin_object_size(), clang::CXXDynamicCastExpr::isAlwaysNull(), isAnyPointerType(), clang::ExtVectorElementExpr::isArrow(), isCompoundType(), isIntegerLikeType(), clang::ento::iterator::isIteratorType(), clang::Sema::isObjCPointerConversion(), clang::SemaOpenMP::isOpenMPCapturedByRef(), clang::Sema::IsPointerConversion(), clang::sema::isPointerLikeType(), isPointerOrReferenceType(), isPointerType(), isSignablePointerType(), isSmartPtrCall(), isStdStreamVar(), isTautologicalBoundsCheck(), IsTypeModifiable(), clang::isValidSubjectOfCFAttribute(), loadToBegin(), MakeBinaryAtomicValue(), needsAmpersandOnTemplateArg(), clang::ento::ConditionBRVisitor::patternMatch(), peelOffPointerArithmetic(), clang::Sema::PerformImplicitConversion(), clang::ento::ConditionBRVisitor::printValue(), resolveAllocationOverloadInterior(), ResolveOverloadForDeduction(), setObjCGCLValueClass(), clang::sema::shouldTrackFirstArgument(), TryConstCast(), TryReinterpretCast(), clang::Value::Value(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitCompoundAssignOperator(), clang::interp::Compiler< Emitter >::VisitPointerArithBinOp(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
Definition at line 8768 of file TypeBase.h.
References isQueueT(), and isSpecificBuiltinType().
Referenced by clang::SemaOpenCL::checkBuiltinEnqueueKernel(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckSingleAssignmentConstraints(), isOpenCLSpecificType(), isQueueT(), IsStandardConversion(), clang::InitializationSequence::Perform(), and TryOCLZeroOpaqueTypeInitialization().
bool Type::isRealFloatingType | ( | ) | const |
Floating point categories.
Definition at line 2320 of file Type.cpp.
Referenced by clang::Sema::ActOnGCCAsmStmt(), actOnOMPReductionKindClause(), clang::Sema::BuildVectorType(), clang::ento::SMTConstraintManager::canReasonAbout(), CheckBitcastType(), clang::Sema::CheckLiteralOperatorDeclaration(), checkMathBuiltinElementType(), clang::Sema::checkTypeSupport(), DiagnoseBadFunctionCast(), clang::ento::SMTConv::doFloatTypeConversion(), clang::ento::SMTConv::doTypeConversion(), EvaluateComparisonBinaryOperator(), EvaluateFloat(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::ento::SMTConv::fromCast(), clang::ento::SMTConv::getBinExpr(), clang::StandardConversionSequence::getNarrowingKind(), getScalarCastKind(), clang::ento::SMTConv::getSymExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), handleComplexIntegerToFloatConversion(), handleFloatConversion(), handleFloatVectorBinOpConversion(), clang::SemaHLSL::handleVectorBinOpConversion(), handleVectorElementCast(), isConvertibleToFixedPointType(), IsFloatingPointConversion(), isIntegerLikeType(), IsStandardConversion(), IsVectorElementConversion(), clang::ento::SMTConv::mkSort(), OpenCLArithmeticConversions(), clang::Sema::PerformImplicitConversion(), tryGCCVectorConvertAndSplat(), TryStaticCast(), tryVectorConvertAndSplat(), clang::Sema::UsualArithmeticConversions(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
bool Type::isRealType | ( | ) | const |
Definition at line 2326 of file Type.cpp.
References isBitIntType().
Referenced by CheckIncrementDecrementOperand(), clang::Sema::CheckSizelessVectorOperands(), and clang::Sema::CheckVectorOperands().
|
inline |
Definition at line 8649 of file TypeBase.h.
References clang::isa(), and isRecordType().
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnConditionalOp(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnFinishFunctionBody(), actOnOMPReductionKindClause(), clang::SemaObjC::ActOnPropertyImplDecl(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::AddInitializerToDecl(), clang::Sema::AddMemberOperatorCandidates(), clang::interp::Compiler< Emitter >::allocateTemporary(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildBuiltinOffsetOf(), buildDeclareReductionRef(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildImplicitMemberInitializer(), clang::Sema::BuildVAArgExpr(), BuiltinDumpStruct(), clang::interp::CheckArrayInitialized(), CheckC23ConstexprVarType(), CheckConditionalOperand(), clang::Sema::CheckConditionalOperands(), clang::interp::CheckFieldsInitialized(), checkIsValidOpenCLKernelParameter(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckLValueToRValueConversionOperand(), CheckMoveOnConstruction(), CheckObjCCollectionLiteralElement(), CheckOriginalCallArgDeduction(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::Sema::CheckPointerConversion(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), clang::Sema::checkVariadicArgument(), clang::SemaObjC::CollectIvarsToConstructOrDestruct(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::dataflow::copySyntheticField(), clang::Sema::CreateGenericSelectionExpr(), clang::dataflow::DataflowAnalysisContext::createRecordStorageLocation(), createReferenceTemporary(), clang::dataflow::DataflowAnalysisContext::createStorageLocation(), clang::Sema::CXXCheckConditionalOperands(), DeduceTemplateArgumentsByTypeMatch(), clang::InitializationSequence::Diagnose(), DiagnoseLocalRegisterBinding(), DiagnoseRecursiveConstFields(), DiagnoseTypeAwareAllocators(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitCallArg(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), emitMemberInitializer(), clang::CIRGen::CIRGenModule::emitNullConstant(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), Evaluate(), evaluateCDTSize(), EvaluateInPlace(), EvaluateRecord(), EvaluateTemporary(), FilterReturnExpressionLeaks(), clang::Sema::FindAllocationFunctions(), FindConversionForRefInit(), findSubobject(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction(), clang::ASTContext::getByrefLifetime(), clang::CallExpr::getCallReturnType(), clang::Sema::getCopyElisionCandidate(), clang::CXXMethodDecl::getDevirtualizedMethod(), getFieldOffsetInBits(), clang::dataflow::getFieldsFromClassHierarchy(), getGEPIndicesToField(), getOpenCLKernelParameterType(), clang::dataflow::CachedConstAccessorsLattice< Base >::getOrCreateConstMethodReturnStorageLocation(), clang::dataflow::CachedConstAccessorsLattice< Base >::getOrCreateConstMethodReturnValue(), clang::CIRGen::CIRGenFunction::getOverlapForFieldInit(), clang::CodeGen::CodeGenFunction::getOverlapForFieldInit(), clang::dataflow::Environment::getResultObjectLocation(), getSelfInitExpr(), clang::dataflow::DataflowAnalysisContext::getSyntheticFields(), clang::Sema::getTypeName(), clang::dataflow::Environment::getValue(), clang::Sema::handlerCanCatch(), clang::ASTNodeImporter::ImportAPValue(), InitCatchParam(), clang::InitializationSequence::InitializeFrom(), IsAcceptableNonMemberOperatorCandidate(), clang::Sema::IsBlockPointerConversion(), isCARCBridgableType(), clang::Expr::isConstantInitializer(), clang::CodeGen::CodeGenModule::isInNoSanitizeList(), clang::Sema::IsPointerConversion(), isRecordType(), IsStandardConversion(), clang::SemaHLSL::IsTypedResourceElementCompatible(), IsUserDefinedConversion(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectMemberConversion(), clang::APValue::printPretty(), clang::dataflow::propagateValue(), clang::Sema::RequireLiteralType(), ResolveOverloadedFunctionForReferenceBinding(), clang::hlsl::BuiltinTypeMethodBuilder::returnValue(), setObjCGCLValueClass(), clang::dataflow::Environment::setValue(), clang::Expr::skipRValueSubobjectAdjustments(), clang::SemaHLSL::transformInitList(), TryConstCast(), TryDefaultInitialization(), tryDiagnoseOverloadedCast(), clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryImplicitConversion(), TryListConversion(), TryListInitialization(), TryObjectArgumentInitialization(), TryReferenceInit(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), TryStaticCast(), TryStaticImplicitCast(), TryUserDefinedConversion(), clang::Value::Value(), clang::dataflow::ReferencedDeclsVisitor::VisitCXXParenListInitExpr(), clang::interp::Compiler< Emitter >::VisitImplicitValueInitExpr(), clang::interp::Compiler< Emitter >::visitInitList(), clang::dataflow::ReferencedDeclsVisitor::VisitInitListExpr(), warnAboutAmbiguousFunction(), and clang::serialization::DataStreamBasicWriter< Impl >::writeLValuePathSerializationHelper().
|
inline |
Definition at line 8546 of file TypeBase.h.
References clang::isa(), and isReferenceType().
Referenced by actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPDeclareReductionType(), clang::SemaOpenMP::ActOnOpenMPDeclareVariantDirective(), clang::Sema::ActOnUninitializedDecl(), addCastTransition(), clang::Sema::AddInitializerToDecl(), addInstanceOfTransition(), clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), buildCoawaitCalls(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuildImplicitMemberInitializer(), clang::Sema::BuildQualifiedType(), clang::canDynamicCastThrow(), captureInBlock(), captureInLambda(), CastsAwayConstness(), castToBase(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAllocatedType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::sema::checkExprLifetimeImpl(), clang::Sema::CheckFieldDecl(), CheckForReference(), clang::Sema::CheckFunctionCall(), CheckICE(), CheckLValueConstantExpression(), clang::SemaOpenMP::CheckOMPThreadPrivateDecl(), clang::SemaOpenMP::CheckOpenMPLinearDecl(), clang::interp::EvaluationResult::checkReturnValue(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), ClassifyMemberExpr(), CompareQualificationConversions(), clang::Sema::CompareReferenceRelationship(), create_call_once(), createObjCPropertyGetter(), DeduceNonTypeTemplateArgument(), clang::Sema::DeduceTemplateArguments(), clang::SemaSYCL::deepTypeCheckForDevice(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), DetermineNoUndef(), clang::InitializationSequence::Diagnose(), DiagnoseBadConversion(), DiagnoseDivisionSizeofPointerOrArray(), DiagnoseForRangeReferenceVariableCopies(), DiagnoseForRangeVariableCopies(), diagnoseListInit(), clang::SemaSwift::DiagnoseName(), diagnoseOpenCLTypes(), diagnoseUnknownDecl(), DoMarkPotentialCapture(), clang::ento::SMTConv::doTypeConversion(), clang::CIRGen::CIRGenFunction::emitCallArg(), clang::CodeGen::CGDebugInfo::EmitDeclareOfAutoVariable(), EmitDeclInit(), clang::CIRGen::CIRGenFunction::emitDeclRefLValue(), EmitGlobalVarDeclLValue(), emitGlobalVarDeclLValue(), clang::CIRGen::CIRGenModule::emitGlobalVarDefinition(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CIRGen::CIRGenFunction::emitLValueForField(), clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization(), clang::CIRGen::CIRGenFunction::emitLValueForFieldInitialization(), clang::CodeGen::CodeGenFunction::EmitLValueForLambdaField(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitRValueForField(), clang::ento::ExprEngine::evalCall(), EvaluateInitForDeclOfReferenceType(), EvaluateVarDecl(), evaluateVarDeclInit(), clang::ento::SMTConv::fromCast(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), getAArch64MTV(), clang::CodeGen::CodeGenFunction::GetAddrOfBlockDecl(), getBaseAlignmentAndOffsetFromLValue(), clang::CFGImplicitDtor::getDestructorDecl(), getFuchsiaHandleSymbols(), clang::SemaHLSL::getInoutParameterType(), getLocationRegionIfReference(), clang::dataflow::CachedConstAccessorsLattice< Base >::getOrCreateConstMethodReturnStorageLocation(), clang::dataflow::CachedConstAccessorsLattice< Base >::getOrCreateConstMethodReturnValue(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getPointee2TypeText(), clang::ento::SMTConv::getZeroExpr(), HandleConstructorCall(), clang::SemaSwift::handleError(), handleLifetimeCategoryAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), hasPointerRepresentation(), clang::Expr::HasSideEffects(), clang::InitializationSequence::InitializeFrom(), clang::ento::isCapturedByReference(), isCapturingReferenceToHostVarInCUDADeviceLambda(), isCompoundType(), isLiteralType(), isObjectType(), clang::SemaOpenMP::isOpenMPCapturedByRef(), isPointerOrReferenceType(), clang::ento::isPossiblyEscaped(), isReferenceToNonConstCapture(), isReferenceType(), isRelevantAttr(), clang::Expr::isUnusedResultAWarning(), clang::FunctionDecl::isUsableAsGlobalAllocationFunctionInConstantEvaluation(), loadToBegin(), maybeTailCall(), clang::InitializationSequence::Perform(), clang::Sema::PerformImplicitConversion(), PerformReturnAdjustment(), clang::APValue::printPretty(), clang::ento::ExprEngine::ProcessAutomaticObjDtor(), clang::ReferenceType::ReferenceType(), clang::Sema::RefersToMemberWithReducedAlignment(), clang::dataflow::RecordStorageLocation::setChild(), clang::dataflow::Environment::setStorageLocation(), clang::Expr::setType(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), clang::sema::shouldTrackFirstArgument(), clang::dataflow::transferSmartPointerLikeCachedDeref(), clang::CodeGen::CGOpenMPRuntimeGPU::translateParameter(), TryCopyInitialization(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::CIRGen::ConstantEmitter::tryEmitPrivateForVarInit(), clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(), TryListConversion(), TryListInitialization(), TryOrBuildParenListInitialization(), TryReferenceInit(), TryStaticImplicitCast(), TryUserDefinedConversion(), unwrapCastAwayConstnessLevel(), clang::FunctionCallFilterCCC::ValidateCandidate(), clang::Value::Value(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::visitDeclRef(), clang::consumed::ConsumedStmtVisitor::VisitParmVarDecl(), warnAboutAmbiguousFunction(), and writeShouldKill().
|
inline |
Definition at line 8772 of file TypeBase.h.
References isReserveIDT(), and isSpecificBuiltinType().
Referenced by diagnoseOpenCLTypes(), getOpenCLKernelParameterType(), isOpenCLSpecificType(), and isReserveIDT().
|
inline |
Definition at line 8554 of file TypeBase.h.
References clang::isa(), and isRValueReferenceType().
Referenced by clang::Sema::AddConversionCandidate(), alignReferenceTypes(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::CheckTemplateArgument(), create_call_once_funcptr_call(), DeduceNonTypeTemplateArgument(), DiagnoseForRangeReferenceVariableCopies(), EvaluateBinaryTypeTrait(), FindConversionForRefInit(), clang::Sema::getMoreSpecializedTemplate(), clang::Sema::getNamedReturnInfo(), clang::ento::ExprEngine::handleLValueBitCast(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::CXXConstructorDecl::isMoveConstructor(), isRelevantAttr(), isRValueRef(), isRValueReferenceType(), RefersToRValueRef(), TryListConversion(), TryReferenceInit(), TryReferenceListInitialization(), TryStaticReferenceDowncast(), unwrapRValueReferenceIndirection(), and VerifyInitializationSequenceCXX98().
bool Type::isRVVSizelessBuiltinType | ( | ) | const |
Returns true for RVV scalable vector types.
Definition at line 2595 of file Type.cpp.
References getAs().
Referenced by clang::ASTContext::areCompatibleRVVTypes(), clang::ASTContext::areLaxCompatibleRVVTypes(), clang::Sema::CheckAssignmentConstraints(), clang::SemaRISCV::CheckBuiltinFunctionCall(), clang::Sema::checkTypeSupport(), clang::Sema::CheckVectorOperands(), getSizelessVectorEltType(), isSizelessVectorType(), isTrackedVar(), clang::SemaRISCV::isValidRVVBitcast(), and IsVectorConversion().
bool Type::isRVVVLSBuiltinType | ( | ) | const |
Determines if this is a sizeless type supported by the 'riscv_rvv_vector_bits' type attribute, which can be applied to a single RVV vector or mask.
Definition at line 2660 of file Type.cpp.
References getAs().
Referenced by clang::ASTContext::areCompatibleRVVTypes(), getRVVEltType(), getRVVTypeSize(), and HandleRISCVRVVVectorBitsTypeAttr().
|
inline |
Definition at line 8756 of file TypeBase.h.
References isSamplerT(), and isSpecificBuiltinType().
Referenced by clang::Sema::BuildArrayType(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::CreateBuiltinUnaryOp(), clang::SemaHLSL::deduceAddressSpace(), clang::Sema::deduceOpenCLAddressSpace(), deduceOpenCLPointeeAddrSpace(), diagnoseOpenCLTypes(), clang::CodeGen::CodeGenFunction::EmitVarDecl(), clang::CIRGen::CIRGenFunction::emitVarDecl(), isOpenCLSpecificType(), isSamplerT(), IsStandardConversion(), clang::InitializationSequence::Perform(), and TryOCLSamplerInitialization().
|
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 8950 of file TypeBase.h.
References isSaturatedFixedPointType().
Referenced by clang::ASTContext::getCorrespondingSaturatedType(), clang::ASTContext::getFixedPointSemantics(), handleFixedPointConversion(), isSaturatedFixedPointType(), isUnsaturatedFixedPointType(), and clang::analyze_format_string::ArgType::matchesType().
|
inline |
Definition at line 8980 of file TypeBase.h.
References clang::isa(), isBitIntType(), clang::IsEnumDeclComplete(), and isScalarType().
Referenced by clang::Sema::ActOnFunctionDeclarator(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPAtomicDirective(), clang::SemaOpenMP::ActOnOpenMPLastprivateClause(), clang::SemaHLSL::ActOnOutParamExpr(), clang::Sema::areLaxCompatibleVectorTypes(), breakDownVectorType(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildPseudoDestructorExpr(), clang::SemaHLSL::CanPerformAggregateSplatCast(), clang::SemaHLSL::CanPerformElementwiseCast(), clang::SemaHLSL::CanPerformScalarCast(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::CheckAssignmentConstraints(), checkCondition(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckVectorOperands(), clang::Sema::CreateBuiltinUnaryOp(), DetermineNoUndef(), EmitHLSLAggregateSplatCast(), EvaluateUnaryTypeTrait(), getDerivedSymbolForBinding(), getScalarTypeKind(), getVariableCategoryFromDecl(), hasIsEqualMethod(), clang::QualType::isCXX11PODType(), clang::Sema::IsCXXReplaceableType(), clang::Sema::IsCXXTriviallyRelocatableType(), isLiteralType(), clang::SemaOpenMP::isOpenMPCapturedByRef(), isScalarType(), isStandardLayoutType(), isStructuralType(), isTrackedVar(), isTriviallyCopyableTypeImpl(), clang::QualType::isTrivialType(), matchTypes(), clang::SemaOpenACC::OpenACCParsedClause::setConditionDetails(), TryListInitialization(), and updateOutParameters().
bool Type::isScopedEnumeralType | ( | ) | const |
Determine whether this type is a scoped enumeration type.
Definition at line 735 of file Type.cpp.
References getAsCanonical().
Referenced by diagnoseScopedEnums().
bool Type::isSignableIntegerType | ( | const ASTContext & | Ctx | ) | const |
Definition at line 5215 of file Type.cpp.
References ASTContext, clang::ASTContext::getTypeSize(), isEnumeralType(), isIntegralType(), and clang::ASTContext::VoidPtrTy.
Referenced by isSignableType().
|
inline |
Definition at line 8538 of file TypeBase.h.
References isObjCClassType(), isObjCQualifiedClassType(), isPointerType(), and isSignablePointerType().
Referenced by isSignablePointerType(), and isSignableType().
|
inline |
Definition at line 8534 of file TypeBase.h.
References ASTContext, isSignableIntegerType(), isSignablePointerType(), and isSignableType().
Referenced by clang::CodeGen::CodeGenFunction::authPointerToPointerCast(), clang::CodeGen::CodeGenFunction::authPointerToPointerCast(), clang::CodeGen::CodeGenFunction::EmitOrigPointerRValue(), getPointerAuthInfoForType(), clang::CodeGen::CodeGenFunction::isPointerKnownNonNull(), and isSignableType().
|
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 8962 of file TypeBase.h.
References isSignedFixedPointType().
Referenced by clang::ASTContext::getFixedPointSemantics(), handleFixedPointConversion(), isSignedFixedPointType(), 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 2225 of file Type.cpp.
References getAsEnumDecl().
Referenced by clang::Sema::ActOnEnumBody(), clang::Sema::ActOnFinishSwitchStmt(), AnalyzeBitFieldAssignment(), clang::ento::SMTConv::castAPSInt(), clang::Sema::CheckEnumConstant(), CheckICE(), clang::Sema::CheckTemplateArgument(), clang::Sema::DiagnoseAssignmentEnum(), clang::ento::SMTConv::doIntTypeConversion(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitBitfieldConversionCheck(), EmitBitfieldTruncationCheckHelper(), clang::CodeGen::CodeGenFunction::EmitBoundsCheckImpl(), clang::CodeGen::ConstantEmitter::emitForMemory(), EmitIntegerSignChangeCheckHelper(), EmitIntegerTruncationCheckHelper(), EmitIsNegativeTestHelper(), clang::CodeGen::CodeGenFunction::EmitMatrixIndexExpr(), clang::CIRGen::CIRGenFunction::emitOpenACCIntExpr(), clang::CodeGen::CodeGenFunction::EmitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::ento::SMTConv::fromCast(), clang::ento::SMTConv::getBinExpr(), clang::StandardConversionSequence::getNarrowingKind(), clang::ento::SMTConv::getRangeExpr(), clang::ento::SMTConstraintManager::getSymVal(), clang::ento::SMTConv::getZeroExpr(), HandleFloatToIntCast(), hasSignedIntegerRepresentation(), clang::interp::interp__builtin_overflowop(), clang::CodeGen::CGBitFieldInfo::MakeInfo(), clang::ASTContext::MakeIntValue(), clang::interp::pushInteger(), 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 2205 of file Type.cpp.
References getAsEnumDecl().
Referenced by clang::Sema::AddModeAttr(), AnalyzeBitFieldAssignment(), clang::Sema::CheckCompatibleReinterpretCast(), computeOverflowPatternExclusion(), clang::InitializationSequence::Diagnose(), DiagnoseIntInBoolContext(), EmitAtomicOp(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), clang::CodeGen::CodeGenFunction::EmitVariablyModifiedType(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), clang::CodeGen::CodeGenFunction::GenerateSEHFilterFunction(), GetCountFieldAndIndex(), getDotProductIntrinsic(), clang::ASTContext::getFixedPointSemantics(), getImageFormat(), getIntegerWidthAndSignedness(), clang::ASTContext::getPromotedIntegerType(), integerTypeMatch(), clang::Sema::IsIntegralPromotion(), isKnownToHaveUnsignedValue(), clang::ASTContext::isPromotableBitField(), rewriteToNumericBoxedExpression(), clang::JSONNodeDumper::VisitIntegerLiteral(), clang::TextNodeDumper::VisitIntegerLiteral(), and clang::ento::ExprEngine::VisitOffsetOfExpr().
bool Type::isSizelessBuiltinType | ( | ) | const |
Definition at line 2532 of file Type.cpp.
References getAs(), and isSizelessVectorType().
Referenced by clang::Sema::CheckVectorOperands(), clang::Sema::GetSignedSizelessVectorType(), clang::QualType::isCXX11PODType(), isSizelessType(), isTriviallyCopyableTypeImpl(), and warnBracedScalarInit().
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 2568 of file Type.cpp.
References isSizelessBuiltinType().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::CheckAlignasUnderalignment(), clang::Sema::CheckCountedByAttrOnField(), clang::Sema::CheckCXXThrowOperand(), and clang::Sema::CheckSpecifiedExceptionType().
bool Type::isSizelessVectorType | ( | ) | const |
Returns true for all scalable vector types.
Definition at line 2570 of file Type.cpp.
References isRVVSizelessBuiltinType(), and isSVESizelessBuiltinType().
Referenced by clang::Sema::checkCall(), clang::SemaARM::CheckSMEFunctionDefAttributes(), getSizelessVectorEltType(), isSizelessBuiltinType(), and clang::interp::Compiler< Emitter >::VisitUnaryExprOrTypeTraitExpr().
Test for a particular builtin type.
Definition at line 8847 of file TypeBase.h.
References getAs(), and isSpecificBuiltinType().
Referenced by clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::SemaOpenMP::ActOnOpenMPDependClause(), clang::SemaOpenMP::ActOnOpenMPMapClause(), clang::Sema::BuildAtomicExpr(), clang::Sema::BuildVAArgExpr(), BuiltinCountZeroBitsGeneric(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::Sema::CheckConstraintExpression(), clang::Sema::CheckLiteralOperatorDeclaration(), clang::Sema::CheckOverloadedOperatorDeclaration(), clang::SemaRISCV::checkRVVTypeSupport(), CheckTautologicalComparison(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::DiagnoseAlwaysNonNullPointer(), clang::Sema::DiagnoseAssignmentResult(), clang::OverloadExpr::find(), clang::Sema::getCopyElisionCandidate(), clang::dataflow::Environment::getStorageLocation(), isBFloat16Type(), isClkEventT(), isDoubleType(), isEventT(), isFloat128Type(), isFloat16Type(), isFloat32Type(), isHalfType(), isIbm128Type(), IsImplicitBoolFloatConversion(), isMFloat8Type(), isNullPtrType(), isQueueT(), isReserveIDT(), isSamplerT(), clang::SemaObjC::isSignedCharBool(), isSpecificBuiltinType(), isSpecificPlaceholderType(), isTypeSubstitutable(), isVoidType(), processImplicitMapsWithDefaultMappers(), and clang::dataflow::Environment::setStorageLocation().
Test for a specific placeholder type.
Definition at line 8867 of file TypeBase.h.
References clang::BuiltinType::isPlaceholderTypeKind(), isSpecificBuiltinType(), and isSpecificPlaceholderType().
Referenced by clang::CallExpr::getCallReturnType(), isSpecificPlaceholderType(), clang::ObjCPropertyRefExpr::ObjCPropertyRefExpr(), 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 3200 of file Type.cpp.
References Complex, clang::Enum, getTypeClass(), and clang::Typedef.
bool Type::isStandardLayoutType | ( | ) | const |
Test if this type is a standard-layout type.
(C++0x [basic.type]p9)
Definition at line 3075 of file Type.cpp.
References getAsRecordDecl(), getBaseElementTypeUnsafe(), isDependentType(), isIncompleteType(), isScalarType(), isVectorType(), and Type().
Referenced by isLayoutCompatible().
bool Type::isStdByteType | ( | ) | const |
Definition at line 3190 of file Type.cpp.
References getAsCanonical(), and clang::IdentifierInfo::isStr().
bool Type::isStructuralType | ( | ) | const |
Determine if this type is a structural type, per C++20 [temp.param]p7.
Definition at line 3059 of file Type.cpp.
References getAsCXXRecordDecl(), isLValueReferenceType(), isScalarType(), and isVectorType().
bool Type::isStructureOrClassType | ( | ) | const |
Definition at line 706 of file Type.cpp.
References getAsCanonical().
Referenced by clang::SemaOpenMP::ActOnOpenMPDeclareMapperType(), buildUserDefinedMapperRef(), clang::Sema::CheckOverridingFunctionReturnType(), CheckSYCLKernelName(), EvaluateBinaryTypeTrait(), isImplicitMapperNeeded(), clang::Sema::IsPointerInterconvertibleBaseOf(), markEscapingByrefs(), and processImplicitMapsWithDefaultMappers().
bool Type::isStructureType | ( | ) | const |
Definition at line 678 of file Type.cpp.
References getAsCanonical().
Referenced by clang::Sema::ActOnGCCAsmStmt(), getFuchsiaHandleSymbols(), clang::analyze_format_string::ArgType::matchesType(), and clang::Sema::MergeTypedefNameDecl().
bool Type::isStructureTypeWithFlexibleArrayMember | ( | ) | const |
Definition at line 684 of file Type.cpp.
References getAsCanonical().
Referenced by clang::Sema::CheckCountedByAttrOnField().
|
inline |
Definition at line 8675 of file TypeBase.h.
References isSubscriptableVectorType(), isSveVLSBuiltinType(), and isVectorType().
Referenced by clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), and isSubscriptableVectorType().
bool Type::isSVESizelessBuiltinType | ( | ) | const |
Returns true for SVE scalable vector types.
Definition at line 2574 of file Type.cpp.
References getAs().
Referenced by clang::Sema::CheckAssignmentConstraints(), clang::Sema::checkTypeSupport(), clang::Sema::CheckVectorOperands(), getSizelessVectorEltType(), isSizelessVectorType(), isTypeSubstitutable(), clang::Sema::isValidSveBitcast(), and IsVectorConversion().
bool Type::isSveVLSBuiltinType | ( | ) | 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 2608 of file Type.cpp.
References getAs().
Referenced by clang::Sema::CheckAdditionOperands(), clang::Sema::CheckBitwiseOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckImplicitConversion(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::Sema::CheckSizelessVectorConditionalTypes(), clang::Sema::CheckSizelessVectorOperands(), checkSizelessVectorShift(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateBuiltinUnaryOp(), getSveEltType(), clang::getSVETypeSize(), HandleArmSveVectorBitsTypeAttr(), isSubscriptableVectorType(), isValidSizelessVectorForConditionalCondition(), and tryGCCVectorConvertAndSplat().
|
inline |
Definition at line 8843 of file TypeBase.h.
References clang::isa(), and isTemplateTypeParmType().
Referenced by isTemplateTypeParmType().
|
inline |
Determines whether this type is written as a typedef-name.
Definition at line 9029 of file TypeBase.h.
References getAs(), and isTypedefNameType().
Referenced by clang::extractapi::TypedefUnderlyingTypeResolver::getUnderlyingTypeDecl(), and isTypedefNameType().
|
inline |
Definition at line 8708 of file TypeBase.h.
References clang::isa(), and isUndeducedAutoType().
Referenced by clang::Sema::ActOnConversionDeclarator(), clang::Sema::CheckExplicitlyDefaultedComparison(), deduceOpenCLPointeeAddrSpace(), and isUndeducedAutoType().
|
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 9014 of file TypeBase.h.
References getContainedDeducedType(), and isUndeducedType().
Referenced by clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnInitializerError(), clang::Sema::ActOnUninitializedDecl(), clang::Sema::AddConversionCandidate(), clang::Sema::AddInitializerToDecl(), clang::Sema::areMultiversionVariantFunctionsCompatible(), clang::Sema::BuildOverloadedCallExpr(), clang::Sema::BuildVariableInstantiation(), clang::Sema::canDelayFunctionBody(), clang::Sema::checkArrayElementAlignment(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckNonTypeTemplateParameterType(), clang::SemaSYCL::CheckSYCLEntryPointFunctionDecl(), completeFunctionType(), clang::Sema::deduceClosureReturnType(), clang::Sema::DeduceReturnType(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), DoMarkVarDeclReferenced(), hasDeducedReturnType(), isUndeducedType(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), and TryToFixInvalidVariablyModifiedType().
bool Type::isUnicodeCharacterType | ( | ) | const |
Definition at line 2188 of file Type.cpp.
Referenced by CheckUnicodeArithmeticConversions().
bool Type::isUnionType | ( | ) | const |
Definition at line 718 of file Type.cpp.
References getAsCanonical().
Referenced by clang::SemaOpenMP::ActOnOpenMPDeclareMapperType(), buildUserDefinedMapperRef(), checkIsValidOpenCLKernelParameter(), CheckMemberDecompositionFields(), EvaluateBuiltinClassifyType(), evaluateCDTSize(), isCompoundType(), isImplicitMapperNeeded(), and processImplicitMapsWithDefaultMappers().
|
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 8958 of file TypeBase.h.
References isFixedPointType(), isSaturatedFixedPointType(), and isUnsaturatedFixedPointType().
Referenced by clang::ASTContext::getCorrespondingUnsaturatedType(), and isUnsaturatedFixedPointType().
bool Type::isUnscopedEnumerationType | ( | ) | const |
Definition at line 2125 of file Type.cpp.
Referenced by checkBuiltinVectorMathMixedEnums(), clang::Sema::checkEnumArithmeticConversions(), and 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 8976 of file TypeBase.h.
References isFixedPointType(), isSignedFixedPointType(), and isUnsignedFixedPointType().
Referenced by clang::ASTContext::getCorrespondingSignedFixedPointType(), handleFixedPointConversion(), and isUnsignedFixedPointType().
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 2273 of file Type.cpp.
References getAsEnumDecl().
Referenced by clang::Sema::CheckTemplateArgument(), GetValueRange(), HandleIntToIntCast(), hasUnsignedIntegerRepresentation(), clang::interp::interp__builtin_elementwise_abs(), clang::ento::SValBuilder::makeIntVal(), and clang::interp::pushInteger().
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 2253 of file Type.cpp.
References getAsEnumDecl().
Referenced by clang::Sema::ActOnStringLiteral(), clang::Sema::BuildVAArgExpr(), BuiltinCountZeroBitsGeneric(), BuiltinPopcountg(), canElideOverflowCheck(), clang::SemaOpenCL::checkBuiltinRWPipe(), CheckC23ConstexprInitStringLiteral(), clang::Sema::CheckCompatibleReinterpretCast(), checkMathBuiltinElementType(), computeOverflowPatternExclusion(), clang::Sema::DefaultArgumentPromotion(), clang::CodeGen::CodeGenFunction::EmitHLSLBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), clang::ento::SValBuilder::evalIntegralCast(), EvaluateAsStringImpl(), expandStringLiteral(), extractStringLiteralCharacter(), clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), getDotProductIntrinsic(), clang::ASTContext::getIntegerTypeOrder(), clang::ASTContext::getPromotedIntegerType(), getWaveActiveMaxIntrinsic(), getWaveActiveSumIntrinsic(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), clang::Sema::IsIntegralPromotion(), isNonNegativeIntegerExpr(), isSafeArraySubscript(), and TryGetExprRange().
|
inline |
Definition at line 8633 of file TypeBase.h.
References clang::isa(), and isVariableArrayType().
Referenced by clang::SemaOpenMP::ActOnOMPArraySectionExpr(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildCompoundLiteralExpr(), CheckICE(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CIRGen::CIRGenFunction::emitArrayToPointerDecay(), emitOMPArraySectionBase(), EquivalentArrayTypes(), getSimpleArrayDecayOperand(), isConstantSizeArrayWithMoreThanOneElement(), clang::Sema::IsCXXReplaceableType(), clang::Sema::IsCXXTriviallyRelocatableType(), isLiteralType(), isSimpleArrayDecayOperand(), and isVariableArrayType().
|
inline |
Whether this type is a variably-modified type (C99 6.7.5).
Definition at line 2800 of file TypeBase.h.
References getDependence().
Referenced by clang::Sema::ActOnFunctionDeclarator(), actOnOMPReductionKindClause(), clang::SemaOpenMP::ActOnOpenMPCopyprivateClause(), clang::SemaOpenMP::ActOnOpenMPFirstprivateClause(), clang::SemaOpenMP::ActOnOpenMPPrivateClause(), clang::Sema::BuildCXXTypeId(), clang::Sema::BuildExceptionDeclaration(), clang::Sema::CheckAllocatedType(), CheckC23ConstexprVarType(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CreateUnaryExprOrTypeTraitExpr(), diagnoseArrayStarInParamType(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CodeGen::CodeGenFunction::EmitCallArgs(), clang::CodeGen::CodeGenFunction::EmitCapturedLocals(), clang::CodeGen::CodeGenFunction::EmitCompoundLiteralLValue(), clang::CIRGen::CIRGenFunction::emitCompoundLiteralLValue(), clang::CodeGen::CodeGenFunction::EmitDecl(), clang::CIRGen::CIRGenFunction::emitDecl(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), clang::CIRGen::CIRGenModule::emitExplicitCastExprType(), emitOutlinedFunctionPrologue(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(), clang::CIRGen::CIRGenFunction::emitStaticVarDecl(), clang::CodeGen::CodeGenFunction::EmitVAArg(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::Sema::HandleExprEvaluationContextForTypeof(), hasSizedVLAType(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::Sema::isIncompatibleTypedef(), isVariableCapturable(), clang::MatrixType::MatrixType(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::Sema::SubstType(), clang::Sema::tryCaptureVariable(), and TryToFixInvalidVariablyModifiedType().
|
inline |
Definition at line 8661 of file TypeBase.h.
References clang::isa(), and isVectorType().
Referenced by clang::Sema::ActOnCastExpr(), clang::Sema::AddAlignedAttr(), clang::Sema::AddAlignedAttr(), adjustVectorType(), clang::Sema::anyAltivecTypes(), clang::ASTContext::areCompatibleRVVTypes(), clang::ASTContext::areCompatibleVectorTypes(), clang::ASTContext::areLaxCompatibleRVVTypes(), clang::Sema::areLaxCompatibleVectorTypes(), clang::Sema::areVectorTypesSameSize(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildVectorLiteral(), BuiltinMaskedStore(), clang::Sema::BuiltinShuffleVector(), clang::SemaPPC::BuiltinVSX(), clang::SemaHLSL::CanPerformAggregateSplatCast(), clang::SemaHLSL::CanPerformElementwiseCast(), canRecoverDotPseudoDestructorCallsOnPointerObjects(), clang::Sema::CheckAdditionOperands(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckBitwiseOperands(), clang::SemaRISCV::CheckBuiltinFunctionCall(), checkBuiltinVectorMathArgTypes(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckExtVectorCast(), CheckFloatOrHalfRepresentation(), clang::CheckFloatOrHalfRepresentation(), CheckIncrementDecrementOperand(), clang::Sema::CheckLogicalOperands(), clang::Sema::CheckMultiplyDivideOperands(), clang::Sema::CheckRemainderOperands(), clang::Sema::CheckShiftOperands(), clang::SemaSPIRV::CheckSPIRVBuiltinFunctionCall(), clang::Sema::CheckSubtractionOperands(), clang::Sema::CheckVectorCast(), clang::Sema::CheckVectorOperands(), CheckVectorSelect(), checkVectorShift(), clang::Sema::ConvertVectorExpr(), clang::Sema::CreateBuiltinUnaryOp(), clang::Sema::CXXCheckConditionalOperands(), diagnoseIfNeedsFPReg(), DiagnoseLocalRegisterBinding(), clang::CIRGen::CIRGenFunction::emitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(), EmitHLSLScalarFlatCast(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), EvaluateUnaryTypeTrait(), EvaluateVector(), handleAsDoubleBuiltin(), handleTransparentUnionAttr(), clang::interp::interp__builtin_elementwise_maxmin(), clang::interp::interp__builtin_elementwise_triop(), clang::interp::interp__builtin_elementwise_triop_fp(), clang::Sema::InvalidLogicalVectorOperands(), clang::QualType::isCXX11PODType(), clang::Sema::IsCXXTriviallyRelocatableType(), clang::CodeGen::ABIInfo::isHomogeneousAggregate(), isIntegerLikeType(), clang::Sema::isLaxVectorConversion(), isLiteralType(), clang::Sema::IsPointerConversion(), isStandardLayoutType(), isStructuralType(), isSubscriptableVectorType(), isTrackedVar(), isTriviallyCopyableTypeImpl(), clang::QualType::isTrivialType(), clang::SemaRISCV::isValidRVVBitcast(), clang::Sema::isValidSveBitcast(), isValidVectorForConditionalCondition(), IsVectorConversion(), isVectorType(), clang::Sema::LookupTemplateName(), OpenCLCheckVectorConditional(), clang::Sema::PerformImplicitConversion(), TryReinterpretCast(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitCompoundAssignOperator(), clang::interp::Compiler< Emitter >::VisitExtVectorElementExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::interp::Compiler< Emitter >::VisitUnaryOperator(), clang::interp::Compiler< Emitter >::VisitVectorBinOp(), and clang::interp::Compiler< Emitter >::VisitVectorUnaryOperator().
|
inline |
Return true if the visibility was explicitly set is the code.
Definition at line 3070 of file TypeBase.h.
References getLinkageAndVisibility().
bool Type::isVoidPointerType | ( | ) | const |
Definition at line 712 of file Type.cpp.
References getAsCanonical().
Referenced by clang::Sema::BuildExpressionFromDeclTemplateArgument(), BuiltinLaunder(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckCompareOperands(), checkConditionalBlockPointerCompatibility(), checkIntToPointerCast(), clang::Sema::CheckSingleAssignmentConstraints(), clang::ento::SMTConv::doTypeConversion(), clang::CodeGen::CodeGenFunction::EmitDynamicCast(), clang::SemaObjC::FindCompositeObjCPointerType(), clang::Sema::FindCompositePointerType(), getExistingLazyBinding(), HandleDynamicCast(), clang::CXXDynamicCastExpr::isAlwaysNull(), isSmartPtrCall(), maybeTailCall(), TryReinterpretCast(), clang::interp::Compiler< Emitter >::VisitAddrLabelExpr(), and clang::interp::Compiler< Emitter >::VisitCastExpr().
|
inline |
Definition at line 8878 of file TypeBase.h.
References isSpecificBuiltinType(), and isVoidType().
Referenced by clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnConversionDeclarator(), clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnGCCAsmStmt(), clang::Sema::ActOnStartOfFunctionDef(), clang::SemaObjC::ActOnStartOfObjCMethodDef(), clang::CodeGen::CGDebugInfo::addHeapAllocSiteMetadata(), AddObjCKeyValueCompletions(), AddObjCProperties(), AddOrdinaryNameResults(), AnalyzeImplicitConversions(), buildCoawaitCalls(), clang::Sema::BuildCoreturnStmt(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildFunctionType(), buildLambdaScopeReturnType(), clang::SemaObjC::BuildObjCAtThrowStmt(), clang::SemaObjC::BuildObjCEncodeExpression(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::CheckAddressOfOperand(), checkArithmeticBinOpPointerOperands(), checkArithmeticOpPointerOperand(), clang::Sema::CheckCallReturnType(), CheckCommaOperands(), clang::Sema::CheckCompareOperands(), clang::Sema::CheckCompatibleReinterpretCast(), checkConditionalObjectPointersCompatibility(), clang::Sema::CheckConditionalOperands(), CheckConstantExpression(), CheckConstexprMissingReturn(), CheckConstPureAttributesUsage(), clang::Sema::CheckCXXThrowOperand(), clang::Sema::CheckFunctionDeclaration(), checkPointerTypesForAssignment(), clang::Sema::CheckSpecifiedExceptionType(), clang::Sema::CheckSubtractionOperands(), clang::SemaSYCL::CheckSYCLEntryPointFunctionDecl(), clang::Sema::CheckTransparentUnionArgumentConstraints(), CheckUnaryTypeTraitTypeCompleteness(), clang::CodeGen::DefaultABIInfo::classifyReturnType(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::Sema::CXXCheckConditionalOperands(), clang::SemaHLSL::deduceAddressSpace(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::deduceOpenCLAddressSpace(), DiagnoseBadFunctionCast(), DiagnoseCastOfObjCSEL(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CIRGen::CIRGenFunction::emitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCoreturnStmt(), clang::CodeGen::CodeGenFunction::EmitInlinedInheritingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitPointerArithmetic(), emitPointerArithmetic(), clang::CodeGen::CodeGenFunction::EmitReturnStmt(), clang::CIRGen::CIRGenFunction::emitReturnStmt(), clang::ento::StoreManager::evalBaseToDerived(), clang::ento::ExprEngine::evalCall(), EvaluateBinaryTypeTrait(), EvaluateBooleanTypeTrait(), evaluateCDTSize(), EvaluateLValue(), EvaluateVoid(), clang::Sema::FindCompositePointerType(), formatBlockPlaceholder(), clang::CodeGen::CodeGenFunction::GenerateCode(), generateDiagnosticsForCallLike(), getAArch64MTV(), GetFullTypeForDeclarator(), getNDSWDS(), getOpenCLKernelParameterType(), clang::interp::Context::getOrCreateFunction(), clang::ento::SMTConstraintManager::getSymVal(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), clang::CIRGen::CIRGenFunction::getUndefRValue(), clang::SemaSwift::handleAsyncAttr(), handleGlobalAttr(), clang::SemaSYCL::handleKernelAttr(), clang::Sema::handlerCanCatch(), HandleSizeof(), handleWarnUnusedResult(), clang::ASTContext::hasUniqueObjectRepresentations(), IgnoreCommaOperand(), clang::Sema::IgnoredValueConversions(), clang::Sema::inferLifetimeBoundAttribute(), isCARCBridgableType(), isDispatchBlock(), isFundamentalType(), isIncompleteType(), isLiteralType(), clang::Expr::isNullPointerConstant(), isObjectType(), clang::Sema::IsPointerConversion(), clang::StandardConversionSequence::isPointerConversionToVoidPointer(), clang::ento::cocoa::isRefType(), isUnitTest(), clang::Expr::isUnusedResultAWarning(), clang::Sema::isValidVarArgType(), isVoidPointerToNonConst(), isVoidType(), clang::analyze_format_string::ArgType::matchesType(), clang::APValue::printPretty(), clang::Sema::RequireLiteralType(), clang::consumed::ConsumedAnalyzer::run(), shouldBeModeledWithNoOp(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CIRGen::CIRGenFunction::startFunction(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::Sema::SubstParmVarDecl(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), tryGenerateSpecializedMessageSend(), TryGetExprRange(), TryStaticCast(), clang::interp::Compiler< Emitter >::visit(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitBuiltinCallExpr(), clang::InterfaceKindVisitor::VisitBuiltinType(), clang::interp::Compiler< Emitter >::VisitCastExpr(), clang::interp::Compiler< Emitter >::VisitCXXScalarValueInitExpr(), clang::interp::Compiler< Emitter >::visitExpr(), clang::interp::Compiler< Emitter >::visitFunc(), clang::interp::Compiler< Emitter >::visitInitList(), and warnAboutAmbiguousFunction().
bool Type::isWebAssemblyExternrefType | ( | ) | const |
Check if this is a WebAssembly Externref Type.
Definition at line 2552 of file Type.cpp.
References getAs().
Referenced by clang::QualType::isWebAssemblyExternrefType().
bool Type::isWebAssemblyTableType | ( | ) | const |
Returns true if this is a WebAssembly table type: either an array of reference types, or a pointer to a reference type (which can only be created by array to pointer decay).
Definition at line 2558 of file Type.cpp.
Referenced by clang::Sema::ActOnArraySubscriptExpr(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildFunctionType(), clang::Sema::CheckAddressOfOperand(), clang::Sema::CheckAssignmentOperands(), clang::Sema::CheckConditionalOperands(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CheckUnaryExprOrTypeTraitOperand(), clang::Sema::CXXCheckConditionalOperands(), and diagnoseTautologicalComparison().
bool Type::isWideCharType | ( | ) | const |
Definition at line 2141 of file Type.cpp.
Referenced by clang::analyze_printf::PrintfSpecifier::fixType(), clang::analyze_scanf::ScanfSpecifier::fixType(), and TryPrintAsStringLiteral().
|
inlineprotected |
|
inlineprotected |
|
friend |
Definition at line 2347 of file TypeBase.h.
References ASTContext.
Referenced by ASTContext, dump(), clang::FunctionType::getCallResultType(), getObjCSubstitutions(), getRVVEltType(), getSizelessVectorEltType(), getSveEltType(), isBlockCompatibleObjCPointerType(), isIncompleteType(), isIntegralType(), isLiteralType(), isObjCIdOrObjectKindOfType(), isPackedVectorBoolType(), isSignableIntegerType(), and isSignableType().
|
friend |
|
friend |
|
friend |
Definition at line 2377 of file TypeBase.h.
|
friend |
Definition at line 2378 of file TypeBase.h.
|
friend |
Definition at line 2339 of file TypeBase.h.
References TypeBits, TypePropertyCache, and V.
Referenced by TypePropertyCache.
union { ... } clang::Type |
ArrayTypeBitfields clang::Type::ArrayTypeBits |
Definition at line 2314 of file TypeBase.h.
Referenced by clang::ArrayType::ArrayType(), clang::ArrayType::getIndexTypeCVRQualifiers(), and clang::ArrayType::getSizeModifier().
AttributedTypeBitfields clang::Type::AttributedTypeBits |
Definition at line 2316 of file TypeBase.h.
AutoTypeBitfields clang::Type::AutoTypeBits |
Definition at line 2317 of file TypeBase.h.
BuiltinTypeBitfields clang::Type::BuiltinTypeBits |
Definition at line 2322 of file TypeBase.h.
Referenced by clang::BuiltinType::ASTContext, and clang::BuiltinType::getKind().
ConstantArrayTypeBitfields clang::Type::ConstantArrayTypeBits |
Definition at line 2315 of file TypeBase.h.
Referenced by clang::ConstantArrayType::ConstantArrayType(), clang::ConstantArrayType::getLimitedSize(), clang::ConstantArrayType::getSExtSize(), clang::ConstantArrayType::getSize(), clang::ConstantArrayType::getSizeBitWidth(), clang::ConstantArrayType::getSizeExpr(), clang::ConstantArrayType::getZExtSize(), and clang::ConstantArrayType::isZeroSize().
CountAttributedTypeBitfields clang::Type::CountAttributedTypeBits |
Definition at line 2334 of file TypeBase.h.
Referenced by clang::CountAttributedType::ASTContext, clang::CountAttributedType::isCountInBytes(), and clang::CountAttributedType::isOrNull().
FunctionTypeBitfields clang::Type::FunctionTypeBits |
Definition at line 2323 of file TypeBase.h.
Referenced by clang::FunctionType::FunctionType(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionType::getExtInfo(), clang::FunctionType::getFastTypeQuals(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getRefQualifier(), clang::FunctionProtoType::hasCFIUncheckedCallee(), clang::FunctionProtoType::hasExtParameterInfos(), clang::FunctionProtoType::hasTrailingReturn(), and clang::FunctionProtoType::isVariadic().
|
staticconstexpr |
Definition at line 1938 of file TypeBase.h.
|
staticconstexpr |
Definition at line 1937 of file TypeBase.h.
Referenced by clang::Type::FunctionTypeBitfields::FunctionType.
KeywordWrapperBitfields clang::Type::KeywordWrapperBits |
Definition at line 2326 of file TypeBase.h.
ObjCObjectTypeBitfields clang::Type::ObjCObjectTypeBits |
Definition at line 2324 of file TypeBase.h.
PackExpansionTypeBitfields clang::Type::PackExpansionTypeBits |
Definition at line 2333 of file TypeBase.h.
PresefinedSugarTypeBitfields clang::Type::PredefinedSugarTypeBits |
Definition at line 2335 of file TypeBase.h.
Referenced by clang::PredefinedSugarType::getKind().
ReferenceTypeBitfields clang::Type::ReferenceTypeBits |
Definition at line 2325 of file TypeBase.h.
Referenced by clang::ReferenceType::isInnerRef(), clang::ReferenceType::isSpelledAsLValue(), and clang::ReferenceType::ReferenceType().
SubstPackTypeBitfields clang::Type::SubstPackTypeBits |
Definition at line 2331 of file TypeBase.h.
SubstTemplateTypeParmTypeBitfields clang::Type::SubstTemplateTypeParmTypeBits |
Definition at line 2330 of file TypeBase.h.
TagTypeBitfields clang::Type::TagTypeBits |
Definition at line 2327 of file TypeBase.h.
TemplateSpecializationTypeBitfields clang::Type::TemplateSpecializationTypeBits |
Definition at line 2332 of file TypeBase.h.
TemplateTypeParmTypeBitfields clang::Type::TemplateTypeParmTypeBits |
Definition at line 2329 of file TypeBase.h.
TypeBitfields clang::Type::TypeBits |
Definition at line 2313 of file TypeBase.h.
Referenced by clang::TypePropertyCache< Private >::ensure(), getDependence(), getLinkage(), getTypeClass(), getTypeClassName(), hasUnnamedOrLocalType(), isFromAST(), isLinkageValid(), setDependence(), Type(), and TypePropertyCache.
TypedefBitfields clang::Type::TypedefBits |
Definition at line 2319 of file TypeBase.h.
Referenced by clang::TypedefType::ASTContext, clang::TypedefType::getQualifier(), and clang::TypedefType::typeMatchesDecl().
TypeOfBitfields clang::Type::TypeOfBits |
Definition at line 2318 of file TypeBase.h.
Referenced by clang::TypeOfExprType::getKind(), and clang::TypeOfExprType::TypeOfExprType().
UnresolvedUsingBitfields clang::Type::UnresolvedUsingBits |
Definition at line 2320 of file TypeBase.h.
Referenced by clang::UnresolvedUsingType::ASTContext, and clang::UnresolvedUsingType::getQualifier().
UsingBitfields clang::Type::UsingBits |
Definition at line 2321 of file TypeBase.h.
Referenced by clang::UsingType::getQualifier().
VectorTypeBitfields clang::Type::VectorTypeBits |
Definition at line 2328 of file TypeBase.h.
Referenced by clang::VectorType::getNumElements(), clang::DependentVectorType::getVectorKind(), clang::VectorType::getVectorKind(), and clang::VectorType::VectorType().