clang  6.0.0svn
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::FunctionProtoType Class Reference

Represents a prototype with parameter type info, e.g. More...

#include "clang/AST/Type.h"

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

Classes

struct  ExceptionSpecInfo
 
class  ExtParameterInfo
 Interesting information about a specific parameter that can't simply be reflected in parameter's type. More...
 
struct  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 QualTypeparam_type_iterator
 
typedef llvm::iterator_range< param_type_iteratorparam_type_range
 
typedef const QualTypeexception_iterator
 
- Public Types inherited from clang::Type
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< QualTypegetParamTypes () 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...
 
bool hasInstantiationDependentExceptionSpec () const
 Return whether this function has an instantiation-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
 
ExprgetNoexceptExpr () const
 
FunctionDeclgetExceptionSpecDecl () 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...
 
FunctionDeclgetExceptionSpecTemplate () 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...
 
CanThrowResult canThrow (const ASTContext &Ctx) const
 Determine whether this function type has a non-throwing exception specification. More...
 
bool isNothrow (const ASTContext &Ctx, bool ResultIfDependent=false) const
 Determine whether this function type has a non-throwing exception specification. 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< QualTypeexceptions () const
 
exception_iterator exception_begin () const
 
exception_iterator exception_end () const
 
bool hasExtParameterInfos () const
 Is there any interesting extra information for any of the parameters of this function type? More...
 
ArrayRef< ExtParameterInfogetExtParameterInfos () const
 
const ExtParameterInfogetExtParameterInfosOrNull () const
 Return a pointer to the beginning of the array of extra parameter information, if present, or else null if none of the parameters carry it. More...
 
ExtParameterInfo getExtParameterInfo (unsigned I) const
 
ParameterABI getParameterABI (unsigned I) 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)
 
- Public Member Functions inherited from clang::FunctionType
QualType getReturnType () const
 
bool getHasRegParm () const
 
unsigned getRegParmType () const
 
bool getNoReturnAttr () const
 Determine whether this function type includes the GNU noreturn attribute. More...
 
CallingConv getCallConv () const
 
ExtInfo getExtInfo () const
 
bool isConst () const
 
bool isVolatile () const
 
bool isRestrict () const
 
QualType getCallResultType (const ASTContext &Context) const
 Determine the type of an expression that calls a function of this type. More...
 
- Public Member Functions inherited from clang::Type
TypeClass getTypeClass () const
 
bool isFromAST () const
 Whether this type comes from an AST file. More...
 
bool containsUnexpandedParameterPack () const
 Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templates. More...
 
bool isCanonicalUnqualified () const
 Determines if this type would be canonical if it had no further qualification. More...
 
QualType getLocallyUnqualifiedSingleStepDesugaredType () const
 Pull a single level of sugar off of this locally-unqualified type. More...
 
bool isIncompleteType (NamedDecl **Def=nullptr) const
 Types are partitioned into 3 broad categories (C99 6.2.5p1): object types, function types, and incomplete types. More...
 
bool isIncompleteOrObjectType () const
 Return true if this is an incomplete or object type, in other words, not a function type. More...
 
bool isObjectType () const
 Determine whether this type is an object type. More...
 
bool isLiteralType (const ASTContext &Ctx) const
 Return true if this is a literal type (C++11 [basic.types]p10) More...
 
bool isStandardLayoutType () const
 Test if this type is a standard-layout type. More...
 
bool isBuiltinType () const
 Helper methods to distinguish type categories. More...
 
bool isSpecificBuiltinType (unsigned K) const
 Test for a particular builtin type. More...
 
bool isPlaceholderType () const
 Test for a type which does not represent an actual type-system type but is instead used as a placeholder for various convenient purposes within Clang. More...
 
const BuiltinTypegetAsPlaceholderType () const
 
bool isSpecificPlaceholderType (unsigned K) const
 Test for a specific placeholder type. More...
 
bool isNonOverloadPlaceholderType () const
 Test for a placeholder type other than Overload; see BuiltinType::isNonOverloadPlaceholderType. More...
 
bool isIntegerType () const
 isIntegerType() does not include complex integers (a GCC extension). More...
 
bool isEnumeralType () const
 
