clang API Documentation

Public Member Functions | Public Attributes
clang::DeclaratorChunk::FunctionTypeInfo Struct Reference

#include <DeclSpec.h>

Inheritance diagram for clang::DeclaratorChunk::FunctionTypeInfo:
Inheritance graph
[legend]
Collaboration diagram for clang::DeclaratorChunk::FunctionTypeInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void freeArgs ()
void destroy ()
bool isKNRPrototype () const
SourceLocation getEllipsisLoc () const
SourceLocation getExceptionSpecLoc () const
SourceLocation getRefQualifierLoc () const
 Retrieve the location of the ref-qualifier, if any.
SourceLocation getConstQualifierLoc () const
 Retrieve the location of the ref-qualifier, if any.
SourceLocation getVolatileQualifierLoc () const
 Retrieve the location of the ref-qualifier, if any.
SourceLocation getMutableLoc () const
 Retrieve the location of the 'mutable' qualifier, if any.
bool hasRefQualifier () const
 Determine whether this function declaration contains a ref-qualifier.
bool hasMutableQualifier () const
 Determine whether this lambda-declarator contains a 'mutable' qualifier.
ExceptionSpecificationType getExceptionSpecType () const
 Get the type of exception specification this function has.

Public Attributes

unsigned hasPrototype: 1
unsigned isVariadic: 1
unsigned RefQualifierIsLValueRef: 1
 Whether the ref-qualifier (if any) is an lvalue reference. Otherwise, it's an rvalue reference.
unsigned TypeQuals: 3
unsigned ExceptionSpecType: 3
 ExceptionSpecType - An ExceptionSpecificationType value.
unsigned DeleteArgInfo: 1
 DeleteArgInfo - If this is true, we need to delete[] ArgInfo.
unsigned EllipsisLoc
 When isVariadic is true, the location of the ellipsis in the source.
unsigned NumArgs
unsigned NumExceptions
unsigned RefQualifierLoc
 The location of the ref-qualifier, if any.
unsigned ConstQualifierLoc
 The location of the const-qualifier, if any.
unsigned VolatileQualifierLoc
 The location of the volatile-qualifier, if any.
unsigned MutableLoc
 The location of the 'mutable' qualifer in a lambda-declarator, if any.
unsigned ExceptionSpecLoc
 When ExceptionSpecType isn't EST_None or EST_Delayed, the location of the keyword introducing the spec.
ParamInfoArgInfo
union {
   TypeAndRange *   Exceptions
 Pointer to a new[]'d array of TypeAndRange objects that contain the types in the function's dynamic exception specification and their locations, if there is one.
   Expr *   NoexceptExpr
 Pointer to the expression in the noexcept-specifier of this function, if it has one.
}; 
void * TrailingReturnType

Detailed Description

Definition at line 1082 of file DeclSpec.h.


Member Function Documentation

void clang::DeclaratorChunk::FunctionTypeInfo::destroy ( ) [inline]
void clang::DeclaratorChunk::FunctionTypeInfo::freeArgs ( ) [inline]

freeArgs - reset the argument list to having zero arguments. This is used in various places for error recovery.

Definition at line 1164 of file DeclSpec.h.

References ArgInfo, DeleteArgInfo, and NumArgs.

Referenced by clang::Sema::CheckConversionDeclarator(), and clang::Sema::CheckDestructorDeclarator().

SourceLocation clang::DeclaratorChunk::FunctionTypeInfo::getConstQualifierLoc ( ) const [inline]

Retrieve the location of the ref-qualifier, if any.

Definition at line 1199 of file DeclSpec.h.

References ConstQualifierLoc, and clang::SourceLocation::getFromRawEncoding().

SourceLocation clang::DeclaratorChunk::FunctionTypeInfo::getEllipsisLoc ( ) const [inline]

Definition at line 1186 of file DeclSpec.h.

References EllipsisLoc, and clang::SourceLocation::getFromRawEncoding().

Referenced by GetFullTypeForDeclarator().

SourceLocation clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecLoc ( ) const [inline]

Definition at line 1189 of file DeclSpec.h.

References ExceptionSpecLoc, and clang::SourceLocation::getFromRawEncoding().

Referenced by GetFullTypeForDeclarator().

ExceptionSpecificationType clang::DeclaratorChunk::FunctionTypeInfo::getExceptionSpecType ( ) const [inline]

Get the type of exception specification this function has.

Definition at line 1222 of file DeclSpec.h.

References ExceptionSpecType.

Referenced by destroy(), and GetFullTypeForDeclarator().

SourceLocation clang::DeclaratorChunk::FunctionTypeInfo::getMutableLoc ( ) const [inline]

Retrieve the location of the 'mutable' qualifier, if any.

Definition at line 1209 of file DeclSpec.h.

References clang::SourceLocation::getFromRawEncoding(), and MutableLoc.

Referenced by hasMutableQualifier().

SourceLocation clang::DeclaratorChunk::FunctionTypeInfo::getRefQualifierLoc ( ) const [inline]

Retrieve the location of the ref-qualifier, if any.

Definition at line 1194 of file DeclSpec.h.

References clang::SourceLocation::getFromRawEncoding(), and RefQualifierLoc.

Referenced by clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), and hasRefQualifier().

SourceLocation clang::DeclaratorChunk::FunctionTypeInfo::getVolatileQualifierLoc ( ) const [inline]

