clang
3.7.0
|
#include <Type.h>
Classes | |
class | ExtInfo |
Public Member Functions | |
QualType | getReturnType () const |
bool | getHasRegParm () const |
unsigned | getRegParmType () const |
bool | getNoReturnAttr () const |
Determine whether this function type includes the GNU noreturn attribute. The C++11 [[noreturn]] attribute does not affect the function type. More... | |
CallingConv | getCallConv () const |
ExtInfo | getExtInfo () const |
bool | isConst () const |
bool | isVolatile () const |
bool | isRestrict () const |
QualType | getCallResultType (ASTContext &Context) const |
Determine the type of an expression that calls a function of this type. More... | |
![]() | |
TypeClass | getTypeClass () const |
bool | isFromAST () const |
Whether this type comes from an AST file. More... | |
bool | containsUnexpandedParameterPack () const |
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates. More... | |
bool | isCanonicalUnqualified () const |
QualType | getLocallyUnqualifiedSingleStepDesugaredType () const |
bool | isIncompleteType (NamedDecl **Def=nullptr) const |
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. More... | |
bool | isIncompleteOrObjectType () const |
bool | isObjectType () const |
Determine whether this type is an object type. More... | |
bool | isLiteralType (const ASTContext &Ctx) const |
bool | isStandardLayoutType () const |
Test if this type is a standard-layout type. (C++0x [basic.type]p9) More... | |
bool | isBuiltinType () const |
isBuiltinType - returns true if the type is a builtin type. More... | |
bool | isSpecificBuiltinType (unsigned K) const |
isSpecificBuiltinType - Test for a particular builtin type. More... | |
bool | isPlaceholderType () const |
const BuiltinType * | getAsPlaceholderType () const |
bool | isSpecificPlaceholderType (unsigned K) const |
isSpecificPlaceholderType - Test for a specific placeholder type. More... | |
bool | isNonOverloadPlaceholderType () const |
bool | isIntegerType () const |
bool | isEnumeralType () const |
bool | isBooleanType () const |
bool | isCharType () const |
bool | isWideCharType () const |
bool | isChar16Type () const |
bool | isChar32Type () const |
bool | isAnyCharacterType () const |
Determine whether this type is any of the built-in character types. More... | |
bool | isIntegralType (ASTContext &Ctx) const |
Determine whether this type is an integral type. More... | |
bool | isIntegralOrEnumerationType () const |
Determine whether this type is an integral or enumeration type. More... | |
bool | isIntegralOrUnscopedEnumerationType () const |
Determine whether this type is an integral or unscoped enumeration type. More... | |
bool | isRealFloatingType () const |
Floating point categories. More... | |
bool | isComplexType () const |
bool | isAnyComplexType () const |
bool | isFloatingType () const |
bool | isHalfType () const |
bool | isRealType () const |
bool | isArithmeticType () const |
bool | isVoidType () const |
bool | isScalarType () const |
bool | isAggregateType () const |
Determines whether the type is a C++ aggregate type or C aggregate or union type. More... | |
bool | isFundamentalType () const |
Tests whether the type is categorized as a fundamental type. More... | |
bool | isCompoundType () const |
Tests whether the type is categorized as a compound type. More... | |
bool | isFunctionType () const |
bool | isFunctionNoProtoType () const |
bool | isFunctionProtoType () const |
bool | isPointerType () const |
bool | isAnyPointerType () const |
bool | isBlockPointerType () const |
bool | isVoidPointerType () const |
bool | isReferenceType () const |
bool | isLValueReferenceType () const |
bool | isRValueReferenceType () const |
bool | isFunctionPointerType () const |
bool | isMemberPointerType () const |
bool | isMemberFunctionPointerType () const |
bool | isMemberDataPointerType () const |
bool | isArrayType () const |
bool | isConstantArrayType () const |
bool | isIncompleteArrayType () const |
bool | isVariableArrayType () const |
bool | isDependentSizedArrayType () const |
bool | isRecordType () const |
bool | isClassType () const |
bool | isStructureType () const |
bool | isObjCBoxableRecordType () const |
bool | isInterfaceType () const |
bool | isStructureOrClassType () const |
bool | isUnionType () const |
bool | isComplexIntegerType () const |
bool | isVectorType () const |
bool | isExtVectorType () const |
bool | isObjCObjectPointerType () const |
bool | isObjCRetainableType () const |
bool | isObjCLifetimeType () const |
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 | isObjCIdOrObjectKindOfType (const ASTContext &ctx, const ObjCObjectType *&bound) const |
bool | isObjCClassType () const |
bool | isObjCClassOrClassKindOfType () const |
bool | isBlockCompatibleObjCPointerType (ASTContext &ctx) const |
bool | isObjCSelType () const |
bool | isObjCBuiltinType () const |
bool | isObjCARCBridgableType () const |
Determine whether the given type T is a "bridgable" Objective-C type, which is either an Objective-C object pointer type or an. More... | |
bool | isCARCBridgableType () const |
Determine whether the given type T is a "bridgeable" C type. More... | |
bool | isTemplateTypeParmType () const |
bool | isNullPtrType () const |
bool | isAtomicType () const |
bool | isImage1dT () const |
bool | isImage1dArrayT () const |
bool | isImage1dBufferT () const |
bool | isImage2dT () const |
bool | isImage2dArrayT () const |
bool | isImage3dT () const |
bool | isImageType () const |
bool | isSamplerT () const |
bool | isEventT () const |
bool | isOpenCLSpecificType () const |
bool | isObjCARCImplicitlyUnretainedType () const |
Qualifiers::ObjCLifetime | getObjCARCImplicitLifetime () const |
Return the implicit lifetime for this type, which must not be dependent. More... | |
ScalarTypeKind | getScalarTypeKind () const |
getScalarTypeKind - Given that this is a scalar type, classify it. More... | |
bool | isDependentType () const |
bool | isInstantiationDependentType () const |
Determine whether this type is an instantiation-dependent type, meaning that the type involves a template parameter (even if the definition does not actually depend on the type substituted for that template parameter). More... | |
bool | isUndeducedType () const |
Determine whether this type is an undeduced type, meaning that it somehow involves a C++11 'auto' type which has not yet been deduced. More... | |
bool | isVariablyModifiedType () const |
Whether this type is a variably-modified type (C99 6.7.5). More... | |
bool | hasSizedVLAType () const |
Whether this type involves a variable-length array type with a definite size. More... | |
bool | hasUnnamedOrLocalType () const |
Whether this type is or contains a local or unnamed type. More... | |
bool | isOverloadableType () const |
Determines whether this is a type for which one can define an overloaded operator. More... | |
bool | isElaboratedTypeSpecifier () const |
Determine wither this type is a C++ elaborated-type-specifier. More... | |
bool | canDecayToPointerType () const |
Determines whether this type can decay to a pointer type. More... | |
bool | hasPointerRepresentation () const |
bool | hasObjCPointerRepresentation () const |
bool | hasIntegerRepresentation () const |
Determine whether this type has an integer representation of some sort, e.g., it is an integer type or a vector. More... | |
bool | hasSignedIntegerRepresentation () const |
Determine whether this type has an signed integer representation of some sort, e.g., it is an signed integer type or a vector. More... | |
bool | hasUnsignedIntegerRepresentation () const |
Determine whether this type has an unsigned integer representation of some sort, e.g., it is an unsigned integer type or a vector. More... | |
bool | hasFloatingRepresentation () const |
Determine whether this type has a floating-point representation of some sort, e.g., it is a floating-point type or a vector thereof. More... | |
const RecordType * | getAsStructureType () const |
const RecordType * | getAsUnionType () const |
NOTE: getAs*ArrayType are methods on ASTContext. More... | |
const ComplexType * | getAsComplexIntegerType () const |
const ObjCObjectType * | getAsObjCInterfaceType () const |
const ObjCObjectPointerType * | getAsObjCInterfacePointerType () const |
const ObjCObjectPointerType * | getAsObjCQualifiedIdType () const |
const ObjCObjectPointerType * | getAsObjCQualifiedClassType () const |
const ObjCObjectType * | getAsObjCQualifiedInterfaceType () const |
CXXRecordDecl * | getAsCXXRecordDecl () const |
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or because it is the injected-class-name type of a class template or class template partial specialization. More... | |
TagDecl * | getAsTagDecl () const |
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is the injected-class-name type of a class template or class template partial specialization. More... | |
const CXXRecordDecl * | getPointeeCXXRecordDecl () const |
AutoType * | getContainedAutoType () const |
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. More... | |
template<typename T > | |
const T * | getAs () const |
const ArrayType * | getAsArrayTypeUnsafe () const |
template<typename T > | |
const T * | castAs () const |
const ArrayType * | castAsArrayTypeUnsafe () const |
const Type * | getBaseElementTypeUnsafe () const |
const Type * | getArrayElementTypeNoTypeQual () const |
QualType | getPointeeType () const |
const Type * | getUnqualifiedDesugaredType () const |
bool | isPromotableIntegerType () const |
More type predicates useful for type checking/promotion. More... | |
bool | isSignedIntegerType () const |
bool | isUnsignedIntegerType () const |
bool | isSignedIntegerOrEnumerationType () const |
bool | isUnsignedIntegerOrEnumerationType () const |
bool | isConstantSizeType () const |
bool | isSpecifierType () const |
Linkage | getLinkage () const |
Determine the linkage of this type. More... | |
Visibility | getVisibility () const |
Determine the visibility of this type. More... | |
bool | isVisibilityExplicit () const |
Return true if the visibility was explicitly set is the code. More... | |
LinkageInfo | getLinkageAndVisibility () const |
Determine the linkage and visibility of this type. More... | |
bool | isLinkageValid () const |
True if the computed linkage is valid. Used for consistency checking. Should always return true. More... | |
Optional< NullabilityKind > | getNullability (const ASTContext &context) const |
bool | canHaveNullability () const |
Optional< ArrayRef< QualType > > | getObjCSubstitutions (const DeclContext *dc) const |
bool | acceptsObjCTypeParams () const |
const char * | getTypeClassName () const |
QualType | getCanonicalTypeInternal () const |
CanQualType | getCanonicalTypeUnqualified () const |
void | dump () const |
template<> | |
const TypedefType * | getAs () const |
This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type. More... | |
template<> | |
const TemplateSpecializationType * | getAs () const |
This will check for a TemplateSpecializationType by removing any existing sugar until it reaches a TemplateSpecializationType or a non-sugared type. More... | |
template<> | |
const AttributedType * | getAs () const |
This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type. More... | |
Static Public Member Functions | |
static StringRef | getNameForCallConv (CallingConv CC) |
static bool | classof (const Type *T) |
Protected Member Functions | |
FunctionType (TypeClass tc, QualType res, QualType Canonical, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack, ExtInfo Info) | |
unsigned | getTypeQuals () const |
![]() | |
Type * | this_ () |
Type (TypeClass tc, QualType canon, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack) | |
void | setDependent (bool D=true) |
void | setInstantiationDependent (bool D=true) |
void | setVariablyModified (bool VM=true) |
void | setContainsUnexpandedParameterPack (bool PP=true) |
Additional Inherited Members | |
![]() | |
enum | TypeClass { TagFirst = Record, TagLast = Enum } |
enum | ScalarTypeKind { STK_CPointer, STK_BlockPointer, STK_ObjCObjectPointer, STK_MemberPointer, STK_Bool, STK_Integral, STK_Floating, STK_IntegralComplex, STK_FloatingComplex } |
![]() | |
union { | |
TypeBitfields TypeBits | |
ArrayTypeBitfields ArrayTypeBits | |
AttributedTypeBitfields AttributedTypeBits | |
AutoTypeBitfields AutoTypeBits | |
BuiltinTypeBitfields BuiltinTypeBits | |
FunctionTypeBitfields FunctionTypeBits | |
ObjCObjectTypeBitfields ObjCObjectTypeBits | |
ReferenceTypeBitfields ReferenceTypeBits | |
TypeWithKeywordBitfields TypeWithKeywordBits | |
VectorTypeBitfields VectorTypeBits | |
}; | |
FunctionType - C99 6.7.5.3 - Function Declarators. This is the common base class of FunctionNoProtoType and FunctionProtoType.
|
inlineprotected |
Definition at line 2939 of file Type.h.
References clang::Type::FunctionTypeBits.
Definition at line 2974 of file Type.h.
References clang::Type::getTypeClass().
|
inline |
Definition at line 2960 of file Type.h.
References clang::FunctionType::ExtInfo::getCC(), and getExtInfo().
Referenced by clang::Sema::adjustCCAndNoReturn(), clang::Sema::adjustMemberFunctionCC(), clang::Sema::CheckOverridingFunctionAttributes(), getCallingConvMangling(), and handleFunctionTypeAttr().
|
inline |
Determine the type of an expression that calls a function of this type.
Definition at line 2968 of file Type.h.
References clang::QualType::getNonLValueExprType(), and getReturnType().
Referenced by clang::Sema::BuildCallToMemberFunction(), and clang::Sema::BuildResolvedCallExpr().
|
inline |
Definition at line 2961 of file Type.h.
References clang::FunctionType::ExtInfo::ExtInfo(), and clang::Type::FunctionTypeBits.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::adjustCCAndNoReturn(), clang::ASTContext::adjustFunctionType(), adjustFunctionTypeForInstantiation(), clang::Sema::adjustMemberFunctionCC(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), arrangeFreeFunctionLikeCall(), clang::Sema::BuildDeclarationNameExpr(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), getCallConv(), clang::FunctionProtoType::getExtProtoInfo(), getHasRegParm(), getNoReturnAttr(), getRegParmType(), clang::Sema::IsBlockPointerConversion(), clang::Sema::IsNoReturnConversion(), IsStructurallyEquivalent(), clang::Sema::MaybeBindToTemporary(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeFunctionTypes(), clang::FunctionNoProtoType::Profile(), and clang::ASTNodeImporter::VisitFunctionNoProtoType().
|
inline |
Definition at line 2954 of file Type.h.
References getExtInfo(), and clang::FunctionType::ExtInfo::getHasRegParm().
Referenced by handleFunctionTypeAttr().
|
static |
Definition at line 2540 of file Type.cpp.
References clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::CC_C, clang::CC_IntelOclBicc, clang::CC_SpirFunction, clang::CC_SpirKernel, clang::CC_X86_64SysV, clang::CC_X86_64Win64, clang::CC_X86FastCall, clang::CC_X86Pascal, clang::CC_X86StdCall, clang::CC_X86ThisCall, and clang::CC_X86VectorCall.
Referenced by clang::Sema::ActOnFunctionDeclarator(), handleFunctionTypeAttr(), and clang::Sema::MergeFunctionDecl().
|
inline |
Determine whether this function type includes the GNU noreturn attribute. The C++11 [[noreturn]] attribute does not affect the function type.
Definition at line 2959 of file Type.h.
References getExtInfo(), and clang::FunctionType::ExtInfo::getNoReturn().
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnCapScopeReturnStmt(), clang::Sema::adjustCCAndNoReturn(), and clang::TemplateDeclInstantiator::InitFunctionInstantiation().
|
inline |
Definition at line 2955 of file Type.h.
References getExtInfo(), and clang::FunctionType::ExtInfo::getRegParm().
Referenced by clang::Sema::MergeFunctionDecl().
|
inline |
Definition at line 2952 of file Type.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFunctionDeclarator(), addAssociatedClassesAndNamespaces(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::ASTContext::adjustFunctionType(), appendFunctionType(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), arrangeFreeFunctionLikeCall(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildDeclarationNameExpr(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckParamExceptionSpec(), computeCachedProperties(), computeLinkageInfo(), clang::PredefinedExpr::ComputeName(), clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), FormatFunctionParameter(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), getCallResultType(), clang::CallExpr::getCallReturnType(), GetFullTypeForDeclarator(), getFunctionTypeWithExceptionSpec(), clang::ASTContext::getObjCEncodingForBlock(), clang::Sema::HandleFunctionTypeMismatch(), handleWarnUnusedResult(), hasDeducedReturnType(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), isAtLeastAsSpecializedAs(), clang::Sema::IsBlockPointerConversion(), isDispatchBlock(), clang::CodeGen::CodeGenTypes::isFuncTypeConvertible(), clang::Sema::isObjCPointerConversion(), clang::Sema::IsOverload(), IsStructurallyEquivalent(), MarkUsedTemplateParameters(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeFunctionTypes(), clang::FunctionNoProtoType::Profile(), clang::FunctionProtoType::Profile(), rewriteBuiltinFunctionDecl(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::Sema::startLambdaDefinition(), clang::CodeGen::CodeGenFunction::StartThunk(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TreeTransform< Derived >::TransformFunctionProtoType(), clang::Sema::tryExprAsCall(), clang::ASTNodeImporter::VisitFunctionNoProtoType(), and clang::ASTNodeImporter::VisitFunctionProtoType().
|
inlineprotected |
Definition at line 2949 of file Type.h.
References clang::Type::FunctionTypeBits.
Referenced by clang::FunctionProtoType::getExtProtoInfo(), clang::FunctionProtoType::getTypeQuals(), isConst(), isRestrict(), and isVolatile().
|
inline |
Definition at line 2962 of file Type.h.
References clang::Qualifiers::Const, and getTypeQuals().
Referenced by AddFunctionTypeQualsToCompletionString(), and clang::PredefinedExpr::ComputeName().
|
inline |
Definition at line 2964 of file Type.h.
References getTypeQuals(), and clang::Qualifiers::Restrict.
Referenced by AddFunctionTypeQualsToCompletionString().
|
inline |
Definition at line 2963 of file Type.h.
References getTypeQuals(), and clang::Qualifiers::Volatile.
Referenced by AddFunctionTypeQualsToCompletionString(), and clang::PredefinedExpr::ComputeName().