bool 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 (const ASTContext &Ctx) const
 Determine whether this type is an integral type. More...
 
bool isIntegralOrEnumerationType () const
 Determine whether this type is an integral or enumeration type. More...
 
bool isIntegralOrUnscopedEnumerationType () const
 Determine whether this type is an integral or unscoped enumeration type. More...
 
bool isRealFloatingType () const
 Floating point categories. More...
 
bool isComplexType () const
 isComplexType() does not include complex integers (a GCC extension). More...
 
bool isAnyComplexType () const
 
bool isFloatingType () const
 
bool isHalfType () const
 
bool 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
 Returns true if objects of this type have lifetime semantics under ARC. More...
 
bool isObjCIndirectLifetimeType () const
 
bool isObjCNSObjectType () const
 
bool isObjCIndependentClassType () const
 
bool isObjCObjectType () const
 
bool isObjCQualifiedInterfaceType () const
 
bool isObjCQualifiedIdType () const
 
bool isObjCQualifiedClassType () const
 
bool isObjCObjectOrInterfaceType () const
 
bool isObjCIdType () const
 
bool isObjCInertUnsafeUnretainedType () const
 Was this type written with the special inert-in-MRC __unsafe_unretained qualifier? More...
 
bool isObjCIdOrObjectKindOfType (const ASTContext &ctx, const ObjCObjectType *&bound) const
 Whether the type is Objective-C 'id' or a __kindof type of an object type, e.g., __kindof NSView * or __kindof id <NSCopying>. More...
 
bool isObjCClassType () const
 
bool isObjCClassOrClassKindOfType () const
 Whether the type is Objective-C 'Class' or a __kindof type of an Class type, e.g., __kindof Class <NSCopying>. More...
 
bool isBlockCompatibleObjCPointerType (ASTContext &ctx) const
 
bool isObjCSelType () const
 
bool isObjCBuiltinType () const
 
bool isObjCARCBridgableType () const
 Determine whether the given type T is a "bridgable" Objective-C type, which is either an Objective-C object pointer type or an. More...
 
bool isCARCBridgableType () const
 Determine whether the given type T is a "bridgeable" C type. More...
 
bool isTemplateTypeParmType () const
 
bool isNullPtrType () const
 
bool isAlignValT () const
 
bool isStdByteType () const
 
bool isAtomicType () const
 
bool isImageType () const
 
bool isSamplerT () const
 
bool isEventT () const
 
bool isClkEventT () const
 
bool isQueueT () const
 
bool isReserveIDT () const
 
bool isPipeType () const
 
bool isOpenCLSpecificType () const
 
bool isObjCARCImplicitlyUnretainedType () const
 Determines if this type, which must satisfy isObjCLifetimeType(), is implicitly __unsafe_unretained rather than implicitly __strong. More...
 
Qualifiers::ObjCLifetime getObjCARCImplicitLifetime () const
 Return the implicit lifetime for this type, which must not be dependent. More...
 
ScalarTypeKind getScalarTypeKind () const
 Given that this is a scalar type, classify it. More...
 
bool isDependentType () const
 Whether this type is a dependent type, meaning that its definition somehow depends on a template parameter (C++ [temp.dep.type]). More...
 
bool isInstantiationDependentType () const
 Determine whether this type is an instantiation-dependent type, meaning that the type involves a template parameter (even if the definition does not actually depend on the type substituted for that template parameter). More...
 
bool isUndeducedType () const
 Determine whether this type is an undeduced type, meaning that it somehow involves a C++11 'auto' type or similar which has not yet been deduced. More...
 
bool isVariablyModifiedType () const
 Whether this type is a variably-modified type (C99 6.7.5). More...
 
bool hasSizedVLAType () const
 Whether this type involves a variable-length array type with a definite size. More...
 
bool hasUnnamedOrLocalType () const
 Whether this type is or contains a local or unnamed type. More...
 
bool isOverloadableType () const
 Determines whether this is a type for which one can define an overloaded operator. More...
 
bool isElaboratedTypeSpecifier () const
 Determine wither this type is a C++ elaborated-type-specifier. More...
 
bool canDecayToPointerType () const
 Determines whether this type can decay to a pointer type. More...
 
