clang
3.7.0
|
#include <Type.h>
Classes | |
struct | ExceptionSpecInfo |
struct | ExtProtoInfo |
ExtProtoInfo - Extra information about a function prototype. More... | |
Public Types | |
enum | NoexceptResult { NR_NoNoexcept, NR_BadNoexcept, NR_Dependent, NR_Throw, NR_Nothrow } |
Result type of getNoexceptSpec(). More... | |
typedef const QualType * | param_type_iterator |
typedef llvm::iterator_range < param_type_iterator > | param_type_range |
typedef const QualType * | exception_iterator |
![]() | |
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 } |
Public Member Functions | |
unsigned | getNumParams () const |
QualType | getParamType (unsigned i) const |
ArrayRef< QualType > | getParamTypes () const |
ExtProtoInfo | getExtProtoInfo () const |
ExceptionSpecificationType | getExceptionSpecType () const |
Get the kind of exception specification on this function. More... | |
bool | hasExceptionSpec () const |
Return whether this function has any kind of exception spec. More... | |
bool | hasDynamicExceptionSpec () const |
Return whether this function has a dynamic (throw) exception spec. More... | |
bool | hasNoexceptExceptionSpec () const |
Return whether this function has a noexcept exception spec. More... | |
bool | hasDependentExceptionSpec () const |
Return whether this function has a dependent exception spec. More... | |
NoexceptResult | getNoexceptSpec (const ASTContext &Ctx) const |
Get the meaning of the noexcept spec on this function, if any. More... | |
unsigned | getNumExceptions () const |
QualType | getExceptionType (unsigned i) const |
Expr * | getNoexceptExpr () const |
FunctionDecl * | getExceptionSpecDecl () const |
If this function type has an exception specification which hasn't been determined yet (either because it has not been evaluated or because it has not been instantiated), this is the function whose exception specification is represented by this type. More... | |
FunctionDecl * | getExceptionSpecTemplate () const |
If this function type has an uninstantiated exception specification, this is the function whose exception specification should be instantiated to find the exception specification for this type. More... | |
bool | isNothrow (const ASTContext &Ctx, bool ResultIfDependent=false) const |
Determine whether this function type has a non-throwing exception specification. If this depends on template arguments, returns ResultIfDependent . More... | |
bool | isVariadic () const |
bool | isTemplateVariadic () const |
Determines whether this function prototype contains a parameter pack at the end. More... | |
bool | hasTrailingReturn () const |
unsigned | getTypeQuals () const |
RefQualifierKind | getRefQualifier () const |
Retrieve the ref-qualifier associated with this function type. More... | |
param_type_range | param_types () const |
param_type_iterator | param_type_begin () const |
param_type_iterator | param_type_end () const |
ArrayRef< QualType > | exceptions () const |
exception_iterator | exception_begin () const |
exception_iterator | exception_end () const |
bool | hasAnyConsumedParams () const |
bool | isParamConsumed (unsigned I) const |
bool | isSugared () const |
QualType | desugar () const |
void | printExceptionSpecification (raw_ostream &OS, const PrintingPolicy &Policy) const |
void | Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Ctx) |
![]() | |
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 bool | classof (const Type *T) |
static void | Profile (llvm::FoldingSetNodeID &ID, QualType Result, param_type_iterator ArgTys, unsigned NumArgs, const ExtProtoInfo &EPI, const ASTContext &Context) |
![]() | |
static StringRef | getNameForCallConv (CallingConv CC) |
static bool | classof (const Type *T) |
Friends | |
class | ASTContext |
FunctionProtoType - Represents a prototype with parameter type info, e.g. 'int foo(int)' or 'int foo(void)'. 'void' is represented as having no parameters, not as having a single void parameter. Such a type can have an exception specification, but this specification is not part of the canonical type.
typedef const QualType* clang::FunctionProtoType::exception_iterator |
typedef const QualType* clang::FunctionProtoType::param_type_iterator |
typedef llvm::iterator_range<param_type_iterator> clang::FunctionProtoType::param_type_range |
Result type of getNoexceptSpec().
Definition at line 3290 of file Type.h.
References clang::Type::getTypeClass().
|
inline |
Definition at line 3285 of file Type.h.
References clang::ExtQualsTypeCommonBase::QualType.
|
inline |
Definition at line 3266 of file Type.h.
Referenced by clang::Sema::CheckEquivalentExceptionSpec().
|
inline |
Definition at line 3270 of file Type.h.
References clang::EST_Dynamic.
Definition at line 3263 of file Type.h.
Referenced by clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::checkThisInStaticMemberFunctionExceptionSpec(), hasDependentExceptionSpec(), and clang::ASTNodeImporter::VisitFunctionProtoType().
|
inline |
If this function type has an exception specification which hasn't been determined yet (either because it has not been evaluated or because it has not been instantiated), this is the function whose exception specification is represented by this type.
Definition at line 3208 of file Type.h.
References clang::EST_Unevaluated, and clang::EST_Uninstantiated.
Referenced by addExceptionSpec(), and clang::Sema::ResolveExceptionSpec().
|
inline |
If this function type has an uninstantiated exception specification, this is the function whose exception specification should be instantiated to find the exception specification for this type.
Definition at line 3218 of file Type.h.
References clang::EST_Uninstantiated.
Referenced by addExceptionSpec(), and clang::Sema::InstantiateExceptionSpec().
|
inline |
Get the kind of exception specification on this function.
Definition at line 3166 of file Type.h.
Referenced by addExceptionSpec(), clang::ASTDeclReader::attachPreviousDeclImpl(), clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::Sema::CheckExplicitlyDefaultedMemberExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::checkThisInStaticMemberFunctionExceptionSpec(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), clang::Sema::EvaluateImplicitExceptionSpec(), getNoexceptSpec(), clang::Sema::InstantiateExceptionSpec(), isNothrow(), IsStructurallyEquivalent(), clang::Sema::MarkFunctionReferenced(), printExceptionSpecification(), and clang::Sema::ResolveExceptionSpec().
Definition at line 3194 of file Type.h.
Referenced by addExceptionSpec(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), isNothrow(), IsStructurallyEquivalent(), and printExceptionSpecification().
|
inline |
Definition at line 3142 of file Type.h.
References clang::FunctionProtoType::ExtProtoInfo::ConsumedParameters, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_Unevaluated, clang::EST_Uninstantiated, clang::FunctionProtoType::ExceptionSpecInfo::Exceptions, clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::FunctionProtoType::ExtProtoInfo::ExtInfo, clang::FunctionType::getExtInfo(), clang::FunctionType::getTypeQuals(), clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn, clang::FunctionProtoType::ExceptionSpecInfo::NoexceptExpr, clang::FunctionProtoType::ExtProtoInfo::RefQualifier, clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionProtoType::ExceptionSpecInfo::SourceTemplate, clang::FunctionProtoType::ExceptionSpecInfo::Type, clang::FunctionProtoType::ExtProtoInfo::TypeQuals, and clang::FunctionProtoType::ExtProtoInfo::Variadic.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::ASTContext::adjustDeducedFunctionResultType(), clang::Sema::AdjustDestructorExceptionSpec(), clang::ASTContext::adjustFunctionType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::ASTContext::FunctionTypesMatchOnNSConsumedAttrs(), GetFullTypeForDeclarator(), getFunctionTypeWithExceptionSpec(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), LookupDirect(), clang::Sema::MergeFunctionDecl(), clang::ASTContext::mergeFunctionTypes(), Profile(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::Sema::startLambdaDefinition(), clang::Sema::SubstExceptionSpec(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TreeTransform< Derived >::TransformFunctionProtoType(), and clang::ASTNodeImporter::VisitFunctionProtoType().
|
inline |
Definition at line 3198 of file Type.h.
References clang::EST_ComputedNoexcept.
Referenced by addExceptionSpec(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::checkThisInStaticMemberFunctionExceptionSpec(), getNoexceptSpec(), hasDependentExceptionSpec(), IsStructurallyEquivalent(), and printExceptionSpecification().
FunctionProtoType::NoexceptResult FunctionProtoType::getNoexceptSpec | ( | const ASTContext & | Ctx | ) | const |
Get the meaning of the noexcept spec on this function, if any.
Definition at line 2657 of file Type.cpp.
References clang::EST_BasicNoexcept, clang::EST_ComputedNoexcept, getExceptionSpecType(), getNoexceptExpr(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isValueDependent(), NR_BadNoexcept, NR_Dependent, NR_NoNoexcept, NR_Nothrow, and NR_Throw.
Referenced by clang::Sema::ImplicitExceptionSpecification::CalledDecl(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExceptionSpecSubset(), clang::CodeGen::CodeGenFunction::EmitEndEHSpec(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), and isNothrow().
|
inline |
Definition at line 3193 of file Type.h.
Referenced by addExceptionSpec(), clang::Sema::CheckEquivalentExceptionSpec(), clang::CodeGen::CodeGenFunction::EmitStartEHSpec(), IsStructurallyEquivalent(), and printExceptionSpecification().
|
inline |
Definition at line 3133 of file Type.h.
Referenced by clang::Sema::AddMethodCandidate(), clang::Sema::AddOverloadCandidate(), AddOverloadParameterChunks(), clang::Sema::AddSurrogateCandidate(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckMain(), clang::Sema::CheckParamExceptionSpec(), commonEmitCXXMemberOrOperatorCall(), clang::Sema::CompleteConstructorCall(), CompleteNonViableCandidate(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::ConvertArgumentsForCall(), DeduceTemplateArgumentsByTypeMatch(), EvaluateUnaryTypeTrait(), clang::Sema::FindAllocationFunctions(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::ASTContext::FunctionTypesMatchOnNSConsumedAttrs(), clang::Sema::GatherArgumentsForCall(), getAbsoluteValueArgumentType(), clang::FunctionDecl::getNumParams(), clang::Sema::HandleFunctionTypeMismatch(), IsAcceptableNonMemberOperatorCandidate(), clang::Sema::IsBlockPointerConversion(), isDispatchBlock(), isFirstArgumentCompatibleWithType(), clang::Sema::isObjCPointerConversion(), clang::Sema::IsOverload(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), IsStructurallyEquivalent(), isTemplateVariadic(), MarkUsedTemplateParameters(), clang::ASTContext::mergeFunctionTypes(), clang::NamedDecl::printQualifiedName(), rewriteBuiltinFunctionDecl(), and clang::TreeTransform< Derived >::TransformFunctionProtoType().
Definition at line 3134 of file Type.h.
Referenced by clang::Sema::AddOverloadCandidate(), AddOverloadParameterChunks(), clang::Sema::AddSurrogateCandidate(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckMain(), clang::Sema::CheckParamExceptionSpec(), CompleteNonViableCandidate(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::FindAllocationFunctions(), clang::Sema::GatherArgumentsForCall(), getAbsoluteValueArgumentType(), clang::Sema::HandleFunctionTypeMismatch(), IsAcceptableNonMemberOperatorCandidate(), clang::Sema::IsBlockPointerConversion(), isFirstArgumentCompatibleWithType(), clang::Sema::isObjCPointerConversion(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), IsStructurallyEquivalent(), isTemplateVariadic(), MarkUsedTemplateParameters(), clang::ASTContext::mergeFunctionTypes(), rewriteBuiltinFunctionDecl(), and clang::TemplateDeclInstantiator::SubstFunctionType().
Definition at line 3138 of file Type.h.
Referenced by clang::Sema::ActOnBlockStmtExpr(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFunctionDeclarator(), addBlockPointerConversion(), addFunctionPointerConversion(), clang::ASTContext::adjustDeducedFunctionResultType(), clang::ASTContext::adjustFunctionType(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), CheckNonNullArguments(), GetFullTypeForDeclarator(), getFunctionTypeWithExceptionSpec(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), clang::ASTContext::mergeFunctionTypes(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), and clang::Sema::startLambdaDefinition().
|
inline |
Retrieve the ref-qualifier associated with this function type.
Definition at line 3244 of file Type.h.
References clang::Type::FunctionTypeBits.
Referenced by checkQualifiedFunction(), DeduceTemplateArgumentsByTypeMatch(), and getFunctionQualifiersAsString().
|
inline |
Definition at line 3240 of file Type.h.
References clang::FunctionType::getTypeQuals().
Referenced by AddFunctionTypeQualsToCompletionString(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), checkQualifiedFunction(), DeduceTemplateArgumentsByTypeMatch(), getFunctionQualifiersAsString(), clang::Sema::HandleFunctionTypeMismatch(), clang::Sema::isObjCPointerConversion(), and IsStructurallyEquivalent().
|
inline |
Definition at line 3276 of file Type.h.
Referenced by clang::ASTContext::FunctionTypesMatchOnNSConsumedAttrs().
bool FunctionProtoType::hasDependentExceptionSpec | ( | ) | const |
Return whether this function has a dependent exception spec.
Definition at line 2644 of file Type.cpp.
References exceptions(), and getNoexceptExpr().
Referenced by clang::Sema::CheckExceptionSpecCompatibility().
|
inline |
Return whether this function has a dynamic (throw) exception spec.
Definition at line 3174 of file Type.h.
References clang::isDynamicExceptionSpec().
Referenced by printExceptionSpecification().
|
inline |
Return whether this function has any kind of exception spec.
Definition at line 3170 of file Type.h.
References clang::EST_None.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::AdjustDestructorExceptionSpec(), clang::Sema::CheckDistantExceptionSpec(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::hasImplicitExceptionSpec(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), and clang::ASTContext::mergeFunctionTypes().
|
inline |
Return whether this function has a noexcept exception spec.
Definition at line 3178 of file Type.h.
References clang::isNoexceptExceptionSpec().
|
inline |
Definition at line 3238 of file Type.h.
Referenced by clang::Sema::checkThisInStaticMemberFunctionType(), clang::TypeLoc::getBeginLoc(), clang::TypeLoc::getEndLoc(), clang::Sema::SubstituteExplicitTemplateArguments(), and clang::TreeTransform< Derived >::TransformFunctionProtoType().
bool FunctionProtoType::isNothrow | ( | const ASTContext & | Ctx, |
bool | ResultIfDependent = false |
||
) | const |
Determine whether this function type has a non-throwing exception specification. If this depends on template arguments, returns ResultIfDependent
.
Definition at line 2680 of file Type.cpp.
References clang::EST_BasicNoexcept, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_Unevaluated, clang::EST_Uninstantiated, getExceptionSpecType(), getExceptionType(), getNoexceptSpec(), NR_Dependent, and NR_Nothrow.
Referenced by clang::canCalleeThrow(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), EvaluateUnaryTypeTrait(), and HasNoThrowOperator().
Definition at line 3277 of file Type.h.
Referenced by clang::Sema::BuildResolvedCallExpr(), and clang::Sema::GatherArgumentsForCall().
bool FunctionProtoType::isTemplateVariadic | ( | ) | const |
Determines whether this function prototype contains a parameter pack at the end.
A function template whose last parameter is a parameter pack can be called with an arbitrary number of arguments, much like a variadic function.
Definition at line 2705 of file Type.cpp.
References getNumParams(), and getParamType().
Referenced by clang::Sema::DeduceTemplateArguments().
|
inline |
Definition at line 3228 of file Type.h.
Referenced by addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::AddMethodCandidate(), clang::Sema::AddOverloadCandidate(), AddOverloadParameterChunks(), clang::Sema::AddSurrogateCandidate(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildCXXNew(), clang::Sema::BuildResolvedCallExpr(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckMain(), clang::Sema::CompleteConstructorCall(), clang::Sema::ConvertArgumentsForCall(), clang::Sema::DeduceTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::FindAllocationFunctions(), FormatFunctionParameter(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::Sema::getVariadicCallType(), handleFunctionTypeAttr(), clang::Sema::IsBlockPointerConversion(), isFunctionOrMethodVariadic(), clang::Sema::isObjCPointerConversion(), clang::Sema::IsOverload(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), IsStructurallyEquivalent(), clang::ASTContext::mergeFunctionTypes(), clang::NamedDecl::printQualifiedName(), and rewriteBuiltinFunctionDecl().
|
inline |
Definition at line 3254 of file Type.h.
Referenced by CheckConstexprParameterTypes(), DeduceTemplateArgumentsByTypeMatch(), clang::CodeGen::CodeGenFunction::EmitBuiltinNewDeleteCall(), clang::Sema::FunctionParamTypesAreEqual(), isAtLeastAsSpecializedAs(), Profile(), and clang::TreeTransform< Derived >::TransformFunctionProtoType().
|
inline |
Definition at line 3257 of file Type.h.
Referenced by CheckConstexprParameterTypes(), clang::Sema::FunctionParamTypesAreEqual(), isAtLeastAsSpecializedAs(), and clang::TreeTransform< Derived >::TransformFunctionProtoType().
|
inline |
Definition at line 3251 of file Type.h.
Referenced by addAssociatedClassesAndNamespaces(), computeCachedProperties(), computeLinkageInfo(), rewriteBuiltinFunctionDecl(), and clang::ASTNodeImporter::VisitFunctionProtoType().
void FunctionProtoType::printExceptionSpecification | ( | raw_ostream & | OS, |
const PrintingPolicy & | Policy | ||
) | const |
Definition at line 589 of file TypePrinter.cpp.
References clang::EST_ComputedNoexcept, clang::EST_MSAny, getExceptionSpecType(), getExceptionType(), getNoexceptExpr(), getNumExceptions(), hasDynamicExceptionSpec(), clang::isNoexceptExceptionSpec(), and clang::QualType::stream().
void FunctionProtoType::Profile | ( | llvm::FoldingSetNodeID & | ID, |
const ASTContext & | Ctx | ||
) |
Definition at line 2768 of file Type.cpp.
References getExtProtoInfo(), clang::FunctionType::getReturnType(), and param_type_begin().
Referenced by clang::ASTContext::getFunctionType().
|
static |
|
friend |