class Declarator
Declaration
class Declarator { /* full declaration omitted */ };
Description
Information about one declarator, including the parsed type information and the identifier. When the declarator is fully formed, this is turned into the appropriate Decl object. Declarators come in two types: normal declarators and abstract declarators. Abstract declarators are used when parsing types, and don't have an identifier. Normal declarators do have ID's. Instances of this class should be a transient object that lives on the stack, not objects that are allocated in large quantities on the heap.
Declared at: clang/include/clang/Sema/DeclSpec.h:1805
Member Variables
- private const clang::DeclSpec& DS
- private clang::CXXScopeSpec SS
- private clang::UnqualifiedId Name
- private clang::SourceRange Range
- private clang::DeclaratorContext Context
- Where we are parsing this declarator.
- private clang::DecompositionDeclarator BindingGroup
- The C++17 structured binding, if any. This is an alternative to a Name.
- private SmallVector<clang::DeclaratorChunk, 8> DeclTypeInfo
- DeclTypeInfo - This holds each type that the declarator includes as it is parsed. This is pushed from the identifier out, which means that element #0 will be the most closely bound to the identifier, and DeclTypeInfo.back() will be the least closely bound.
- private unsigned int InvalidType
- InvalidType - Set by Sema::GetTypeForDeclarator().
- private unsigned int GroupingParens
- GroupingParens - Set by Parser::ParseParenDeclarator().
- private unsigned int FunctionDefinition
- Actually a FunctionDefinitionKind.
- private unsigned int Redeclaration
- Is this Declarator a redeclaration?
- private unsigned int Extension
- true if the declaration is preceded by \c __extension__.
- private unsigned int ObjCIvar
- Indicates whether this is an Objective-C instance variable.
- private unsigned int ObjCWeakProperty
- Indicates whether this is an Objective-C 'weak' property.
- private unsigned int InlineStorageUsed
- Indicates whether the InlineParams / InlineBindings storage has been used.
- private unsigned int HasInitializer
- Indicates whether this declarator has an initializer.
- private clang::ParsedAttributes Attrs
- Attributes attached to the declarator.
- private const clang::ParsedAttributesView& DeclarationAttrs
- Attributes attached to the declaration. See also documentation for the corresponding constructor parameter.
- private clang::Expr* AsmLabel
- The asm label, if specified.
- private clang::Expr* TrailingRequiresClause
- private ArrayRef<clang::TemplateParameterList*> TemplateParameterLists
- If this declarator declares a template, its template parameter lists.
- private clang::TemplateParameterList* InventedTemplateParameterList
- If the declarator declares an abbreviated function template, the innermost template parameter list containing the invented and explicit template parameters (if any).
- private anonymous struct / union
- private clang::SourceLocation CommaLoc
- If this is the second or subsequent declarator in this declaration, the location of the comma before this declarator.
- private clang::SourceLocation EllipsisLoc
- If provided, the source location of the ellipsis used to describe this declarator as a parameter pack.
Method Overview
- public void AddInnermostTypeInfo(const clang::DeclaratorChunk & TI)
- public void AddTypeInfo(const clang::DeclaratorChunk & TI, clang::ParsedAttributes && attrs, clang::SourceLocation EndLoc)
- public void AddTypeInfo(const clang::DeclaratorChunk & TI, clang::SourceLocation EndLoc)
- public Declarator(const clang::DeclSpec & DS, const clang::ParsedAttributesView & DeclarationAttrs, clang::DeclaratorContext C)
- public void DropFirstTypeObject()
- public void ExtendWithDeclSpec(const clang::DeclSpec & DS)
- public void SetIdentifier(clang::IdentifierInfo * Id, clang::SourceLocation IdLoc)
- public void SetRangeBegin(clang::SourceLocation Loc)
- public void SetRangeEnd(clang::SourceLocation Loc)
- public void SetSourceRange(clang::SourceRange R)
- public void clear()
- public clang::Expr * getAsmLabel() const
- public clang::AttributePool & getAttributePool() const
- public clang::ParsedAttributes & getAttributes()
- public const clang::ParsedAttributes & getAttributes() const
- public clang::SourceLocation getBeginLoc() const
- public void getCXX11AttributeRanges(SmallVectorImpl<clang::SourceRange> & Ranges)
- public clang::CXXScopeSpec & getCXXScopeSpec()
- public const clang::CXXScopeSpec & getCXXScopeSpec() const
- public clang::SourceLocation getCommaLoc() const
- public clang::DeclaratorContext getContext() const
- public const clang::DeclSpec & getDeclSpec() const
- public const clang::ParsedAttributesView & getDeclarationAttributes() const
- public const clang::DecompositionDeclarator & getDecompositionDeclarator() const
- public clang::SourceLocation getEllipsisLoc() const
- public clang::SourceLocation getEndLoc() const
- public bool getExtension() const
- public clang::FunctionDefinitionKind getFunctionDefinitionKind() const
- public DeclaratorChunk::FunctionTypeInfo & getFunctionTypeInfo()
- public const DeclaratorChunk::FunctionTypeInfo & getFunctionTypeInfo() const
- public clang::IdentifierInfo * getIdentifier() const
- public clang::SourceLocation getIdentifierLoc() const
- public const clang::DeclaratorChunk * getInnermostNonParenChunk() const
- public clang::TemplateParameterList * getInventedTemplateParameterList() const
- public clang::DeclSpec & getMutableDeclSpec()
- public clang::UnqualifiedId & getName()
- public unsigned int getNumTypeObjects() const
- public const clang::DeclaratorChunk * getOutermostNonParenChunk() const
- public clang::SourceRange getSourceRange() const
- public ArrayRef<clang::TemplateParameterList *> getTemplateParameterLists() const
- public clang::Expr * getTrailingRequiresClause()
- public clang::ParsedType getTrailingReturnType() const
- public const clang::DeclaratorChunk & getTypeObject(unsigned int i) const
- public clang::DeclaratorChunk & getTypeObject(unsigned int i)
- public bool hasAttributes() const
- public bool hasEllipsis() const
- public bool hasGroupingParens() const
- public bool hasInitializer() const
- public bool hasName() const
- public bool hasTrailingRequiresClause() const
- public bool hasTrailingReturnType() const
- public bool isArrayOfUnknownBound() const
- public bool isCtorOrDtor()
- public bool isDeclarationOfFunction() const
- public bool isDecompositionDeclarator() const
- public bool isExpressionContext() const
- public bool isFirstDeclarationOfMember()
- public bool isFirstDeclarator() const
- public bool isFunctionDeclarationContext() const
- public bool isFunctionDeclarator(unsigned int & idx) const
- public bool isFunctionDeclarator() const
- public bool isFunctionDeclaratorAFunctionDeclaration() const
- public bool isFunctionDefinition() const
- public bool isInvalidType() const
- public bool isObjCIvar() const
- public bool isObjCWeakProperty() const
- public bool isPastIdentifier() const
- public bool isPrototypeContext() const
- public bool isRedeclaration() const
- public bool isStaticMember()
- public bool mayBeFollowedByCXXDirectInit() const
- public bool mayHaveDecompositionDeclarator() const
- public bool mayHaveIdentifier() const
- public bool mayOmitIdentifier() const
- public void setAsmLabel(clang::Expr * E)
- public void setCommaLoc(clang::SourceLocation CL)
- public void setDecompositionBindings(clang::SourceLocation LSquareLoc, ArrayRef<DecompositionDeclarator::Binding> Bindings, clang::SourceLocation RSquareLoc)
- public void setEllipsisLoc(clang::SourceLocation EL)
- public void setExtension(bool Val = true)
- public void setFunctionDefinitionKind(clang::FunctionDefinitionKind Val)
- public void setGroupingParens(bool flag)
- public void setHasInitializer(bool Val = true)
- public void setInvalidType(bool Val = true)
- public void setInventedTemplateParameterList(clang::TemplateParameterList * Invented)
- public void setObjCIvar(bool Val = true)
- public void setObjCWeakProperty(bool Val = true)
- public void setRedeclaration(bool Val)
- public void setTemplateParameterLists(ArrayRef<clang::TemplateParameterList *> TPLs)
- public void setTrailingRequiresClause(clang::Expr * TRC)
- public void takeAttributes(clang::ParsedAttributes & attrs)
- public clang::Declarator::type_object_range type_objects() const
- public ~Declarator()
Methods
¶void AddInnermostTypeInfo(
const clang::DeclaratorChunk& TI)
void AddInnermostTypeInfo(
const clang::DeclaratorChunk& TI)
Description
Add a new innermost chunk to this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2265
Parameters
- const clang::DeclaratorChunk& TI
¶void AddTypeInfo(const clang::DeclaratorChunk& TI,
clang::ParsedAttributes&& attrs,
clang::SourceLocation EndLoc)
void AddTypeInfo(const clang::DeclaratorChunk& TI,
clang::ParsedAttributes&& attrs,
clang::SourceLocation EndLoc)
Description
AddTypeInfo - Add a chunk to this declarator. Also extend the range to EndLoc, which should be the last token of the chunk. This function takes attrs by R-Value reference because it takes ownership of those attributes from the parameter.
Declared at: clang/include/clang/Sema/DeclSpec.h:2245
Parameters
- const clang::DeclaratorChunk& TI
- clang::ParsedAttributes&& attrs
- clang::SourceLocation EndLoc
¶void AddTypeInfo(const clang::DeclaratorChunk& TI,
clang::SourceLocation EndLoc)
void AddTypeInfo(const clang::DeclaratorChunk& TI,
clang::SourceLocation EndLoc)
Description
AddTypeInfo - Add a chunk to this declarator. Also extend the range to EndLoc, which should be the last token of the chunk.
Declared at: clang/include/clang/Sema/DeclSpec.h:2257
Parameters
- const clang::DeclaratorChunk& TI
- clang::SourceLocation EndLoc
¶Declarator(const clang::DeclSpec& DS,
const clang::ParsedAttributesView&
DeclarationAttrs,
clang::DeclaratorContext C)
Declarator(const clang::DeclSpec& DS,
const clang::ParsedAttributesView&
DeclarationAttrs,
clang::DeclaratorContext C)
Description
`DS` and `DeclarationAttrs` must outlive the `Declarator`. In particular, take care not to pass temporary objects for these parameters. `DeclarationAttrs` contains [[]] attributes from the attribute-specifier-seq at the beginning of a declaration, which appertain to the declared entity itself. Attributes with other syntax (e.g. GNU) should not be placed in this attribute list; if they occur at the beginning of a declaration, they apply to the `DeclSpec` and should be attached to that instead. Here is an example of an attribute associated with a declaration: [[deprecated]] int x, y; This attribute appertains to all of the entities declared in the declaration, i.e. `x` and `y` in this case.
Declared at: clang/include/clang/Sema/DeclSpec.h:1916
Parameters
- const clang::DeclSpec& DS
- const clang::ParsedAttributesView& DeclarationAttrs
- clang::DeclaratorContext C
¶void DropFirstTypeObject()
void DropFirstTypeObject()
Declared at: clang/include/clang/Sema/DeclSpec.h:2291
¶void ExtendWithDeclSpec(const clang::DeclSpec& DS)
void ExtendWithDeclSpec(const clang::DeclSpec& DS)
Description
ExtendWithDeclSpec - Extend the declarator source range to include the given declspec, unless its location is invalid. Adopts the range start if the current range start is invalid.
Declared at: clang/include/clang/Sema/DeclSpec.h:1994
Parameters
- const clang::DeclSpec& DS
¶void SetIdentifier(clang::IdentifierInfo* Id,
clang::SourceLocation IdLoc)
void SetIdentifier(clang::IdentifierInfo* Id,
clang::SourceLocation IdLoc)
Description
Set the name of this declarator to be the given identifier.
Declared at: clang/include/clang/Sema/DeclSpec.h:2231
Parameters
¶void SetRangeBegin(clang::SourceLocation Loc)
void SetRangeBegin(clang::SourceLocation Loc)
Description
SetRangeBegin - Set the start of the source range to Loc, unless it's invalid.
Declared at: clang/include/clang/Sema/DeclSpec.h:1982
Parameters
¶void SetRangeEnd(clang::SourceLocation Loc)
void SetRangeEnd(clang::SourceLocation Loc)
Description
SetRangeEnd - Set the end of the source range to Loc, unless it's invalid.
Declared at: clang/include/clang/Sema/DeclSpec.h:1987
Parameters
¶void SetSourceRange(clang::SourceRange R)
void SetSourceRange(clang::SourceRange R)
Declared at: clang/include/clang/Sema/DeclSpec.h:1979
Parameters
¶void clear()
void clear()
Description
Reset the contents of this Declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2003
¶clang::Expr* getAsmLabel() const
clang::Expr* getAsmLabel() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2586
¶clang::AttributePool& getAttributePool() const
clang::AttributePool& getAttributePool() const
Declared at: clang/include/clang/Sema/DeclSpec.h:1949
¶clang::ParsedAttributes& getAttributes()
clang::ParsedAttributes& getAttributes()
Declared at: clang/include/clang/Sema/DeclSpec.h:2560
¶const clang::ParsedAttributes& getAttributes()
const
const clang::ParsedAttributes& getAttributes()
const
Declared at: clang/include/clang/Sema/DeclSpec.h:2559
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/Sema/DeclSpec.h:1976
¶void getCXX11AttributeRanges(
SmallVectorImpl<clang::SourceRange>& Ranges)
void getCXX11AttributeRanges(
SmallVectorImpl<clang::SourceRange>& Ranges)
Description
Return a source range list of C++11 attributes associated with the declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2579
Parameters
- SmallVectorImpl<clang::SourceRange>& Ranges
¶clang::CXXScopeSpec& getCXXScopeSpec()
clang::CXXScopeSpec& getCXXScopeSpec()
Declared at: clang/include/clang/Sema/DeclSpec.h:1956
¶const clang::CXXScopeSpec& getCXXScopeSpec() const
const clang::CXXScopeSpec& getCXXScopeSpec() const
Description
getCXXScopeSpec - Return the C++ scope specifier (global scope or nested-name-specifier) that is part of the declarator-id.
Declared at: clang/include/clang/Sema/DeclSpec.h:1955
¶clang::SourceLocation getCommaLoc() const
clang::SourceLocation getCommaLoc() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2606
¶clang::DeclaratorContext getContext() const
clang::DeclaratorContext getContext() const
Declared at: clang/include/clang/Sema/DeclSpec.h:1965
¶const clang::DeclSpec& getDeclSpec() const
const clang::DeclSpec& getDeclSpec() const
Description
getDeclSpec - Return the declaration-specifier that this declarator was declared with.
Declared at: clang/include/clang/Sema/DeclSpec.h:1940
¶const clang::ParsedAttributesView&
getDeclarationAttributes() const
const clang::ParsedAttributesView&
getDeclarationAttributes() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2562
¶const clang::DecompositionDeclarator&
getDecompositionDeclarator() const
const clang::DecompositionDeclarator&
getDecompositionDeclarator() const
Declared at: clang/include/clang/Sema/DeclSpec.h:1961
¶clang::SourceLocation getEllipsisLoc() const
clang::SourceLocation getEllipsisLoc() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2610
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/Sema/DeclSpec.h:1977
¶bool getExtension() const
bool getExtension() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2589
¶clang::FunctionDefinitionKind
getFunctionDefinitionKind() const
clang::FunctionDefinitionKind
getFunctionDefinitionKind() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2621
¶DeclaratorChunk::FunctionTypeInfo&
getFunctionTypeInfo()
DeclaratorChunk::FunctionTypeInfo&
getFunctionTypeInfo()
Description
getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses).
Declared at: clang/include/clang/Sema/DeclSpec.h:2363
¶const DeclaratorChunk::FunctionTypeInfo&
getFunctionTypeInfo() const
const DeclaratorChunk::FunctionTypeInfo&
getFunctionTypeInfo() const
Description
getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses).
Declared at: clang/include/clang/Sema/DeclSpec.h:2372
¶clang::IdentifierInfo* getIdentifier() const
clang::IdentifierInfo* getIdentifier() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2222
¶clang::SourceLocation getIdentifierLoc() const
clang::SourceLocation getIdentifierLoc() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2228
¶const clang::DeclaratorChunk*
getInnermostNonParenChunk() const
const clang::DeclaratorChunk*
getInnermostNonParenChunk() const
Description
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.
Declared at: clang/include/clang/Sema/DeclSpec.h:2300
¶clang::TemplateParameterList*
getInventedTemplateParameterList() const
clang::TemplateParameterList*
getInventedTemplateParameterList() const
Description
The template parameter list generated from the explicit template parameters along with any invented template parameters from placeholder-typed parameters, if there were any such parameters.
Declared at: clang/include/clang/Sema/DeclSpec.h:2539
¶clang::DeclSpec& getMutableDeclSpec()
clang::DeclSpec& getMutableDeclSpec()
Description
getMutableDeclSpec - Return a non-const version of the DeclSpec. This should be used with extreme care: declspecs can often be shared between multiple declarators, so mutating the DeclSpec affects all of the Declarators. This should only be done when the declspec is known to not be shared or when in error recovery etc.
Declared at: clang/include/clang/Sema/DeclSpec.h:1947
¶clang::UnqualifiedId& getName()
clang::UnqualifiedId& getName()
Description
Retrieve the name specified by this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:1959
¶unsigned int getNumTypeObjects() const
unsigned int getNumTypeObjects() const
Description
Return the number of types applied to this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2270
¶const clang::DeclaratorChunk*
getOutermostNonParenChunk() const
const clang::DeclaratorChunk*
getOutermostNonParenChunk() const
Description
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.
Declared at: clang/include/clang/Sema/DeclSpec.h:2311
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Get the source range that spans this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:1975
¶ArrayRef<clang::TemplateParameterList*>
getTemplateParameterLists() const
ArrayRef<clang::TemplateParameterList*>
getTemplateParameterLists() const
Description
The template parameter lists that preceded the declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2525
¶clang::Expr* getTrailingRequiresClause()
clang::Expr* getTrailingRequiresClause()
Description
Sets a trailing requires clause for this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2509
¶clang::ParsedType getTrailingReturnType() const
clang::ParsedType getTrailingReturnType() const
Description
Get the trailing return type appearing (at any level) within this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2493
¶const clang::DeclaratorChunk& getTypeObject(
unsigned int i) const
const clang::DeclaratorChunk& getTypeObject(
unsigned int i) const
Description
Return the specified TypeInfo from this declarator. TypeInfo #0 is closest to the identifier.
Declared at: clang/include/clang/Sema/DeclSpec.h:2274
Parameters
- unsigned int i
¶clang::DeclaratorChunk& getTypeObject(
unsigned int i)
clang::DeclaratorChunk& getTypeObject(
unsigned int i)
Declared at: clang/include/clang/Sema/DeclSpec.h:2278
Parameters
- unsigned int i
¶bool hasAttributes() const
bool hasAttributes() const
Description
hasAttributes - do we contain any attributes?
Declared at: clang/include/clang/Sema/DeclSpec.h:2567
¶bool hasEllipsis() const
bool hasEllipsis() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2609
¶bool hasGroupingParens() const
bool hasGroupingParens() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2603
¶bool hasInitializer() const
bool hasInitializer() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2626
¶bool hasName() const
bool hasName() const
Description
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.), or a structured binding (which is not exactly a name, but occupies the same position).
Declared at: clang/include/clang/Sema/DeclSpec.h:2212
¶bool hasTrailingRequiresClause() const
bool hasTrailingRequiresClause() const
Description
Determine whether a trailing requires clause was written in this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2515
¶bool hasTrailingReturnType() const
bool hasTrailingReturnType() const
Description
Determine whether a trailing return type was written (at any level) within this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2484
¶bool isArrayOfUnknownBound() const
bool isArrayOfUnknownBound() const
Description
isArrayOfUnknownBound - This method returns true if the declarator is a declarator for an array of unknown bound (looking through parentheses).
Declared at: clang/include/clang/Sema/DeclSpec.h:2322
¶bool isCtorOrDtor()
bool isCtorOrDtor()
Description
Returns true if this declares a constructor or a destructor.
Declared at: clang/include/clang/Sema/DeclSpec.h:2640
¶bool isDeclarationOfFunction() const
bool isDeclarationOfFunction() const
Description
Determine whether the declaration that will be produced from this declaration will be a function. A declaration can declare a function even if the declarator itself isn't a function declarator, if the type specifier refers to a function type. This routine checks for both cases.
Declared at: clang/include/clang/Sema/DeclSpec.h:2382
¶bool isDecompositionDeclarator() const
bool isDecompositionDeclarator() const
Description
Return whether this declarator is a decomposition declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2218
¶bool isExpressionContext() const
bool isExpressionContext() const
Description
Determine whether this declaration appears in a context where an expression could appear.
Declared at: clang/include/clang/Sema/DeclSpec.h:2428
¶bool isFirstDeclarationOfMember()
bool isFirstDeclarationOfMember()
Description
Returns true if this declares a real member and not a friend.
Declared at: clang/include/clang/Sema/DeclSpec.h:2629
¶bool isFirstDeclarator() const
bool isFirstDeclarator() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2605
¶bool isFunctionDeclarationContext() const
bool isFunctionDeclarationContext() const
Description
Return true if this declaration appears in a context where a function declarator would be a function declaration.
Declared at: clang/include/clang/Sema/DeclSpec.h:2386
¶bool isFunctionDeclarator(unsigned int& idx) const
bool isFunctionDeclarator(unsigned int& idx) const
Description
isFunctionDeclarator - This method returns true if the declarator is a function declarator (looking through parentheses). If true is returned, then the reference type parameter idx is assigned with the index of the declaration chunk.
Declared at: clang/include/clang/Sema/DeclSpec.h:2332
Parameters
- unsigned int& idx
¶bool isFunctionDeclarator() const
bool isFunctionDeclarator() const
Description
isFunctionDeclarator - Once this declarator is fully parsed and formed, this method returns true if the identifier is a function declarator (looking through parentheses).
Declared at: clang/include/clang/Sema/DeclSpec.h:2356
¶bool isFunctionDeclaratorAFunctionDeclaration()
const
bool isFunctionDeclaratorAFunctionDeclaration()
const
Description
Return true if a function declarator at this position would be a function declaration.
Declared at: clang/include/clang/Sema/DeclSpec.h:2471
¶bool isFunctionDefinition() const
bool isFunctionDefinition() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2617
¶bool isInvalidType() const
bool isInvalidType() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2598
¶bool isObjCIvar() const
bool isObjCIvar() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2592
¶bool isObjCWeakProperty() const
bool isObjCWeakProperty() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2595
¶bool isPastIdentifier() const
bool isPastIdentifier() const
Description
isPastIdentifier - Return true if we have parsed beyond the point where the name would appear. (This may happen even if we haven't actually parsed a name, perhaps because this context doesn't require one.)
Declared at: clang/include/clang/Sema/DeclSpec.h:2206
¶bool isPrototypeContext() const
bool isPrototypeContext() const
Declared at: clang/include/clang/Sema/DeclSpec.h:1967
¶bool isRedeclaration() const
bool isRedeclaration() const
Declared at: clang/include/clang/Sema/DeclSpec.h:2643
¶bool isStaticMember()
bool isStaticMember()
Description
Returns true if this declares a static member. This cannot be called on a declarator outside of a MemberContext because we won't know until redeclaration time if the decl is static.
Declared at: clang/include/clang/Sema/DeclSpec.h:2637
¶bool mayBeFollowedByCXXDirectInit() const
bool mayBeFollowedByCXXDirectInit() const
Description
mayBeFollowedByCXXDirectInit - Return true if the declarator can be followed by a C++ direct initializer, e.g. "int x(1);".
Declared at: clang/include/clang/Sema/DeclSpec.h:2148
¶bool mayHaveDecompositionDeclarator() const
bool mayHaveDecompositionDeclarator() const
Description
Return true if the context permits a C++17 decomposition declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2103
¶bool mayHaveIdentifier() const
bool mayHaveIdentifier() const
Description
mayHaveIdentifier - Return true if the identifier is either optional or required. This is true for normal declarators and prototypes, but not typenames.
Declared at: clang/include/clang/Sema/DeclSpec.h:2065
¶bool mayOmitIdentifier() const
bool mayOmitIdentifier() const
Description
mayOmitIdentifier - Return true if the identifier is either optional or not allowed. This is true for typenames, prototypes, and template parameter lists.
Declared at: clang/include/clang/Sema/DeclSpec.h:2025
¶void setAsmLabel(clang::Expr* E)
void setAsmLabel(clang::Expr* E)
Declared at: clang/include/clang/Sema/DeclSpec.h:2585
Parameters
- clang::Expr* E
¶void setCommaLoc(clang::SourceLocation CL)
void setCommaLoc(clang::SourceLocation CL)
Declared at: clang/include/clang/Sema/DeclSpec.h:2607
Parameters
¶void setDecompositionBindings(
clang::SourceLocation LSquareLoc,
ArrayRef<DecompositionDeclarator::Binding>
Bindings,
clang::SourceLocation RSquareLoc)
void setDecompositionBindings(
clang::SourceLocation LSquareLoc,
ArrayRef<DecompositionDeclarator::Binding>
Bindings,
clang::SourceLocation RSquareLoc)
Description
Set the decomposition bindings for this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2237
Parameters
- clang::SourceLocation LSquareLoc
- ArrayRef<DecompositionDeclarator::Binding> Bindings
- clang::SourceLocation RSquareLoc
¶void setEllipsisLoc(clang::SourceLocation EL)
void setEllipsisLoc(clang::SourceLocation EL)
Declared at: clang/include/clang/Sema/DeclSpec.h:2611
Parameters
¶void setExtension(bool Val = true)
void setExtension(bool Val = true)
Declared at: clang/include/clang/Sema/DeclSpec.h:2588
Parameters
- bool Val = true
¶void setFunctionDefinitionKind(
clang::FunctionDefinitionKind Val)
void setFunctionDefinitionKind(
clang::FunctionDefinitionKind Val)
Declared at: clang/include/clang/Sema/DeclSpec.h:2613
Parameters
- clang::FunctionDefinitionKind Val
¶void setGroupingParens(bool flag)
void setGroupingParens(bool flag)
Declared at: clang/include/clang/Sema/DeclSpec.h:2602
Parameters
- bool flag
¶void setHasInitializer(bool Val = true)
void setHasInitializer(bool Val = true)
Declared at: clang/include/clang/Sema/DeclSpec.h:2625
Parameters
- bool Val = true
¶void setInvalidType(bool Val = true)
void setInvalidType(bool Val = true)
Declared at: clang/include/clang/Sema/DeclSpec.h:2597
Parameters
- bool Val = true
¶void setInventedTemplateParameterList(
clang::TemplateParameterList* Invented)
void setInventedTemplateParameterList(
clang::TemplateParameterList* Invented)
Description
Sets the template parameter list generated from the explicit template parameters along with any invented template parameters from placeholder-typed parameters.
Declared at: clang/include/clang/Sema/DeclSpec.h:2532
Parameters
- clang::TemplateParameterList* Invented
¶void setObjCIvar(bool Val = true)
void setObjCIvar(bool Val = true)
Declared at: clang/include/clang/Sema/DeclSpec.h:2591
Parameters
- bool Val = true
¶void setObjCWeakProperty(bool Val = true)
void setObjCWeakProperty(bool Val = true)
Declared at: clang/include/clang/Sema/DeclSpec.h:2594
Parameters
- bool Val = true
¶void setRedeclaration(bool Val)
void setRedeclaration(bool Val)
Declared at: clang/include/clang/Sema/DeclSpec.h:2642
Parameters
- bool Val
¶void setTemplateParameterLists(
ArrayRef<clang::TemplateParameterList*> TPLs)
void setTemplateParameterLists(
ArrayRef<clang::TemplateParameterList*> TPLs)
Description
Sets the template parameter lists that preceded the declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2520
Parameters
- ArrayRef<clang::TemplateParameterList*> TPLs
¶void setTrailingRequiresClause(clang::Expr* TRC)
void setTrailingRequiresClause(clang::Expr* TRC)
Description
Sets a trailing requires clause for this declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2502
Parameters
- clang::Expr* TRC
¶void takeAttributes(
clang::ParsedAttributes& attrs)
void takeAttributes(
clang::ParsedAttributes& attrs)
Description
takeAttributes - Takes attributes from the given parsed-attributes set and add them to this declarator. These examples both add 3 attributes to "var": short int var __attribute__((aligned(16),common,deprecated)); short int x, __attribute__((aligned(16)) var __attribute__((common,deprecated)); Also extends the range of the declarator.
Declared at: clang/include/clang/Sema/DeclSpec.h:2552
Parameters
- clang::ParsedAttributes& attrs
¶clang::Declarator::type_object_range
type_objects() const
clang::Declarator::type_object_range
type_objects() const
Description
Returns the range of type objects, from the identifier outwards.
Declared at: clang/include/clang/Sema/DeclSpec.h:2287
¶~Declarator()
~Declarator()
Declared at: clang/include/clang/Sema/DeclSpec.h:1935