bool hasPointerRepresentation () const
 Whether this type is represented natively as a pointer. More...
 
bool hasObjCPointerRepresentation () const
 Whether this type can represent an objective pointer type for the purpose of GC'ability. More...
 
bool hasIntegerRepresentation () const
 Determine whether this type has an integer representation of some sort, e.g., it is an integer type or a vector. More...
 
bool hasSignedIntegerRepresentation () const
 Determine whether this type has an signed integer representation of some sort, e.g., it is an signed integer type or a vector. More...
 
bool hasUnsignedIntegerRepresentation () const
 Determine whether this type has an unsigned integer representation of some sort, e.g., it is an unsigned integer type or a vector. More...
 
bool hasFloatingRepresentation () const
 Determine whether this type has a floating-point representation of some sort, e.g., it is a floating-point type or a vector thereof. More...
 
const RecordTypegetAsStructureType () const
 
const RecordTypegetAsUnionType () const
 NOTE: getAs*ArrayType are methods on ASTContext. More...
 
const ComplexTypegetAsComplexIntegerType () const
 
const ObjCObjectTypegetAsObjCInterfaceType () const
 
const ObjCObjectPointerTypegetAsObjCInterfacePointerType () const
 
const ObjCObjectPointerTypegetAsObjCQualifiedIdType () const
 
const ObjCObjectPointerTypegetAsObjCQualifiedClassType () const
 
const ObjCObjectTypegetAsObjCQualifiedInterfaceType () const
 
CXXRecordDeclgetAsCXXRecordDecl () const
 Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or because it is the injected-class-name type of a class template or class template partial specialization. More...
 
TagDeclgetAsTagDecl () const
 Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is the injected-class-name type of a class template or class template partial specialization. More...
 
const CXXRecordDeclgetPointeeCXXRecordDecl () const
 If this is a pointer or reference to a RecordType, return the CXXRecordDecl that that type refers to. More...
 
DeducedTypegetContainedDeducedType () const
 Get the DeducedType whose type will be deduced for a variable with an initializer of this type. More...
 
AutoTypegetContainedAutoType () const
 Get the AutoType whose type will be deduced for a variable with an initializer of this type. More...
 
bool hasAutoForTrailingReturnType () const
 Determine whether this type was written with a leading 'auto' corresponding to a trailing return type (possibly for a nested function type within a pointer to function type or similar). More...
 
template<typename T >
const T * getAs () const
 Member-template getAs<specific type>'. More...
 
template<typename T >
const T * getAsAdjusted () const
 Member-template getAsAdjusted<specific type>. More...
 
const ArrayTypegetAsArrayTypeUnsafe () const
 A variant of getAs<> for array types which silently discards qualifiers from the outermost type. More...
 
template<typename T >
const T * castAs () const
 Member-template castAs<specific type>. More...
 
const ArrayTypecastAsArrayTypeUnsafe () const
 A variant of castAs<> for array type which silently discards qualifiers from the outermost type. More...
 
const TypegetBaseElementTypeUnsafe () const
 Get the base element type of this type, potentially discarding type qualifiers. More...
 
const TypegetArrayElementTypeNoTypeQual () const
 If this is an array type, return the element type of the array, potentially with type qualifiers missing. More...
 
const TypegetPointeeOrArrayElementType () const
 If this is a pointer type, return the pointee type. More...
 
QualType getPointeeType () const
 If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee. More...
 
const TypegetUnqualifiedDesugaredType () const
 Return the specified type with any "sugar" removed from the type, removing any typedefs, typeofs, etc., as well as any qualifiers. More...
 
bool isPromotableIntegerType () const
 More type predicates useful for type checking/promotion. More...
 
bool isSignedIntegerType () const
 Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation. More...
 
bool isUnsignedIntegerType () const
 Return true if this is an integer type that is unsigned, according to C99 6.2.5p6 [which returns true for _Bool], or an enum decl which has an unsigned representation. More...
 
bool isSignedIntegerOrEnumerationType () const
 Determines whether this is an integer type that is signed or an enumeration types whose underlying type is a signed integer type. More...
 
bool isUnsignedIntegerOrEnumerationType () const
 Determines whether this is an integer type that is unsigned or an enumeration types whose underlying type is a unsigned integer type. More...
 
