clang
15.0.0git
|
One instance of this struct is used for each type in a declarator that is parsed. More...
#include "clang/Sema/DeclSpec.h"
Classes | |
struct | ArrayTypeInfo |
struct | BlockPointerTypeInfo |
struct | FunctionTypeInfo |
struct | MemberPointerTypeInfo |
struct | ParamInfo |
ParamInfo - An array of paraminfo objects is allocated whenever a function declarator is parsed. More... | |
struct | PipeTypeInfo |
struct | PointerTypeInfo |
struct | ReferenceTypeInfo |
struct | TypeAndRange |
Public Types | |
enum | { Pointer, Reference, Array, Function, BlockPointer, MemberPointer, Paren, Pipe } |
Public Member Functions | |
DeclaratorChunk () | |
SourceRange | getSourceRange () const |
void | destroy () |
const ParsedAttributesView & | getAttrs () const |
If there are attributes applied to this declaratorchunk, return them. More... | |
ParsedAttributesView & | getAttrs () |
bool | isParen () const |
Public Attributes | |
enum clang::DeclaratorChunk:: { ... } | Kind |
SourceLocation | Loc |
Loc - The place where this type was defined. More... | |
SourceLocation | EndLoc |
EndLoc - If valid, the place where this chunck ends. More... | |
ParsedAttributesView | AttrList |
union { | |
PointerTypeInfo Ptr | |
ReferenceTypeInfo Ref | |
ArrayTypeInfo Arr | |
FunctionTypeInfo Fun | |
BlockPointerTypeInfo Cls | |
MemberPointerTypeInfo Mem | |
PipeTypeInfo PipeInfo | |
}; | |
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 1174 of file DeclSpec.h.
anonymous enum |
Enumerator | |
---|---|
Pointer | |
Reference | |
Array | |
Function | |
BlockPointer | |
MemberPointer | |
Paren | |
Pipe |
Definition at line 1177 of file DeclSpec.h.
|
inline |
Definition at line 1175 of file DeclSpec.h.
|
inline |
Definition at line 1559 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(), clang::DeclaratorChunk::PipeTypeInfo::destroy(), Fun, Function, Kind, Mem, MemberPointer, Paren, Pipe, PipeInfo, Pointer, Ptr, Ref, and Reference.
|
inlinestatic |
Return a DeclaratorChunk for an array.
Definition at line 1609 of file DeclSpec.h.
References Arr, Array, EndLoc, clang::DeclaratorChunk::ArrayTypeInfo::hasStatic, clang::DeclaratorChunk::ArrayTypeInfo::isStar, Kind, Loc, clang::DeclaratorChunk::ArrayTypeInfo::NumElts, and clang::DeclaratorChunk::ArrayTypeInfo::TypeQuals.
|
inline |
Definition at line 1575 of file DeclSpec.h.
References AttrList.
|
inline |
If there are attributes applied to this declaratorchunk, return them.
Definition at line 1574 of file DeclSpec.h.
References AttrList.
Referenced by addContextSensitiveTypeNullability(), clang::Sema::checkUnusedDeclAttributes(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeNullabilityTypeAttr(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), and takeDeclAttributes().
|
inlinestatic |
Return a DeclaratorChunk for a block.
Definition at line 1652 of file DeclSpec.h.
References BlockPointer, Cls, Kind, Loc, and clang::DeclaratorChunk::BlockPointerTypeInfo::TypeQuals.
|
static |
DeclaratorChunk::getFunction - Return a DeclaratorChunk for a function.
"TheDeclarator" is the declarator that this will be added to.
Definition at line 160 of file DeclSpec.cpp.
References clang::DeclaratorChunk::FunctionTypeInfo::DeclsInPrototype, clang::DeclaratorChunk::FunctionTypeInfo::DeleteParams, clang::DeclaratorChunk::FunctionTypeInfo::EllipsisLoc, EndLoc, clang::EST_DependentNoexcept, clang::EST_Dynamic, clang::EST_NoexceptFalse, clang::EST_NoexceptTrue, clang::EST_None, clang::EST_Unparsed, clang::DeclaratorChunk::FunctionTypeInfo::Exceptions, clang::DeclaratorChunk::FunctionTypeInfo::ExceptionSpecLocBeg, clang::DeclaratorChunk::FunctionTypeInfo::ExceptionSpecLocEnd, clang::DeclaratorChunk::FunctionTypeInfo::ExceptionSpecTokens, clang::DeclaratorChunk::FunctionTypeInfo::ExceptionSpecType, clang::DeclSpec::forEachCVRUQualifier(), Fun, Function, clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::DeclSpec::getAttributePool(), clang::DeclSpec::getAttributes(), clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::DeclSpec::getTypeQualifiers(), clang::DeclaratorChunk::FunctionTypeInfo::hasPrototype, clang::DeclaratorChunk::FunctionTypeInfo::HasTrailingReturnType, clang::Declarator::InlineParams, clang::DeclaratorChunk::FunctionTypeInfo::isAmbiguous, clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::ActionResult< PtrTy, CompressInvalid >::isUsable(), clang::SourceLocation::isValid(), clang::DeclaratorChunk::FunctionTypeInfo::isVariadic, Kind, Loc, clang::DeclaratorChunk::FunctionTypeInfo::LParenLoc, clang::DeclaratorChunk::FunctionTypeInfo::MethodQualifiers, clang::DeclaratorChunk::FunctionTypeInfo::MutableLoc, clang::DeclaratorChunk::FunctionTypeInfo::NoexceptExpr, clang::DeclaratorChunk::FunctionTypeInfo::NumExceptionsOrDecls, clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::FunctionTypeInfo::Params, clang::DeclaratorChunk::FunctionTypeInfo::QualAttrFactory, clang::DeclaratorChunk::TypeAndRange::Range, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierIsLValueRef, clang::DeclaratorChunk::FunctionTypeInfo::RefQualifierLoc, clang::DeclaratorChunk::FunctionTypeInfo::RParenLoc, clang::DeclSpec::SetTypeQual(), clang::ParsedAttributesView::size(), clang::AttributePool::takeAllFrom(), clang::ParsedAttributes::takeAllFrom(), clang::DeclSpec::TQ_atomic, clang::DeclaratorChunk::FunctionTypeInfo::TrailingReturnType, clang::DeclaratorChunk::FunctionTypeInfo::TrailingReturnTypeLoc, and clang::DeclaratorChunk::TypeAndRange::Ty.
Referenced by maybeSynthesizeBlockSignature().
|
inlinestatic |
Definition at line 1671 of file DeclSpec.h.
References EndLoc, clang::CXXScopeSpec::getBeginLoc(), Kind, Loc, Mem, MemberPointer, clang::DeclaratorChunk::MemberPointerTypeInfo::ScopeMem, clang::DeclaratorChunk::MemberPointerTypeInfo::StarLoc, and clang::DeclaratorChunk::MemberPointerTypeInfo::TypeQuals.
|
inlinestatic |
Return a DeclaratorChunk for a paren.
Definition at line 1687 of file DeclSpec.h.
|
inlinestatic |
Return a DeclaratorChunk for a block.
Definition at line 1662 of file DeclSpec.h.
References Cls, Kind, Loc, Pipe, and clang::DeclaratorChunk::BlockPointerTypeInfo::TypeQuals.
|
inlinestatic |
Return a DeclaratorChunk for a pointer.
Definition at line 1578 of file DeclSpec.h.
References clang::DeclaratorChunk::PointerTypeInfo::AtomicQualLoc, clang::DeclaratorChunk::PointerTypeInfo::ConstQualLoc, Kind, Loc, Pointer, Ptr, clang::DeclaratorChunk::PointerTypeInfo::RestrictQualLoc, clang::DeclaratorChunk::PointerTypeInfo::TypeQuals, clang::DeclaratorChunk::PointerTypeInfo::UnalignedQualLoc, and clang::DeclaratorChunk::PointerTypeInfo::VolatileQualLoc.
|
inlinestatic |
Return a DeclaratorChunk for a reference.
Definition at line 1598 of file DeclSpec.h.
References clang::DeclaratorChunk::ReferenceTypeInfo::HasRestrict, Kind, Loc, clang::DeclaratorChunk::ReferenceTypeInfo::LValueRef, Ref, Reference, and clang::DeclSpec::TQ_restrict.
|
inline |
Definition at line 1186 of file DeclSpec.h.
References EndLoc, clang::SourceLocation::isInvalid(), and Loc.
|
inline |
Definition at line 1696 of file DeclSpec.h.
union { ... } |
ArrayTypeInfo clang::DeclaratorChunk::Arr |
Definition at line 1552 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::containsUnexpandedParameterPacks(), destroy(), getArray(), and clang::Declarator::isArrayOfUnknownBound().
ParsedAttributesView clang::DeclaratorChunk::AttrList |
Definition at line 1192 of file DeclSpec.h.
Referenced by getAttrs().
BlockPointerTypeInfo clang::DeclaratorChunk::Cls |
Definition at line 1554 of file DeclSpec.h.
Referenced by destroy(), getBlockPointer(), and getPipe().
SourceLocation clang::DeclaratorChunk::EndLoc |
EndLoc - If valid, the place where this chunck ends.
Definition at line 1184 of file DeclSpec.h.
Referenced by getArray(), getFunction(), getMemberPointer(), getParen(), and getSourceRange().
FunctionTypeInfo clang::DeclaratorChunk::Fun |
Definition at line 1553 of file DeclSpec.h.
Referenced by clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::containsUnexpandedParameterPacks(), destroy(), and getFunction().
enum { ... } clang::DeclaratorChunk::Kind |
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::containsUnexpandedParameterPacks(), destroy(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeNullabilityTypeAttr(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), fillAtomicQualLoc(), getArray(), getBlockPointer(), getFunction(), getMemberPointer(), getParen(), getPipe(), getPointer(), getReference(), hasOuterPointerLikeChunk(), clang::Declarator::isArrayOfUnknownBound(), IsNoDerefableChunk(), isOmittedBlockReturnType(), isParen(), isPipeDeclarator(), and maybeMovePastReturnType().
SourceLocation clang::DeclaratorChunk::Loc |
Loc - The place where this type was defined.
Definition at line 1182 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), distributeNullabilityTypeAttr(), getArray(), getBlockPointer(), getFunction(), getMemberPointer(), getParen(), getPipe(), getPointer(), getReference(), and getSourceRange().
MemberPointerTypeInfo clang::DeclaratorChunk::Mem |
Definition at line 1555 of file DeclSpec.h.
Referenced by clang::Sema::containsUnexpandedParameterPacks(), destroy(), and getMemberPointer().
PipeTypeInfo clang::DeclaratorChunk::PipeInfo |
Definition at line 1556 of file DeclSpec.h.
Referenced by destroy().
PointerTypeInfo clang::DeclaratorChunk::Ptr |
Definition at line 1550 of file DeclSpec.h.
Referenced by destroy(), fillAtomicQualLoc(), and getPointer().
ReferenceTypeInfo clang::DeclaratorChunk::Ref |
Definition at line 1551 of file DeclSpec.h.
Referenced by destroy(), and getReference().