Retrieve the location of the ref-qualifier, if any.

Definition at line 1204 of file DeclSpec.h.

References clang::SourceLocation::getFromRawEncoding(), and VolatileQualifierLoc.

bool clang::DeclaratorChunk::FunctionTypeInfo::hasMutableQualifier ( ) const [inline]

Determine whether this lambda-declarator contains a 'mutable' qualifier.

Definition at line 1219 of file DeclSpec.h.

References getMutableLoc(), and clang::SourceLocation::isValid().

bool clang::DeclaratorChunk::FunctionTypeInfo::hasRefQualifier ( ) const [inline]

Determine whether this function declaration contains a ref-qualifier.

Definition at line 1215 of file DeclSpec.h.

References getRefQualifierLoc(), and clang::SourceLocation::isValid().

Referenced by clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), and GetFullTypeForDeclarator().

bool clang::DeclaratorChunk::FunctionTypeInfo::isKNRPrototype ( ) const [inline]

isKNRPrototype - Return true if this is a K&R style identifier list, like "void foo(a,b,c)". In a function definition, this will be followed by the argument type definitions.

Definition at line 1182 of file DeclSpec.h.

References hasPrototype, and NumArgs.


Member Data Documentation

union { ... }

ArgInfo - This is a pointer to a new[]'d array of ParamInfo objects that describe the arguments for this function declarator. This is null if there are no arguments specified.

Definition at line 1144 of file DeclSpec.h.

Referenced by clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnFunctionDeclarator(), destroy(), freeArgs(), FTIHasSingleVoidArgument(), GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

The location of the const-qualifier, if any.

If this is an invalid location, there is no const-qualifier.

Definition at line 1126 of file DeclSpec.h.

Referenced by getConstQualifierLoc(), and clang::DeclaratorChunk::getFunction().

DeleteArgInfo - If this is true, we need to delete[] ArgInfo.

Definition at line 1105 of file DeclSpec.h.

Referenced by destroy(), freeArgs(), and clang::DeclaratorChunk::getFunction().

When isVariadic is true, the location of the ellipsis in the source.

Definition at line 1108 of file DeclSpec.h.

Referenced by getEllipsisLoc(), and clang::DeclaratorChunk::getFunction().

Pointer to a new[]'d array of TypeAndRange objects that contain the types in the function's dynamic exception specification and their locations, if there is one.

Definition at line 1150 of file DeclSpec.h.

Referenced by destroy(), GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

When ExceptionSpecType isn't EST_None or EST_Delayed, the location of the keyword introducing the spec.

Definition at line 1139 of file DeclSpec.h.

Referenced by getExceptionSpecLoc(), and clang::DeclaratorChunk::getFunction().

ExceptionSpecType - An ExceptionSpecificationType value.

Definition at line 1102 of file DeclSpec.h.

Referenced by getExceptionSpecType(), and clang::DeclaratorChunk::getFunction().

hasPrototype - This is true if the function had at least one typed argument. If the function is () or (a,b,c), then it has no prototype, and is treated as a K&R-style function.

Definition at line 1086 of file DeclSpec.h.

Referenced by clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnStartOfFunctionTemplateDef(), CreateNewFunctionDecl(), GetFullTypeForDeclarator(), clang::DeclaratorChunk::getFunction(), isKNRPrototype(), and maybeSynthesizeBlockSignature().

isVariadic - If this function has a prototype, and if that proto ends with ',...)', this is true. When true, EllipsisLoc contains the location of the ellipsis.

Definition at line 1091 of file DeclSpec.h.

Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::CheckDestructorDeclarator(), FTIHasSingleVoidArgument(), GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

The location of the 'mutable' qualifer in a lambda-declarator, if any.

Definition at line 1135 of file DeclSpec.h.

Referenced by clang::DeclaratorChunk::getFunction(), and getMutableLoc().

Pointer to the expression in the noexcept-specifier of this function, if it has one.

Definition at line 1154 of file DeclSpec.h.

Referenced by GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

NumExceptions - This is the number of types in the dynamic-exception- decl, if the function has one.

Definition at line 1116 of file DeclSpec.h.

Referenced by GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

Whether the ref-qualifier (if any) is an lvalue reference. Otherwise, it's an rvalue reference.

Definition at line 1095 of file DeclSpec.h.

Referenced by clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

The location of the ref-qualifier, if any.

If this is an invalid location, there is no ref-qualifier.

Definition at line 1121 of file DeclSpec.h.

Referenced by clang::DeclaratorChunk::getFunction(), and getRefQualifierLoc().

TrailingReturnType - If this isn't null, it's the trailing return type specified. This is actually a ParsedType, but stored as void* to allow union storage.

Definition at line 1160 of file DeclSpec.h.

Referenced by GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

The type qualifiers: const/volatile/restrict. The qualifier bitmask values are the same as in QualType.

Definition at line 1099 of file DeclSpec.h.

Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckDestructorDeclarator(), GetFullTypeForDeclarator(), and clang::DeclaratorChunk::getFunction().

The location of the volatile-qualifier, if any.

If this is an invalid location, there is no volatile-qualifier.

Definition at line 1131 of file DeclSpec.h.

Referenced by clang::DeclaratorChunk::getFunction(), and getVolatileQualifierLoc().


The documentation for this struct was generated from the following file: