clang
7.0.0
|
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 | |
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 |
Static Public Member Functions | |
static DeclaratorChunk | getPointer (unsigned TypeQuals, SourceLocation Loc, SourceLocation ConstQualLoc, SourceLocation VolatileQualLoc, SourceLocation RestrictQualLoc, SourceLocation AtomicQualLoc, SourceLocation UnalignedQualLoc) |
Return a DeclaratorChunk for a pointer. More... | |
static DeclaratorChunk | getReference (unsigned TypeQuals, SourceLocation Loc, bool lvalue) |
Return a DeclaratorChunk for a reference. More... | |
static DeclaratorChunk | getArray (unsigned TypeQuals, bool isStatic, bool isStar, Expr *NumElts, SourceLocation LBLoc, SourceLocation RBLoc) |
Return a DeclaratorChunk for an array. More... | |
static DeclaratorChunk | getFunction (bool HasProto, bool IsAmbiguous, SourceLocation LParenLoc, ParamInfo *Params, unsigned NumParams, SourceLocation EllipsisLoc, SourceLocation RParenLoc, unsigned TypeQuals, bool RefQualifierIsLvalueRef, SourceLocation RefQualifierLoc, SourceLocation ConstQualifierLoc, SourceLocation VolatileQualifierLoc, SourceLocation RestrictQualifierLoc, SourceLocation MutableLoc, ExceptionSpecificationType ESpecType, SourceRange ESpecRange, ParsedType *Exceptions, SourceRange *ExceptionRanges, unsigned NumExceptions, Expr *NoexceptExpr, CachedTokens *ExceptionSpecTokens, ArrayRef< NamedDecl *> DeclsInPrototype, SourceLocation LocalRangeBegin, SourceLocation LocalRangeEnd, Declarator &TheDeclarator, TypeResult TrailingReturnType=TypeResult()) |
DeclaratorChunk::getFunction - Return a DeclaratorChunk for a function. More... | |
static DeclaratorChunk | getBlockPointer (unsigned TypeQuals, SourceLocation Loc) |
Return a DeclaratorChunk for a block. More... | |
static DeclaratorChunk | getPipe (unsigned TypeQuals, SourceLocation Loc) |
Return a DeclaratorChunk for a block. More... | |
static DeclaratorChunk | getMemberPointer (const CXXScopeSpec &SS, unsigned TypeQuals, SourceLocation Loc) |
static DeclaratorChunk | getParen (SourceLocation LParenLoc, SourceLocation RParenLoc) |
Return a DeclaratorChunk for a paren. More... | |
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 1138 of file DeclSpec.h.
anonymous enum |
Enumerator | |
---|---|
Pointer | |
Reference | |
Array | |
Function | |
BlockPointer | |
MemberPointer | |
Paren | |
Pipe |
Definition at line 1139 of file DeclSpec.h.
|
inline |
Definition at line 1510 of file DeclSpec.h.
References Array, BlockPointer, Function, MemberPointer, Paren, Pipe, Pointer, and Reference.
|
inlinestatic |
Return a DeclaratorChunk for an array.
Definition at line 1559 of file DeclSpec.h.
Referenced by getMissingDeclaratorIdLoc(), and clang::Parser::ParseUnqualifiedId().
|
inline |
If there are attributes applied to this declaratorchunk, return them.
Definition at line 1525 of file DeclSpec.h.
Referenced by addContextSensitiveTypeNullability(), clang::Sema::checkUnusedDeclAttributes(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeNullabilityTypeAttr(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), inferARCWriteback(), takeDeclAttributes(), and transferARCOwnershipToDeclaratorChunk().
|
inline |
Definition at line 1526 of file DeclSpec.h.
|
inlinestatic |
Return a DeclaratorChunk for a block.
Definition at line 1603 of file DeclSpec.h.
Referenced by isPipeDeclerator().
|
static |
DeclaratorChunk::getFunction - Return a DeclaratorChunk for a function.
"TheDeclarator" is the declarator that this will be added to.
Definition at line 152 of file DeclSpec.cpp.
References clang::DeclSpec::TQ_atomic.
Referenced by addConstexprToLambdaDeclSpecifier(), getMissingDeclaratorIdLoc(), and maybeSynthesizeBlockSignature().
|
inlinestatic |
Definition at line 1622 of file DeclSpec.h.
Referenced by isPipeDeclerator().
|
inlinestatic |
Return a DeclaratorChunk for a paren.
Definition at line 1635 of file DeclSpec.h.
Referenced by getMissingDeclaratorIdLoc().
|
inlinestatic |
Return a DeclaratorChunk for a block.
Definition at line 1613 of file DeclSpec.h.
Referenced by isPipeDeclerator().
|
inlinestatic |
Return a DeclaratorChunk for a pointer.
Definition at line 1529 of file DeclSpec.h.
Referenced by isPipeDeclerator().
|
inlinestatic |
Return a DeclaratorChunk for a reference.
Definition at line 1548 of file DeclSpec.h.
Referenced by isPipeDeclerator().
|
inline |
Definition at line 1148 of file DeclSpec.h.
References clang::SourceLocation::isInvalid().
|
inline |
Definition at line 1644 of file DeclSpec.h.
References Paren.
union { ... } |
ArrayTypeInfo clang::DeclaratorChunk::Arr |
Definition at line 1503 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), and clang::Declarator::isArrayOfUnknownBound().
ParsedAttributesView clang::DeclaratorChunk::AttrList |
Definition at line 1154 of file DeclSpec.h.
BlockPointerTypeInfo clang::DeclaratorChunk::Cls |
Definition at line 1505 of file DeclSpec.h.
SourceLocation clang::DeclaratorChunk::EndLoc |
EndLoc - If valid, the place where this chunck ends.
Definition at line 1146 of file DeclSpec.h.
Referenced by warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
FunctionTypeInfo clang::DeclaratorChunk::Fun |
Definition at line 1504 of file DeclSpec.h.
Referenced by clang::Sema::CheckExtraCXXDefaultArguments(), diagnoseRedundantReturnTypeQualifiers(), and warnAboutAmbiguousFunction().
enum { ... } clang::DeclaratorChunk::Kind |
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::CheckExtraCXXDefaultArguments(), classifyPointerDeclarator(), deduceOpenCLImplicitAddrSpace(), diagnoseRedundantReturnTypeQualifiers(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeNullabilityTypeAttr(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), fillAtomicQualLoc(), getCCForDeclaratorChunk(), hasOuterPointerLikeChunk(), inferARCWriteback(), clang::Declarator::isArrayOfUnknownBound(), isOmittedBlockReturnType(), isPipeDeclerator(), maybeMovePastReturnType(), transferARCOwnership(), and warnAboutRedundantParens().
SourceLocation clang::DeclaratorChunk::Loc |
Loc - The place where this type was defined.
Definition at line 1144 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), distributeNullabilityTypeAttr(), isPipeDeclerator(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
MemberPointerTypeInfo clang::DeclaratorChunk::Mem |
Definition at line 1506 of file DeclSpec.h.
PipeTypeInfo clang::DeclaratorChunk::PipeInfo |
Definition at line 1507 of file DeclSpec.h.
PointerTypeInfo clang::DeclaratorChunk::Ptr |
Definition at line 1501 of file DeclSpec.h.
Referenced by diagnoseRedundantReturnTypeQualifiers(), and fillAtomicQualLoc().
ReferenceTypeInfo clang::DeclaratorChunk::Ref |
Definition at line 1502 of file DeclSpec.h.