clang API Documentation
#include <DeclSpec.h>

Classes | |
| struct | ArrayTypeInfo |
| struct | BlockPointerTypeInfo |
| struct | FunctionTypeInfo |
| struct | MemberPointerTypeInfo |
| struct | ParamInfo |
| struct | PointerTypeInfo |
| struct | ReferenceTypeInfo |
| struct | TypeAndRange |
| struct | TypeInfoCommon |
Public Types | |
| enum | { Pointer, Reference, Array, Function, BlockPointer, MemberPointer, Paren } |
Public Member Functions | |
| void | destroy () |
| const AttributeList * | getAttrs () const |
| AttributeList *& | getAttrListRef () |
Static Public Member Functions | |
| static DeclaratorChunk | getPointer (unsigned TypeQuals, SourceLocation Loc, SourceLocation ConstQualLoc, SourceLocation VolatileQualLoc, SourceLocation RestrictQualLoc) |
| static DeclaratorChunk | getReference (unsigned TypeQuals, SourceLocation Loc, bool lvalue) |
| static DeclaratorChunk | getArray (unsigned TypeQuals, bool isStatic, bool isStar, Expr *NumElts, SourceLocation LBLoc, SourceLocation RBLoc) |
| static DeclaratorChunk | getFunction (bool hasProto, bool isVariadic, SourceLocation EllipsisLoc, ParamInfo *ArgInfo, unsigned NumArgs, unsigned TypeQuals, bool RefQualifierIsLvalueRef, SourceLocation RefQualifierLoc, SourceLocation ConstQualifierLoc, SourceLocation VolatileQualifierLoc, SourceLocation MutableLoc, ExceptionSpecificationType ESpecType, SourceLocation ESpecLoc, ParsedType *Exceptions, SourceRange *ExceptionRanges, unsigned NumExceptions, Expr *NoexceptExpr, SourceLocation LocalRangeBegin, SourceLocation LocalRangeEnd, Declarator &TheDeclarator, ParsedType TrailingReturnType=ParsedType()) |
| static DeclaratorChunk | getBlockPointer (unsigned TypeQuals, SourceLocation Loc) |
| static DeclaratorChunk | getMemberPointer (const CXXScopeSpec &SS, unsigned TypeQuals, SourceLocation Loc) |
| static DeclaratorChunk | getParen (SourceLocation LParenLoc, SourceLocation RParenLoc) |
Public Attributes | |
| enum clang::DeclaratorChunk:: { ... } | Kind |
| SourceLocation | Loc |
| Loc - The place where this type was defined. | |
| SourceLocation | EndLoc |
| EndLoc - If valid, the place where this chunck ends. | |
| union { | |
| TypeInfoCommon Common | |
| PointerTypeInfo Ptr | |
| ReferenceTypeInfo Ref | |
| ArrayTypeInfo Arr | |
| FunctionTypeInfo Fun | |
| BlockPointerTypeInfo Cls | |
| MemberPointerTypeInfo Mem | |
| }; | |
DeclaratorChunk - One instance of this struct is used for each type in a declarator that is parsed.
This is intended to be a small value object.
Definition at line 993 of file DeclSpec.h.
| anonymous enum |
Definition at line 994 of file DeclSpec.h.
| void clang::DeclaratorChunk::destroy | ( | ) | [inline] |
Definition at line 1266 of file DeclSpec.h.
References Arr, Array, BlockPointer, Cls, clang::DeclaratorChunk::PointerTypeInfo::destroy(), clang::DeclaratorChunk::ReferenceTypeInfo::destroy(), clang::DeclaratorChunk::ArrayTypeInfo::destroy(), clang::DeclaratorChunk::FunctionTypeInfo::destroy(), clang::DeclaratorChunk::BlockPointerTypeInfo::destroy(), clang::DeclaratorChunk::MemberPointerTypeInfo::destroy(), Fun, Function, Mem, MemberPointer, Paren, Pointer, Ptr, Ref, and Reference.
| static DeclaratorChunk clang::DeclaratorChunk::getArray | ( | unsigned | TypeQuals, |
| bool | isStatic, | ||
| bool | isStar, | ||
| Expr * | NumElts, | ||
| SourceLocation | LBLoc, | ||
| SourceLocation | RBLoc | ||
| ) | [inline, static] |
getArray - Return a DeclaratorChunk for an array.
Definition at line 1320 of file DeclSpec.h.
References Arr, Array, clang::DeclaratorChunk::TypeInfoCommon::AttrList, EndLoc, clang::DeclaratorChunk::ArrayTypeInfo::hasStatic, clang::DeclaratorChunk::ArrayTypeInfo::isStar, Kind, Loc, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, and clang::DeclaratorChunk::ArrayTypeInfo::TypeQuals.
| AttributeList*& clang::DeclaratorChunk::getAttrListRef | ( | ) | [inline] |
Definition at line 1284 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, and Common.
Referenced by distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), and transferARCOwnershipToDeclaratorChunk().
| const AttributeList* clang::DeclaratorChunk::getAttrs | ( | ) | const [inline] |
getAttrs - If there are attributes applied to this declaratorchunk, return them.
Definition at line 1280 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, and Common.
Referenced by clang::Sema::checkUnusedDeclAttributes(), GetFullTypeForDeclarator(), clang::Sema::GetTypeSourceInfoForDeclarator(), inferARCWriteback(), clang::Sema::ProcessDeclAttributes(), takeDeclAttributes(), and transferARCOwnershipToDeclaratorChunk().
| static DeclaratorChunk clang::DeclaratorChunk::getBlockPointer | ( | unsigned | TypeQuals, |
| SourceLocation | Loc | ||
| ) | [inline, static] |
getBlockPointer - Return a DeclaratorChunk for a block.
Definition at line 1360 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, BlockPointer, Cls, Kind, Loc, and clang::DeclaratorChunk::BlockPointerTypeInfo::TypeQuals.
| DeclaratorChunk DeclaratorChunk::getFunction | ( | bool | hasProto, |
| bool | isVariadic, | ||
| SourceLocation | EllipsisLoc, | ||
| ParamInfo * | ArgInfo, | ||
| unsigned | NumArgs, | ||
| unsigned | TypeQuals, | ||
| bool | RefQualifierIsLvalueRef, | ||
| SourceLocation | RefQualifierLoc, | ||
| SourceLocation | ConstQualifierLoc, | ||
| SourceLocation | VolatileQualifierLoc, | ||
| SourceLocation | MutableLoc, | ||
| ExceptionSpecificationType | ESpecType, | ||
| SourceLocation | ESpecLoc, | ||
| ParsedType * | Exceptions, | ||
| SourceRange * | ExceptionRanges, | ||
| unsigned | NumExceptions, | ||
| Expr * | NoexceptExpr, | ||
| SourceLocation | LocalRangeBegin, | ||
| SourceLocation | LocalRangeEnd, | ||
| Declarator & | TheDeclarator, | ||
| ParsedType | TrailingReturnType = ParsedType() |
||
| ) | [static] |
DeclaratorChunk::getFunction - Return a DeclaratorChunk for a function. "TheDeclarator" is the declarator that this will be added to.
Definition at line 147 of file DeclSpec.cpp.
References clang::DeclaratorChunk::FunctionTypeInfo::ArgInfo, clang::DeclaratorChunk::TypeInfoCommon::AttrList, clang::DeclaratorChunk::FunctionTypeInfo::ConstQualifierLoc, clang::DeclaratorChunk::FunctionTypeInfo::DeleteArgInfo, clang::DeclaratorChunk::FunctionTypeInfo::EllipsisLoc, EndLoc, clang::EST_ComputedNoexcept, clang::EST_Dynamic, clang::DeclaratorChunk::FunctionTypeInfo::Exceptions, clang::DeclaratorChunk::FunctionTypeInfo::ExceptionSpecLoc, clang::DeclaratorChunk::FunctionTypeInfo::ExceptionSpecType, Fun, Function, clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::SourceLocation::getRawEncoding(), clang::DeclaratorChunk::FunctionTypeInfo::hasPrototype, clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, Kind, Loc, clang::DeclaratorChunk::FunctionTypeInfo::MutableLoc, clang::DeclaratorChunk::FunctionTypeInfo::NoexceptExpr, clang::DeclaratorChunk::FunctionTypeInfo::NumArgs, NumArgs, clang::DeclaratorChunk::FunctionTypeInfo::NumExceptions, clang::DeclaratorChunk::TypeAndRange::Range, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierLoc, clang::DeclaratorChunk::FunctionTypeInfo::TrailingReturnType, clang::DeclaratorChunk::TypeAndRange::Ty, clang::DeclaratorChunk::FunctionTypeInfo::TypeQuals, and clang::DeclaratorChunk::FunctionTypeInfo::VolatileQualifierLoc.
Referenced by clang::Sema::ImplicitlyDefineFunction(), and maybeSynthesizeBlockSignature().
| static DeclaratorChunk clang::DeclaratorChunk::getMemberPointer | ( | const CXXScopeSpec & | SS, |
| unsigned | TypeQuals, | ||
| SourceLocation | Loc | ||
| ) | [inline, static] |
Definition at line 1370 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, Kind, Loc, clang::DeclaratorChunk::MemberPointerTypeInfo::Mem, Mem, MemberPointer, clang::DeclaratorChunk::MemberPointerTypeInfo::ScopeMem, and clang::DeclaratorChunk::MemberPointerTypeInfo::TypeQuals.
| static DeclaratorChunk clang::DeclaratorChunk::getParen | ( | SourceLocation | LParenLoc, |
| SourceLocation | RParenLoc | ||
| ) | [inline, static] |
getParen - Return a DeclaratorChunk for a paren.
Definition at line 1384 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, Common, EndLoc, Kind, Loc, and Paren.
| static DeclaratorChunk clang::DeclaratorChunk::getPointer | ( | unsigned | TypeQuals, |
| SourceLocation | Loc, | ||
| SourceLocation | ConstQualLoc, | ||
| SourceLocation | VolatileQualLoc, | ||
| SourceLocation | RestrictQualLoc | ||
| ) | [inline, static] |
getPointer - Return a DeclaratorChunk for a pointer.
Definition at line 1290 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, clang::DeclaratorChunk::PointerTypeInfo::ConstQualLoc, clang::SourceLocation::getRawEncoding(), Kind, Loc, Pointer, Ptr, clang::DeclaratorChunk::PointerTypeInfo::RestrictQualLoc, clang::DeclaratorChunk::PointerTypeInfo::TypeQuals, and clang::DeclaratorChunk::PointerTypeInfo::VolatileQualLoc.
| static DeclaratorChunk clang::DeclaratorChunk::getReference | ( | unsigned | TypeQuals, |
| SourceLocation | Loc, | ||
| bool | lvalue | ||
| ) | [inline, static] |
getReference - Return a DeclaratorChunk for a reference.
Definition at line 1307 of file DeclSpec.h.
References clang::DeclaratorChunk::TypeInfoCommon::AttrList, clang::DeclaratorChunk::ReferenceTypeInfo::HasRestrict, Kind, Loc, clang::DeclaratorChunk::ReferenceTypeInfo::LValueRef, Ref, Reference, and clang::DeclSpec::TQ_restrict.
| union { ... } |
Definition at line 1260 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), destroy(), getArray(), and GetFullTypeForDeclarator().
Definition at line 1262 of file DeclSpec.h.
Referenced by destroy(), getBlockPointer(), and GetFullTypeForDeclarator().
Definition at line 1257 of file DeclSpec.h.
Referenced by getAttrListRef(), getAttrs(), and getParen().
EndLoc - If valid, the place where this chunck ends.
Definition at line 1001 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), getArray(), GetFullTypeForDeclarator(), getFunction(), and getParen().
Definition at line 1261 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::CheckExtraCXXDefaultArguments(), destroy(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), and getFunction().
| enum { ... } clang::DeclaratorChunk::Kind |
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::CheckExtraCXXDefaultArguments(), checkQualifiedFunction(), clang::Sema::containsUnexpandedParameterPacks(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), getArray(), getBlockPointer(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunction(), getMemberPointer(), getParen(), getPointer(), getReference(), inferARCWriteback(), isOmittedBlockReturnType(), RebuildDeclaratorInCurrentInstantiation(), and transferARCOwnership().
Loc - The place where this type was defined.
Definition at line 999 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnFunctionDeclarator(), checkQualifiedFunction(), getArray(), getBlockPointer(), GetFullTypeForDeclarator(), getFunction(), getMemberPointer(), getParen(), getPointer(), and getReference().
Definition at line 1263 of file DeclSpec.h.
Referenced by clang::Sema::containsUnexpandedParameterPacks(), destroy(), GetFullTypeForDeclarator(), getMemberPointer(), and RebuildDeclaratorInCurrentInstantiation().
Definition at line 1258 of file DeclSpec.h.
Referenced by destroy(), GetFullTypeForDeclarator(), and getPointer().
Definition at line 1259 of file DeclSpec.h.
Referenced by destroy(), GetFullTypeForDeclarator(), and getReference().