bool isConstantSizeType () const
 Return true if this is not a variable sized type, according to the rules of C99 6.7.5p3. More...
 
bool isSpecifierType () const
 Returns true if this type can be represented by some set of type specifiers. More...
 
Linkage getLinkage () const
 Determine the linkage of this type. More...
 
Visibility getVisibility () const
 Determine the visibility of this type. More...
 
bool isVisibilityExplicit () const
 Return true if the visibility was explicitly set is the code. More...
 
LinkageInfo getLinkageAndVisibility () const
 Determine the linkage and visibility of this type. More...
 
bool isLinkageValid () const
 True if the computed linkage is valid. More...
 
Optional< NullabilityKindgetNullability (const ASTContext &context) const
 Determine the nullability of the given type. More...
 
bool canHaveNullability (bool ResultIfUnknown=true) const
 Determine whether the given type can have a nullability specifier applied to it, i.e., if it is any kind of pointer type. More...
 
Optional< ArrayRef< QualType > > getObjCSubstitutions (const DeclContext *dc) const
 Retrieve the set of substitutions required when accessing a member of the Objective-C receiver type that is declared in the given context. More...
 
bool acceptsObjCTypeParams () const
 Determines if this is an ObjC interface type that may accept type parameters. More...
 
const char * getTypeClassName () const
 
QualType getCanonicalTypeInternal () const
 
CanQualType getCanonicalTypeUnqualified () const
 
void dump () const
 
void dump (llvm::raw_ostream &OS) const
 
template<>
const TypedefTypegetAs () const
 This will check for a TypedefType by removing any existing sugar until it reaches a TypedefType or a non-sugared type. More...
 
template<>
const TemplateSpecializationTypegetAs () const
 This will check for a TemplateSpecializationType by removing any existing sugar until it reaches a TemplateSpecializationType or a non-sugared type. More...
 
template<>
const AttributedTypegetAs () const
 This will check for an AttributedType by removing any existing sugar until it reaches an AttributedType or a non-sugared type. More...
 

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, bool Canonical)
 
- Static Public Member Functions inherited from clang::FunctionType
static StringRef getNameForCallConv (CallingConv CC)
 
static bool classof (const Type *T)
 

Friends

class ASTContext
 

Additional Inherited Members

- Protected Member Functions inherited from clang::FunctionType
 FunctionType (TypeClass tc, QualType res, QualType Canonical, bool Dependent, bool InstantiationDependent, bool VariablyModified, bool ContainsUnexpandedParameterPack, ExtInfo Info)
 
unsigned getTypeQuals () const
 
- Protected Member Functions inherited from clang::Type
Typethis_ ()
 
 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)
 
- Protected Attributes inherited from clang::Type
union {
   TypeBitfields   TypeBits
 
   ArrayTypeBitfields   ArrayTypeBits
 
   AttributedTypeBitfields   AttributedTypeBits
 
   AutoTypeBitfields   AutoTypeBits
 
   BuiltinTypeBitfields   BuiltinTypeBits
 
   FunctionTypeBitfields   FunctionTypeBits
 
   ObjCObjectTypeBitfields   ObjCObjectTypeBits
 
   ReferenceTypeBitfields   ReferenceTypeBits
 
   TypeWithKeywordBitfields   TypeWithKeywordBits
 
   VectorTypeBitfields   VectorTypeBits
 
}; 
 

Detailed Description

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.

Definition at line 3126 of file Type.h.

Member Typedef Documentation

◆ exception_iterator

Definition at line 3472 of file Type.h.

◆ param_type_iterator

Definition at line 3459 of file Type.h.

◆ param_type_range

Definition at line 3460 of file Type.h.

Member Enumeration Documentation

◆ NoexceptResult

Result type of getNoexceptSpec().

Enumerator
NR_NoNoexcept 

There is no noexcept specifier.

NR_BadNoexcept 

The noexcept specifier has a bad expression.

NR_Dependent 

The noexcept specifier is dependent.

NR_Throw 

The noexcept specifier evaluates to false.

NR_Nothrow 

The noexcept specifier evaluates to true.

Definition at line 3389 of file Type.h.

Member Function Documentation

◆ canThrow()

CanThrowResult FunctionProtoType::canThrow ( const ASTContext Ctx) const

Determine whether this function type has a non-throwing exception specification.

Definition at line 2805 of file Type.cpp.

References clang::CT_Cannot, clang::EST_BasicNoexcept, clang::EST_Dynamic, clang::EST_DynamicNone, clang::EST_Unevaluated, and clang::EST_Uninstantiated.

Referenced by DeduceTemplateArgumentsByTypeMatch().

◆ classof()

static bool clang::FunctionProtoType::classof ( const Type T)
inlinestatic

Definition at line 3531 of file Type.h.

References clang::Type::getTypeClass(), and clang::Result.

◆ desugar()

QualType clang::FunctionProtoType::desugar ( ) const
inline

Definition at line 3526 of file Type.h.

◆ exception_begin()

exception_iterator clang::FunctionProtoType::exception_begin ( ) const
inline

Definition at line 3477 of file Type.h.

Referenced by clang::CheckEquivalentExceptionSpecImpl().

◆ exception_end()

exception_iterator clang::FunctionProtoType::exception_end ( ) const
inline

Definition at line 3481 of file Type.h.

References clang::EST_Dynamic.

◆ exceptions()

ArrayRef<QualType> clang::FunctionProtoType::exceptions ( ) const
inline

◆ getExceptionSpecDecl()

FunctionDecl* clang::FunctionProtoType::getExceptionSpecDecl ( ) const
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 3413 of file Type.h.

References clang::EST_Unevaluated, and clang::EST_Uninstantiated.

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

◆ getExceptionSpecTemplate()

FunctionDecl* clang::FunctionProtoType::getExceptionSpecTemplate ( ) const
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 3423 of file Type.h.

References clang::EST_Uninstantiated.

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

◆ getExceptionSpecType()

ExceptionSpecificationType clang::FunctionProtoType::getExceptionSpecType ( ) const
inline

◆ getExceptionType()

QualType clang::FunctionProtoType::getExceptionType ( unsigned  i) const
inline

Definition at line 3399 of file Type.h.

◆ getExtParameterInfo()

ExtParameterInfo clang::FunctionProtoType::getExtParameterInfo ( unsigned  I) const
inline

Definition at line 3504 of file Type.h.

Referenced by clang::getParameterABISpelling().

◆ getExtParameterInfos()

ArrayRef<ExtParameterInfo> clang::FunctionProtoType::getExtParameterInfos ( ) const
inline

◆ getExtParameterInfosOrNull()

const ExtParameterInfo* clang::FunctionProtoType::getExtParameterInfosOrNull ( ) const
inline

Return a pointer to the beginning of the array of extra parameter information, if present, or else null if none of the parameters carry it.

This is equivalent to getExtProtoInfo().ExtParameterInfos.

Definition at line 3498 of file Type.h.

Referenced by clang::TreeTransform< Derived >::TransformFunctionProtoType().

◆ getExtProtoInfo()

ExtProtoInfo clang::FunctionProtoType::getExtProtoInfo ( ) const
inline

◆ getNoexceptExpr()

Expr* clang::FunctionProtoType::getNoexceptExpr ( ) const
inline

Definition at line 3403 of file Type.h.

References clang::EST_ComputedNoexcept.

Referenced by DeduceTemplateArgumentsByTypeMatch().

◆ getNoexceptSpec()

FunctionProtoType::NoexceptResult FunctionProtoType::getNoexceptSpec ( const ASTContext Ctx) const

◆ getNumExceptions()

unsigned clang::FunctionProtoType::getNumExceptions ( ) const
inline

◆ getNumParams()

unsigned clang::FunctionProtoType::getNumParams ( ) const
inline

◆ getParameterABI()

ParameterABI clang::FunctionProtoType::getParameterABI ( unsigned  I) const
inline

Definition at line 3511 of file Type.h.

◆ getParamType()

QualType clang::FunctionProtoType::getParamType ( unsigned  i) const
inline

◆ getParamTypes()

ArrayRef<QualType> clang::FunctionProtoType::getParamTypes ( ) const
inline

◆ getRefQualifier()

