|
clang
3.8.0
|
A class for parsing a declarator. More...
#include <RAIIObjectsForParser.h>
Public Member Functions | |
| ParsingDeclarator (Parser &P, const ParsingDeclSpec &DS, TheContext C) | |
| const ParsingDeclSpec & | getDeclSpec () const |
| ParsingDeclSpec & | getMutableDeclSpec () const |
| void | clear () |
| void | complete (Decl *D) |
Public Member Functions inherited from clang::Declarator | |
| Declarator (const DeclSpec &ds, TheContext C) | |
| ~Declarator () | |
| const DeclSpec & | getDeclSpec () const |
| getDeclSpec - Return the declaration-specifier that this declarator was declared with. More... | |
| DeclSpec & | getMutableDeclSpec () |
| getMutableDeclSpec - Return a non-const version of the DeclSpec. More... | |
| AttributePool & | getAttributePool () const |
| const CXXScopeSpec & | getCXXScopeSpec () const |
| getCXXScopeSpec - Return the C++ scope specifier (global scope or nested-name-specifier) that is part of the declarator-id. More... | |
| CXXScopeSpec & | getCXXScopeSpec () |
| UnqualifiedId & | getName () |
| Retrieve the name specified by this declarator. More... | |
| TheContext | getContext () const |
| bool | isPrototypeContext () const |
| SourceRange | getSourceRange () const LLVM_READONLY |
| Get the source range that spans this declarator. More... | |
| SourceLocation | getLocStart () const LLVM_READONLY |
| SourceLocation | getLocEnd () const LLVM_READONLY |
| void | SetSourceRange (SourceRange R) |
| void | SetRangeBegin (SourceLocation Loc) |
| SetRangeBegin - Set the start of the source range to Loc, unless it's invalid. More... | |
| void | SetRangeEnd (SourceLocation Loc) |
| SetRangeEnd - Set the end of the source range to Loc, unless it's invalid. More... | |
| void | ExtendWithDeclSpec (const DeclSpec &DS) |
| ExtendWithDeclSpec - Extend the declarator source range to include the given declspec, unless its location is invalid. More... | |
| void | clear () |
| Reset the contents of this Declarator. More... | |
| bool | mayOmitIdentifier () const |
| mayOmitIdentifier - Return true if the identifier is either optional or not allowed. More... | |
| bool | mayHaveIdentifier () const |
| mayHaveIdentifier - Return true if the identifier is either optional or required. More... | |
| bool | diagnoseIdentifier () const |
| diagnoseIdentifier - Return true if the identifier is prohibited and should be diagnosed (because it cannot be anything else). More... | |
| bool | mayBeFollowedByCXXDirectInit () const |
| mayBeFollowedByCXXDirectInit - Return true if the declarator can be followed by a C++ direct initializer, e.g. More... | |
| bool | isPastIdentifier () const |
| isPastIdentifier - Return true if we have parsed beyond the point where the More... | |
| bool | hasName () const |
| hasName - Whether this declarator has a name, which might be an identifier (accessible via getIdentifier()) or some kind of special C++ name (constructor, destructor, etc.). More... | |
| IdentifierInfo * | getIdentifier () const |
| SourceLocation | getIdentifierLoc () const |
| void | SetIdentifier (IdentifierInfo *Id, SourceLocation IdLoc) |
| Set the name of this declarator to be the given identifier. More... | |
| void | AddTypeInfo (const DeclaratorChunk &TI, ParsedAttributes &attrs, SourceLocation EndLoc) |
| AddTypeInfo - Add a chunk to this declarator. More... | |
| void | AddInnermostTypeInfo (const DeclaratorChunk &TI) |
| Add a new innermost chunk to this declarator. More... | |
| unsigned | getNumTypeObjects () const |
| Return the number of types applied to this declarator. More... | |
| const DeclaratorChunk & | getTypeObject (unsigned i) const |
| Return the specified TypeInfo from this declarator. More... | |
| DeclaratorChunk & | getTypeObject (unsigned i) |
| type_object_range | type_objects () const |
| Returns the range of type objects, from the identifier outwards. More... | |
| void | DropFirstTypeObject () |
| const DeclaratorChunk * | getInnermostNonParenChunk () const |
| Return the innermost (closest to the declarator) chunk of this declarator that is not a parens chunk, or null if there are no non-parens chunks. More... | |
| const DeclaratorChunk * | getOutermostNonParenChunk () const |
| Return the outermost (furthest from the declarator) chunk of this declarator that is not a parens chunk, or null if there are no non-parens chunks. More... | |
| bool | isArrayOfUnknownBound () const |
| isArrayOfUnknownBound - This method returns true if the declarator is a declarator for an array of unknown bound (looking through parentheses). More... | |
| bool | isFunctionDeclarator (unsigned &idx) const |
| isFunctionDeclarator - This method returns true if the declarator is a function declarator (looking through parentheses). More... | |
| bool | isFunctionDeclarator () const |
| isFunctionDeclarator - Once this declarator is fully parsed and formed, this method returns true if the identifier is a function declarator (looking through parentheses). More... | |
| DeclaratorChunk::FunctionTypeInfo & | getFunctionTypeInfo () |
| getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses). More... | |
| const DeclaratorChunk::FunctionTypeInfo & | getFunctionTypeInfo () const |
| getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses). More... | |
| bool | isDeclarationOfFunction () const |
| Determine whether the declaration that will be produced from this declaration will be a function. More... | |
| bool | isFunctionDeclarationContext () const |
| Return true if this declaration appears in a context where a function declarator would be a function declaration. More... | |
| bool | isFunctionDeclaratorAFunctionDeclaration () const |
| Return true if a function declarator at this position would be a function declaration. More... | |
| void | takeAttributes (ParsedAttributes &attrs, SourceLocation lastLoc) |
| takeAttributes - Takes attributes from the given parsed-attributes set and add them to this declarator. More... | |
| const AttributeList * | getAttributes () const |
| AttributeList * | getAttributes () |
| AttributeList *& | getAttrListRef () |
| bool | hasAttributes () const |
| hasAttributes - do we contain any attributes? More... | |
| void | getCXX11AttributeRanges (SmallVectorImpl< SourceRange > &Ranges) |
| Return a source range list of C++11 attributes associated with the declarator. More... | |
| void | setAsmLabel (Expr *E) |
| Expr * | getAsmLabel () const |
| void | setExtension (bool Val=true) |
| bool | getExtension () const |
| void | setObjCIvar (bool Val=true) |
| bool | isObjCIvar () const |
| void | setObjCWeakProperty (bool Val=true) |
| bool | isObjCWeakProperty () const |
| void | setInvalidType (bool Val=true) |
| bool | isInvalidType () const |
| void | setGroupingParens (bool flag) |
| bool | hasGroupingParens () const |
| bool | isFirstDeclarator () const |
| SourceLocation | getCommaLoc () const |
| void | setCommaLoc (SourceLocation CL) |
| bool | hasEllipsis () const |
| SourceLocation | getEllipsisLoc () const |
| void | setEllipsisLoc (SourceLocation EL) |
| void | setFunctionDefinitionKind (FunctionDefinitionKind Val) |
| bool | isFunctionDefinition () const |
| FunctionDefinitionKind | getFunctionDefinitionKind () const |
| bool | isFirstDeclarationOfMember () |
| Returns true if this declares a real member and not a friend. More... | |
| bool | isStaticMember () |
| Returns true if this declares a static member. More... | |
| bool | isCtorOrDtor () |
| Returns true if this declares a constructor or a destructor. More... | |
| void | setRedeclaration (bool Val) |
| bool | isRedeclaration () const |
Additional Inherited Members | |
Public Types inherited from clang::Declarator | |
| enum | TheContext { FileContext, PrototypeContext, ObjCResultContext, ObjCParameterContext, KNRTypeListContext, TypeNameContext, MemberContext, BlockContext, ForContext, ConditionContext, TemplateParamContext, CXXNewContext, CXXCatchContext, ObjCCatchContext, BlockLiteralContext, LambdaExprContext, LambdaExprParameterContext, ConversionIdContext, TrailingReturnContext, TemplateTypeArgContext, AliasDeclContext, AliasTemplateContext } |
| typedef SmallVectorImpl < DeclaratorChunk > ::const_iterator | type_object_iterator |
| typedef llvm::iterator_range < type_object_iterator > | type_object_range |
A class for parsing a declarator.
Definition at line 200 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 204 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 216 of file RAIIObjectsForParser.h.
References clang::Declarator::clear(), and clang::ParsingDeclRAIIObject::reset().
|
inline |
Definition at line 221 of file RAIIObjectsForParser.h.
References clang::ParsingDeclRAIIObject::complete().
|
inline |
Definition at line 208 of file RAIIObjectsForParser.h.
References clang::Declarator::getDeclSpec().
Referenced by getMutableDeclSpec().
|
inline |
Definition at line 212 of file RAIIObjectsForParser.h.
References getDeclSpec().
1.8.6