clang  3.7.0
Public Member Functions | List of all members
clang::ParsingDeclarator Class Reference

A class for parsing a declarator. More...

#include <RAIIObjectsForParser.h>

Inheritance diagram for clang::ParsingDeclarator:
[legend]
Collaboration diagram for clang::ParsingDeclarator:
[legend]

Public Member Functions

 ParsingDeclarator (Parser &P, const ParsingDeclSpec &DS, TheContext C)
 
const ParsingDeclSpecgetDeclSpec () const
 
ParsingDeclSpecgetMutableDeclSpec () const
 
void clear ()
 
void complete (Decl *D)
 
- Public Member Functions inherited from clang::Declarator
 Declarator (const DeclSpec &ds, TheContext C)
 
 ~Declarator ()
 
const DeclSpecgetDeclSpec () const
 
DeclSpecgetMutableDeclSpec ()
 
AttributePoolgetAttributePool () const
 
const CXXScopeSpecgetCXXScopeSpec () const
 
CXXScopeSpecgetCXXScopeSpec ()
 
UnqualifiedIdgetName ()
 Retrieve the name specified by this declarator. More...
 
TheContext getContext () const
 
bool isPrototypeContext () const
 
const SourceRangegetSourceRange () 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)
 
void SetRangeEnd (SourceLocation Loc)
 SetRangeEnd - Set the end of the source range to Loc, unless it's invalid. More...
 
void ExtendWithDeclSpec (const DeclSpec &DS)
 
void clear ()
 Reset the contents of this Declarator. More...
 
bool mayOmitIdentifier () const
 
bool mayHaveIdentifier () const
 
bool diagnoseIdentifier () const
 
bool mayBeFollowedByCXXDirectInit () const
 
bool isPastIdentifier () const
 
bool hasName () const
 
IdentifierInfogetIdentifier () 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)
 
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 DeclaratorChunkgetTypeObject (unsigned i) const
 
DeclaratorChunkgetTypeObject (unsigned i)
 
type_object_range type_objects () const
 Returns the range of type objects, from the identifier outwards. More...
 
void DropFirstTypeObject ()
 
const DeclaratorChunkgetInnermostNonParenChunk () const
 
const DeclaratorChunkgetOutermostNonParenChunk () const
 
bool isArrayOfUnknownBound () const
 
bool isFunctionDeclarator (unsigned &idx) const
 
bool isFunctionDeclarator () const
 
DeclaratorChunk::FunctionTypeInfogetFunctionTypeInfo ()
 
const
DeclaratorChunk::FunctionTypeInfo
getFunctionTypeInfo () const
 
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)
 
const AttributeListgetAttributes () const
 
AttributeListgetAttributes ()
 
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)
 
ExprgetAsmLabel () 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 ()
 
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
 

Detailed Description

A class for parsing a declarator.

Definition at line 200 of file RAIIObjectsForParser.h.

Constructor & Destructor Documentation

clang::ParsingDeclarator::ParsingDeclarator ( Parser P,
const ParsingDeclSpec DS,
TheContext  C 
)
inline

Definition at line 204 of file RAIIObjectsForParser.h.

Member Function Documentation

void clang::ParsingDeclarator::clear ( )
inline
void clang::ParsingDeclarator::complete ( Decl D)
inline

Definition at line 221 of file RAIIObjectsForParser.h.

References clang::ParsingDeclRAIIObject::complete().

const ParsingDeclSpec& clang::ParsingDeclarator::getDeclSpec ( ) const
inline

Definition at line 208 of file RAIIObjectsForParser.h.

References clang::Declarator::getDeclSpec().

Referenced by getMutableDeclSpec().

ParsingDeclSpec& clang::ParsingDeclarator::getMutableDeclSpec ( ) const
inline

Definition at line 212 of file RAIIObjectsForParser.h.

References getDeclSpec().


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