RefQualifierKind clang::FunctionProtoType::getRefQualifier ( ) const
inline

Retrieve the ref-qualifier associated with this function type.

Definition at line 3455 of file Type.h.

Referenced by DeduceTemplateArgumentsByTypeMatch(), getFunctionQualifiersAsString(), and clang::getParameterABISpelling().

◆ getTypeQuals()

unsigned clang::FunctionProtoType::getTypeQuals ( ) const
inline

◆ hasDependentExceptionSpec()

bool FunctionProtoType::hasDependentExceptionSpec ( ) const

Return whether this function has a dependent exception spec.

Definition at line 2760 of file Type.cpp.

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

◆ hasDynamicExceptionSpec()

bool clang::FunctionProtoType::hasDynamicExceptionSpec ( ) const
inline

Return whether this function has a dynamic (throw) exception spec.

Definition at line 3376 of file Type.h.

References clang::isDynamicExceptionSpec().

◆ hasExceptionSpec()

bool clang::FunctionProtoType::hasExceptionSpec ( ) const
inline

◆ hasExtParameterInfos()

bool clang::FunctionProtoType::hasExtParameterInfos ( ) const
inline

Is there any interesting extra information for any of the parameters of this function type?

Definition at line 3489 of file Type.h.

Referenced by addExtParameterInfosForCall(), clang::ASTContext::doFunctionTypesMatchOnExtParameterInfos(), and getExtParameterInfosForCall().

◆ hasInstantiationDependentExceptionSpec()

bool FunctionProtoType::hasInstantiationDependentExceptionSpec ( ) const

Return whether this function has an instantiation-dependent exception spec.

Definition at line 2772 of file Type.cpp.

◆ hasNoexceptExceptionSpec()

bool clang::FunctionProtoType::hasNoexceptExceptionSpec ( ) const
inline

Return whether this function has a noexcept exception spec.

Definition at line 3380 of file Type.h.

References clang::isNoexceptExceptionSpec().

◆ hasTrailingReturn()

bool clang::FunctionProtoType::hasTrailingReturn ( ) const
inline

◆ isNothrow()

bool clang::FunctionProtoType::isNothrow ( const ASTContext Ctx,
bool  ResultIfDependent = false 
) const
inline

Determine whether this function type has a non-throwing exception specification.

If this depends on template arguments, returns ResultIfDependent.

Definition at line 3434 of file Type.h.

References clang::CT_Can, and clang::CT_Cannot.

Referenced by AddAttributesFromFunctionProtoType(), clang::ast_matchers::AST_POLYMORPHIC_MATCHER(), and EvaluateUnaryTypeTrait().

◆ isParamConsumed()

bool clang::FunctionProtoType::isParamConsumed ( unsigned  I) const
inline

Definition at line 3518 of file Type.h.

◆ isSugared()

bool clang::FunctionProtoType::isSugared ( ) const
inline

Definition at line 3525 of file Type.h.

◆ isTemplateVariadic()

bool FunctionProtoType::isTemplateVariadic ( ) const

◆ isVariadic()

bool clang::FunctionProtoType::isVariadic ( ) const
inline

◆ param_type_begin()

param_type_iterator clang::FunctionProtoType::param_type_begin ( ) const
inline

◆ param_type_end()

param_type_iterator clang::FunctionProtoType::param_type_end ( ) const
inline

◆ param_types()

param_type_range clang::FunctionProtoType::param_types ( ) const
inline

◆ printExceptionSpecification()

void FunctionProtoType::printExceptionSpecification ( raw_ostream &  OS,
const PrintingPolicy Policy 
) const

Definition at line 597 of file TypePrinter.cpp.

References clang::EST_MSAny.

Referenced by clang::getParameterABISpelling().

◆ Profile() [1/2]

void FunctionProtoType::Profile ( llvm::FoldingSetNodeID &  ID,
const ASTContext Ctx 
)

◆ Profile() [2/2]

static void clang::FunctionProtoType::Profile ( llvm::FoldingSetNodeID &  ID,
QualType  Result,
param_type_iterator  ArgTys,
unsigned  NumArgs,
const ExtProtoInfo EPI,
const ASTContext Context,
bool  Canonical 
)
static

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 3307 of file Type.h.


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