|
clang 24.0.0git
|
Information about one declarator, including the parsed type information and the identifier. More...
#include "clang/Sema/DeclSpec.h"
Public Types | |
| typedef SmallVectorImpl< DeclaratorChunk >::const_iterator | type_object_iterator |
| typedef llvm::iterator_range< type_object_iterator > | type_object_range |
Public Member Functions | |
| Declarator (const DeclSpec &DS, const ParsedAttributesView &DeclarationAttrs, DeclaratorContext C) | |
| DS and DeclarationAttrs must outlive the Declarator. | |
| ~Declarator () | |
| const DeclSpec & | getDeclSpec () const |
| getDeclSpec - Return the declaration-specifier that this declarator was declared with. | |
| DeclSpec & | getMutableDeclSpec () |
| getMutableDeclSpec - Return a non-const version of the DeclSpec. | |
| 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. | |
| CXXScopeSpec & | getCXXScopeSpec () |
| UnqualifiedId & | getName () |
| Retrieve the name specified by this declarator. | |
| const DecompositionDeclarator & | getDecompositionDeclarator () const |
| DeclaratorContext | getContext () const |
| bool | isPrototypeContext () const |
| SourceRange | getSourceRange () const LLVM_READONLY |
| Get the source range that spans this declarator. | |
| SourceLocation | getBeginLoc () const LLVM_READONLY |
| SourceLocation | getEndLoc () 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. | |
| void | SetRangeEnd (SourceLocation Loc) |
| SetRangeEnd - Set the end of the source range to Loc, unless it's invalid. | |
| void | ExtendWithDeclSpec (const DeclSpec &DS) |
| ExtendWithDeclSpec - Extend the declarator source range to include the given declspec, unless its location is invalid. | |
| void | clear () |
| Reset the contents of this Declarator. | |
| bool | mayOmitIdentifier () const |
| mayOmitIdentifier - Return true if the identifier is either optional or not allowed. | |
| bool | mayHaveIdentifier () const |
| mayHaveIdentifier - Return true if the identifier is either optional or required. | |
| bool | mayHaveDecompositionDeclarator () const |
| Return true if the context permits a C++17 decomposition declarator. | |
| bool | mayBeFollowedByCXXDirectInit () const |
| mayBeFollowedByCXXDirectInit - Return true if the declarator can be followed by a C++ direct initializer, e.g. | |
| bool | isPastIdentifier () const |
| isPastIdentifier - Return true if we have parsed beyond the point where the name would appear. | |
| 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.), or a structured binding (which is not exactly a name, but occupies the same position). | |
| bool | isDecompositionDeclarator () const |
| Return whether this declarator is a decomposition declarator. | |
| const IdentifierInfo * | getIdentifier () const |
| SourceLocation | getIdentifierLoc () const |
| void | SetIdentifier (const IdentifierInfo *Id, SourceLocation IdLoc) |
| Set the name of this declarator to be the given identifier. | |
| void | setDecompositionBindings (SourceLocation LSquareLoc, MutableArrayRef< DecompositionDeclarator::Binding > Bindings, SourceLocation RSquareLoc) |
| Set the decomposition bindings for this declarator. | |
| void | AddTypeInfo (const DeclaratorChunk &TI, ParsedAttributes &&attrs, SourceLocation EndLoc, const LateParsedAttrList &LateAttrs={}) |
| AddTypeInfo - Add a chunk to this declarator. | |
| void | AddTypeInfo (const DeclaratorChunk &TI, AttributePool &OtherPool, SourceLocation EndLoc) |
| AddTypeInfo - Add a chunk to this declarator. | |
| void | AddTypeInfo (const DeclaratorChunk &TI, SourceLocation EndLoc) |
| AddTypeInfo - Add a chunk to this declarator. | |
| void | AddInnermostTypeInfo (const DeclaratorChunk &TI) |
| Add a new innermost chunk to this declarator. | |
| unsigned | getNumTypeObjects () const |
| Return the number of types applied to this declarator. | |
| const DeclaratorChunk & | getTypeObject (unsigned i) const |
| Return the specified TypeInfo from this declarator. | |
| DeclaratorChunk & | getTypeObject (unsigned i) |
| type_object_range | type_objects () const |
| Returns the range of type objects, from the identifier outwards. | |
| 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. | |
| 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. | |
| bool | isArrayOfUnknownBound () const |
| isArrayOfUnknownBound - This method returns true if the declarator is a declarator for an array of unknown bound (looking through parentheses). | |
| bool | isFunctionDeclarator (unsigned &idx) const |
| isFunctionDeclarator - This method returns true if the declarator is a function declarator (looking through parentheses). | |
| 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). | |
| DeclaratorChunk::FunctionTypeInfo & | getFunctionTypeInfo () |
| getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses). | |
| const DeclaratorChunk::FunctionTypeInfo & | getFunctionTypeInfo () const |
| getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses). | |
| bool | isDeclarationOfFunction () const |
| Determine whether the declaration that will be produced from this declaration will be a function. | |
| bool | isFunctionDeclarationContext () const |
| Return true if this declaration appears in a context where a function declarator would be a function declaration. | |
| bool | isExpressionContext () const |
| Determine whether this declaration appears in a context where an expression could appear. | |
| bool | isFunctionDeclaratorAFunctionDeclaration () const |
| Return true if a function declarator at this position would be a function declaration. | |
| bool | hasTrailingReturnType () const |
| Determine whether a trailing return type was written (at any level) within this declarator. | |
| ParsedType | getTrailingReturnType () const |
| Get the trailing return type appearing (at any level) within this declarator. | |
| void | setTrailingRequiresClause (Expr *TRC) |
| Sets a trailing requires clause for this declarator. | |
| Expr * | getTrailingRequiresClause () |
| Sets a trailing requires clause for this declarator. | |
| bool | hasTrailingRequiresClause () const |
| Determine whether a trailing requires clause was written in this declarator. | |
| void | setTemplateParameterLists (ArrayRef< TemplateParameterList * > TPLs) |
| Sets the template parameter lists that preceded the declarator. | |
| ArrayRef< TemplateParameterList * > | getTemplateParameterLists () const |
| The template parameter lists that preceded the declarator. | |
| void | setInventedTemplateParameterList (TemplateParameterList *Invented) |
| Sets the template parameter list generated from the explicit template parameters along with any invented template parameters from placeholder-typed parameters. | |
| TemplateParameterList * | getInventedTemplateParameterList () const |
| 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. | |
| void | takeAttributesAppending (ParsedAttributes &attrs) |
| takeAttributesAppending - Takes attributes from the given ParsedAttributes set and add them to this declarator. | |
| const ParsedAttributes & | getAttributes () const |
| ParsedAttributes & | getAttributes () |
| const ParsedAttributesView & | getDeclarationAttributes () const |
| LateParsedAttrList & | getLateAttributes () |
| const LateParsedAttrList & | getLateAttributes () const |
| bool | hasAttributes () const |
| hasAttributes - do we contain any attributes? | |
| 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) |
| bool | hasPackIndexing () const |
| Expr * | getPackIndexingExpr () const |
| void | setPackIndexingExpr (Expr *PI) |
| void | setFunctionDefinitionKind (FunctionDefinitionKind Val) |
| bool | isFunctionDefinition () const |
| FunctionDefinitionKind | getFunctionDefinitionKind () const |
| void | setHasInitializer (bool Val=true) |
| bool | hasInitializer () const |
| bool | isFirstDeclarationOfMember () |
| Returns true if this declares a real member and not a friend. | |
| bool | isStaticMember () |
| Returns true if this declares a static member. | |
| bool | isExplicitObjectMemberFunction () |
| bool | isCtorOrDtor () |
| Returns true if this declares a constructor or a destructor. | |
| void | setRedeclaration (bool Val) |
| bool | isRedeclaration () const |
Friends | |
| struct | DeclaratorChunk |
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.
Definition at line 1996 of file DeclSpec.h.
| typedef SmallVectorImpl<DeclaratorChunk>::const_iterator clang::Declarator::type_object_iterator |
Definition at line 2510 of file DeclSpec.h.
| typedef llvm::iterator_range<type_object_iterator> clang::Declarator::type_object_range |
Definition at line 2511 of file DeclSpec.h.
|
inline |
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.
Definition at line 2120 of file DeclSpec.h.
References clang::C, clang::Declaration, false, getAttributePool(), getSourceRange(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), clang::nullptr, and clang::TST_error.
Referenced by getFunctionTypeInfo(), and clang::ParsingDeclarator::ParsingDeclarator().
|
inline |
Definition at line 2141 of file DeclSpec.h.
References clear().
|
inline |
Add a new innermost chunk to this declarator.
Definition at line 2492 of file DeclSpec.h.
References DeclaratorChunk.
Referenced by maybeSynthesizeBlockSignature().
|
inline |
AddTypeInfo - Add a chunk to this declarator.
Also extend the range to EndLoc, which should be the last token of the chunk. This overload is for copying a 'chunk' from another declarator, so it takes the pool that the other Declarator owns so that it can 'take' the attributes from it.
Definition at line 2470 of file DeclSpec.h.
References DeclaratorChunk, getAttributePool(), clang::SourceLocation::isInvalid(), SetRangeEnd(), and clang::AttributePool::takeFrom().
|
inline |
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.
Definition at line 2453 of file DeclSpec.h.
References DeclaratorChunk.
Referenced by clang::Sema::ActOnCXXForRangeIdentifier(), clang::SemaObjC::actOnObjCTypeArgsOrProtocolQualifiers(), and clang::Sema::ImplicitlyDefineFunction().
|
inline |
AddTypeInfo - Add a chunk to this declarator.
Also extend the range to EndLoc, which should be the last token of the chunk.
Definition at line 2481 of file DeclSpec.h.
References clang::DeclaratorChunk::AttrList, DeclaratorChunk, clang::ParsedAttributesView::empty(), clang::SourceLocation::isInvalid(), and SetRangeEnd().
|
inline |
Reset the contents of this Declarator.
Definition at line 2209 of file DeclSpec.h.
Referenced by clang::ParsingDeclarator::clear(), and ~Declarator().
|
inline |
Definition at line 2518 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), and clang::Sema::ActOnDecompositionDeclarator().
|
inline |
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.
Definition at line 2200 of file DeclSpec.h.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::SourceLocation::isInvalid(), and clang::SourceRange::setBegin().
|
inline |
Definition at line 2810 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::Sema::ActOnVariableDeclarator().
|
inline |
Definition at line 2155 of file DeclSpec.h.
Referenced by addContextSensitiveTypeNullability(), AddTypeInfo(), Declarator(), takeDeclAttributes(), and transferARCOwnershipToDeclaratorChunk().
|
inline |
Definition at line 2787 of file DeclSpec.h.
|
inline |
Definition at line 2786 of file DeclSpec.h.
Referenced by clang::Sema::checkUnusedDeclAttributes(), distributeFunctionTypeAttrFromDeclarator(), distributeObjCPointerTypeAttrFromDeclarator(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), GetTypeSourceInfoForDeclarator(), hasAttributes(), hasParsedAttr(), clang::Sema::ProcessDeclAttributes(), and takeDeclAttributes().
|
inline |
Definition at line 2182 of file DeclSpec.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFinishFunctionDeclarationDeclarator(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnStartFunctionDeclarationDeclarator(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnVariableDeclarator(), CreateNewFunctionDecl(), GetFullTypeForDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), clang::Sema::isDeclaratorFunctionLike(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), maybeSynthesizeBlockSignature(), clang::Sema::ParseTypedefDecl(), and warnAboutRedundantParens().
|
inline |
Definition at line 2830 of file DeclSpec.h.
Referenced by warnAboutAmbiguousFunction().
|
inline |
Definition at line 2171 of file DeclSpec.h.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnTypeName(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::SemaCodeCompletion::CodeCompleteFunctionQualifiers(), ConvertDeclSpecToType(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), isFirstDeclarationOfMember(), isOmittedBlockReturnType(), isStaticMember(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
|
inline |
Definition at line 2162 of file DeclSpec.h.
|
inline |
getCXXScopeSpec - Return the C++ scope specifier (global scope or nested-name-specifier) that is part of the declarator-id.
Definition at line 2161 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnStartFunctionDeclarationDeclarator(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::Sema::CheckFunctionOrTemplateParamDeclarator(), DiagnoseInvalidRedeclaration(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::isDeclaratorFunctionLike(), SetNestedNameSpecifier(), and warnAboutRedundantParens().
|
inline |
Definition at line 2789 of file DeclSpec.h.
Referenced by clang::Sema::checkUnusedDeclAttributes(), ConvertDeclSpecToType(), getCCForDeclaratorChunk(), GetFullTypeForDeclarator(), GetTypeSourceInfoForDeclarator(), hasAttributes(), hasParsedAttr(), clang::Sema::ProcessDeclAttributes(), and takeDeclAttributes().
|
inline |
getDeclSpec - Return the declaration-specifier that this declarator was declared with.
Definition at line 2146 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXConditionDeclaration(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnIvar(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::canDelayFunctionBody(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::Sema::CheckFieldDecl(), checkOmittedBlockReturnType(), clang::Sema::checkUnusedDeclAttributes(), clang::Sema::containsUnexpandedParameterPacks(), CreateNewFunctionDecl(), diagnoseRedundantReturnTypeQualifiers(), getCCForDeclaratorChunk(), clang::ParsingDeclarator::getDeclSpec(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), getLambdaType(), GetTypeSourceInfoForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), hasAttributes(), hasParsedAttr(), InventTemplateParameter(), clang::Sema::isDeclaratorFunctionLike(), isFirstDeclarationOfMember(), isFunctionDeclarationContext(), isOmittedBlockReturnType(), isStaticMember(), mayBeFollowedByCXXDirectInit(), clang::Sema::ParseTypedefDecl(), clang::Sema::ProcessDeclAttributes(), takeDeclAttributes(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
|
inline |
Definition at line 2167 of file DeclSpec.h.
Referenced by clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnVariableDeclarator(), and clang::Sema::HandleField().
|
inline |
Definition at line 2834 of file DeclSpec.h.
Referenced by clang::Sema::ActOnNonTypeTemplateParameter(), GetFullTypeForDeclarator(), GetTypeSourceInfoForDeclarator(), and InventTemplateParameter().
|
inline |
Definition at line 2183 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnFinishFunctionDeclarationDeclarator(), clang::Sema::ActOnVariableDeclarator(), CreateNewFunctionDecl(), and warnAboutRedundantParens().
|
inline |
Definition at line 2813 of file DeclSpec.h.
|
inline |
Definition at line 2849 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), GetFullTypeForDeclarator(), isFunctionDefinition(), and warnAboutAmbiguousFunction().
|
inline |
getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses).
Definition at line 2590 of file DeclSpec.h.
References isFunctionDeclarator().
Referenced by clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStartTrailingRequiresClause(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), checkMethodTypeQualifiers(), clang::SemaCodeCompletion::CodeCompleteAfterFunctionEquals(), CreateNewFunctionDecl(), DiagnoseInvalidRedeclaration(), getFunctionTypeInfo(), getLambdaType(), isExplicitObjectMemberFunction(), and maybeSynthesizeBlockSignature().
|
inline |
getFunctionTypeInfo - Retrieves the function type info object (looking through parentheses).
Definition at line 2599 of file DeclSpec.h.
References Declarator(), and getFunctionTypeInfo().
|
inline |
Definition at line 2430 of file DeclSpec.h.
References clang::IK_Identifier.
Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnExceptionDeclarator(), clang::SemaObjC::ActOnIvar(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnTypeName(), clang::SemaObjC::CreatePropertyDecl(), GetFullTypeForDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), clang::SemaObjC::HandlePropertyInClassExtension(), InventTemplateParameter(), clang::Sema::isDeclaratorFunctionLike(), clang::Sema::isLibstdcxxEagerExceptionSpecHack(), clang::Sema::ParseTypedefDecl(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
|
inline |
Definition at line 2436 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnIvar(), clang::Sema::ActOnNonTypeTemplateParameter(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnStartFunctionDeclarationDeclarator(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckFunctionOrTemplateParamDeclarator(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), clang::SemaObjC::CreatePropertyDecl(), DiagnoseInvalidRedeclaration(), diagnoseRedundantReturnTypeQualifiers(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), clang::Sema::HandleMSProperty(), InventTemplateParameter(), clang::Sema::ParseTypedefDecl(), RebuildDeclaratorInCurrentInstantiation(), and warnAboutAmbiguousFunction().
|
inline |
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.
Definition at line 2527 of file DeclSpec.h.
References DeclaratorChunk.
Referenced by GetFullTypeForDeclarator(), and isArrayOfUnknownBound().
|
inline |
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.
Definition at line 2766 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator().
|
inline |
Definition at line 2793 of file DeclSpec.h.
|
inline |
Definition at line 2794 of file DeclSpec.h.
|
inline |
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.
Definition at line 2153 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnParamDeclarator(), addContextSensitiveTypeNullability(), clang::Sema::CheckDeductionGuideDeclarator(), checkOmittedBlockReturnType(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), distributeObjCPointerTypeAttrFromDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), RebuildDeclaratorInCurrentInstantiation(), and takeDeclAttributes().
|
inline |
Retrieve the name specified by this declarator.
Definition at line 2165 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckFunctionOrTemplateParamDeclarator(), clang::SemaCodeCompletion::CodeCompleteAfterFunctionEquals(), diagnoseRedundantReturnTypeQualifiers(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getMissingDeclaratorIdLoc(), clang::Sema::GetNameForDeclarator(), clang::Sema::HandleDeclarator(), isCtorOrDtor(), and isStaticMember().
|
inline |
Return the number of types applied to this declarator.
Definition at line 2497 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), addContextSensitiveTypeNullability(), clang::Sema::canDelayFunctionBody(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::checkUnusedDeclAttributes(), classifyPointerDeclarator(), clang::Sema::containsUnexpandedParameterPacks(), diagnoseInvalidDeclaratorChunks(), diagnoseRedundantReturnTypeQualifiers(), distributeFunctionTypeAttrToInnermost(), distributeObjCPointerTypeAttrFromDeclarator(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getLambdaType(), GetTypeSourceInfoForDeclarator(), handleObjCOwnershipTypeAttr(), hasAttributes(), hasParsedAttr(), inferARCWriteback(), isFunctionDeclaratorAFunctionDeclaration(), isOmittedBlockReturnType(), isPipeDeclarator(), maybeMovePastReturnType(), maybeSynthesizeBlockSignature(), clang::Sema::ProcessDeclAttributes(), RebuildDeclaratorInCurrentInstantiation(), takeDeclAttributes(), transferARCOwnership(), and warnAboutRedundantParens().
|
inline |
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.
Definition at line 2538 of file DeclSpec.h.
References DeclaratorChunk.
|
inline |
Definition at line 2838 of file DeclSpec.h.
|
inline |
Get the source range that spans this declarator.
Definition at line 2181 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXConditionDeclaration(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), Declarator(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), and clang::Parser::ParseTypeName().
|
inline |
The template parameter lists that preceded the declarator.
Definition at line 2752 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFinishFunctionDeclarationDeclarator(), clang::Sema::ActOnStartFunctionDeclarationDeclarator(), and isStaticMember().
|
inline |
Sets a trailing requires clause for this declarator.
Definition at line 2736 of file DeclSpec.h.
Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::containsUnexpandedParameterPacks(), and CreateNewFunctionDecl().
|
inline |
Get the trailing return type appearing (at any level) within this declarator.
Definition at line 2720 of file DeclSpec.h.
References clang::DeclaratorChunk::Function, and type_objects().
Referenced by GetDeclSpecTypeForDeclarator().
|
inline |
Definition at line 2505 of file DeclSpec.h.
References DeclaratorChunk.
|
inline |
Return the specified TypeInfo from this declarator.
TypeInfo #0 is closest to the identifier.
Definition at line 2501 of file DeclSpec.h.
References DeclaratorChunk.
Referenced by clang::Sema::ActOnCXXNew(), clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfLambdaDefinition(), addContextSensitiveTypeNullability(), clang::Sema::canDelayFunctionBody(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::checkUnusedDeclAttributes(), classifyPointerDeclarator(), clang::Sema::containsUnexpandedParameterPacks(), diagnoseInvalidDeclaratorChunks(), diagnoseRedundantReturnTypeQualifiers(), distributeFunctionTypeAttr(), distributeFunctionTypeAttrToInnermost(), distributeNullabilityTypeAttr(), distributeObjCPointerTypeAttr(), distributeObjCPointerTypeAttrFromDeclarator(), getCCForDeclaratorChunk(), GetFullTypeForDeclarator(), GetTypeSourceInfoForDeclarator(), hasAttributes(), hasOuterPointerLikeChunk(), hasParsedAttr(), inferARCWriteback(), isFunctionDeclaratorAFunctionDeclaration(), isOmittedBlockReturnType(), isPipeDeclarator(), maybeMovePastReturnType(), clang::Sema::ProcessDeclAttributes(), RebuildDeclaratorInCurrentInstantiation(), takeDeclAttributes(), transferARCOwnership(), transferARCOwnershipToDeclaratorChunk(), and warnAboutRedundantParens().
|
inline |
hasAttributes - do we contain any attributes?
Definition at line 2799 of file DeclSpec.h.
References getAttributes(), getDeclarationAttributes(), getDeclSpec(), getNumTypeObjects(), getTypeObject(), and hasAttributes().
Referenced by hasAttributes().
|
inline |
Definition at line 2833 of file DeclSpec.h.
Referenced by clang::Sema::ActOnNonTypeTemplateParameter(), GetFullTypeForDeclarator(), and InventTemplateParameter().
|
inline |
Definition at line 2827 of file DeclSpec.h.
Referenced by clang::Sema::ActOnDecompositionDeclarator(), and mayBeFollowedByCXXDirectInit().
|
inline |
Definition at line 2854 of file DeclSpec.h.
Referenced by clang::Sema::ActOnVariableDeclarator().
|
inline |
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).
Definition at line 2420 of file DeclSpec.h.
References clang::IK_Identifier, and isDecompositionDeclarator().
Referenced by setDecompositionBindings().
|
inline |
Definition at line 2837 of file DeclSpec.h.
|
inline |
Determine whether a trailing requires clause was written in this declarator.
Definition at line 2742 of file DeclSpec.h.
|
inline |
Determine whether a trailing return type was written (at any level) within this declarator.
Definition at line 2711 of file DeclSpec.h.
References clang::DeclaratorChunk::Function, and type_objects().
Referenced by GetDeclSpecTypeForDeclarator().
|
inline |
isArrayOfUnknownBound - This method returns true if the declarator is a declarator for an array of unknown bound (looking through parentheses).
Definition at line 2549 of file DeclSpec.h.
References clang::DeclaratorChunk::Arr, clang::DeclaratorChunk::Array, DeclaratorChunk, getInnermostNonParenChunk(), clang::DeclaratorChunk::Kind, and clang::DeclaratorChunk::ArrayTypeInfo::NumElts.
| bool Declarator::isCtorOrDtor | ( | ) |
Returns true if this declares a constructor or a destructor.
Definition at line 412 of file DeclSpec.cpp.
References clang::UnqualifiedId::getKind(), getKind(), getName(), clang::IK_ConstructorName, and clang::IK_DestructorName.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::SemaCodeCompletion::CodeCompleteFunctionQualifiers().
| bool Declarator::isDeclarationOfFunction | ( | ) | const |
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.
Definition at line 296 of file DeclSpec.cpp.
References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::DeclaratorChunk::Function, clang::Type::isFunctionType(), clang::QualType::isNull(), clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pipe, clang::DeclaratorChunk::Pointer, clang::DeclaratorChunk::Reference, clang::TST_Accum, clang::TST_atomic, clang::TST_auto, clang::TST_auto_type, clang::TST_BFloat16, clang::TST_bitint, clang::TST_bool, clang::TST_char, clang::TST_char16, clang::TST_char32, clang::TST_char8, clang::TST_class, clang::TST_decimal128, clang::TST_decimal32, clang::TST_decimal64, clang::TST_decltype, clang::TST_decltype_auto, clang::TST_double, clang::TST_enum, clang::TST_error, clang::TST_float, clang::TST_float128, clang::TST_Float16, clang::TST_Fract, clang::TST_half, clang::TST_ibm128, clang::TST_int, clang::TST_int128, clang::TST_interface, clang::TST_struct, clang::TST_typename, clang::TST_typename_pack_indexing, clang::TST_typeof_unqualExpr, clang::TST_typeof_unqualType, clang::TST_typeofExpr, clang::TST_typeofType, clang::TST_union, clang::TST_unknown_anytype, clang::TST_unspecified, clang::TST_void, and clang::TST_wchar.
Referenced by clang::Sema::ActOnCXXMemberDeclarator(), and isStaticMember().
|
inline |
Return whether this declarator is a decomposition declarator.
Definition at line 2426 of file DeclSpec.h.
Referenced by clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), and hasName().
| bool Declarator::isExplicitObjectMemberFunction | ( | ) |
Definition at line 400 of file DeclSpec.cpp.
References getFunctionTypeInfo(), isFunctionDeclarator(), clang::DeclaratorChunk::FunctionTypeInfo::NumParams, clang::DeclaratorChunk::ParamInfo::Param, and clang::DeclaratorChunk::FunctionTypeInfo::Params.
Referenced by clang::Sema::ActOnFunctionDeclarator(), GetFullTypeForDeclarator(), and getLambdaType().
|
inline |
Determine whether this declaration appears in a context where an expression could appear.
Definition at line 2655 of file DeclSpec.h.
References clang::AliasDecl, clang::AliasTemplate, clang::Association, clang::Block, clang::BlockLiteral, clang::Condition, clang::ConversionId, clang::CXXCatch, clang::CXXNew, clang::File, clang::ForInit, clang::FunctionalCast, clang::KNRTypeList, clang::LambdaExpr, clang::LambdaExprParameter, clang::Member, clang::ObjCCatch, clang::ObjCParameter, clang::ObjCResult, clang::Prototype, clang::RequiresExpr, clang::SelectionInit, clang::TemplateArg, clang::TemplateParam, clang::TemplateTypeArg, clang::TrailingReturn, clang::TrailingReturnVar, and clang::TypeName.
Referenced by warnAboutRedundantParens().
|
inline |
Returns true if this declares a real member and not a friend.
Definition at line 2857 of file DeclSpec.h.
References getContext(), getDeclSpec(), clang::DeclSpec::isFriendSpecified(), and clang::Member.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and getCCForDeclaratorChunk().
|
inline |
Definition at line 2829 of file DeclSpec.h.
Referenced by ConvertDeclSpecToType(), warnAboutAmbiguousFunction(), and warnAboutRedundantParens().
|
inline |
Return true if this declaration appears in a context where a function declarator would be a function declaration.
Definition at line 2613 of file DeclSpec.h.
References clang::AliasDecl, clang::AliasTemplate, clang::Association, clang::Block, clang::BlockLiteral, clang::Condition, clang::ConversionId, clang::CXXCatch, clang::CXXNew, clang::File, clang::ForInit, clang::FunctionalCast, getDeclSpec(), clang::KNRTypeList, clang::LambdaExpr, clang::LambdaExprParameter, clang::Member, clang::ObjCCatch, clang::ObjCParameter, clang::ObjCResult, clang::Prototype, clang::RequiresExpr, clang::DeclSpec::SCS_typedef, clang::SelectionInit, clang::TemplateArg, clang::TemplateParam, clang::TemplateTypeArg, clang::TrailingReturn, clang::TrailingReturnVar, and clang::TypeName.
Referenced by clang::Sema::CheckExtraCXXDefaultArguments(), GetFullTypeForDeclarator(), and isFunctionDeclaratorAFunctionDeclaration().
|
inline |
isFunctionDeclarator - Once this declarator is fully parsed and formed, this method returns true if the identifier is a function declarator (looking through parentheses).
Definition at line 2583 of file DeclSpec.h.
References isFunctionDeclarator().
Referenced by getFunctionTypeInfo(), isExplicitObjectMemberFunction(), and isFunctionDeclarator().
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.
Definition at line 2559 of file DeclSpec.h.
References clang::DeclaratorChunk::Array, clang::DeclaratorChunk::BlockPointer, clang::DeclaratorChunk::Function, clang::DeclaratorChunk::MemberPointer, clang::DeclaratorChunk::Paren, clang::DeclaratorChunk::Pipe, clang::DeclaratorChunk::Pointer, and clang::DeclaratorChunk::Reference.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnStartTrailingRequiresClause(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::SemaCodeCompletion::CodeCompleteAfterFunctionEquals(), CreateNewFunctionDecl(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), maybeSynthesizeBlockSignature(), and warnAboutAmbiguousFunction().
|
inline |
Return true if a function declarator at this position would be a function declaration.
Definition at line 2698 of file DeclSpec.h.
References getNumTypeObjects(), getTypeObject(), isFunctionDeclarationContext(), and clang::DeclaratorChunk::Paren.
|
inline |
Definition at line 2845 of file DeclSpec.h.
References clang::Declaration, and getFunctionDefinitionKind().
Referenced by clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), and DiagnoseInvalidRedeclaration().
|
inline |
Definition at line 2822 of file DeclSpec.h.
References clang::DeclSpec::TST_error.
Referenced by clang::Sema::ActOnBuiltinBitCastExpr(), clang::Sema::ActOnCastExpr(), clang::Sema::ActOnCXXNamedCast(), clang::Sema::ActOnCXXNew(), clang::Sema::ActOnExceptionDeclarator(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFriendTypeDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnIvar(), clang::SemaObjC::ActOnObjCExceptionDecl(), clang::SemaOpenMP::ActOnOpenMPDeclareMapperVarDecl(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypeName(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::Sema::CheckFieldDecl(), checkMethodTypeQualifiers(), CreateNewFunctionDecl(), diagnoseInvalidDeclaratorChunks(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), clang::Sema::HandleDeclarator(), clang::Sema::ParseTypedefDecl(), clang::Parser::ParseTypeName(), and warnAboutRedundantParens().
|
inline |
Definition at line 2816 of file DeclSpec.h.
|
inline |
Definition at line 2819 of file DeclSpec.h.
|
inline |
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.)
Definition at line 2414 of file DeclSpec.h.
|
inline |
Definition at line 2173 of file DeclSpec.h.
References clang::LambdaExprParameter, clang::ObjCParameter, clang::ObjCResult, and clang::Prototype.
Referenced by GetFullTypeForDeclarator(), and clang::Sema::GetTypeForDeclarator().
|
inline |
| bool Declarator::isStaticMember | ( | ) |
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.
Definition at line 391 of file DeclSpec.cpp.
References getContext(), getDeclSpec(), getKind(), getName(), clang::DeclSpec::getStorageClassSpec(), getTemplateParameterLists(), clang::IK_OperatorFunctionId, isDeclarationOfFunction(), clang::CXXMethodDecl::isStaticOverloadedOperator(), clang::Member, and clang::DeclSpec::SCS_static.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::SemaCodeCompletion::CodeCompleteFunctionQualifiers(), getCCForDeclaratorChunk(), GetDeclSpecTypeForDeclarator(), and GetFullTypeForDeclarator().
|
inline |
mayBeFollowedByCXXDirectInit - Return true if the declarator can be followed by a C++ direct initializer, e.g.
"int x(1);".
Definition at line 2356 of file DeclSpec.h.
References clang::AliasDecl, clang::AliasTemplate, clang::Association, clang::Block, clang::BlockLiteral, clang::Condition, clang::ConversionId, clang::CXXCatch, clang::CXXNew, clang::File, clang::ForInit, clang::FunctionalCast, getDeclSpec(), hasGroupingParens(), clang::IK_Identifier, clang::KNRTypeList, clang::LambdaExpr, clang::LambdaExprParameter, clang::Member, clang::ObjCCatch, clang::ObjCParameter, clang::ObjCResult, clang::Prototype, clang::RequiresExpr, clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_typedef, clang::SelectionInit, clang::TemplateArg, clang::TemplateParam, clang::TemplateTypeArg, clang::TrailingReturn, clang::TrailingReturnVar, and clang::TypeName.
|
inline |
Return true if the context permits a C++17 decomposition declarator.
Definition at line 2311 of file DeclSpec.h.
References clang::AliasDecl, clang::AliasTemplate, clang::Association, clang::Block, clang::BlockLiteral, clang::Condition, clang::ConversionId, clang::CXXCatch, clang::CXXNew, clang::File, clang::ForInit, clang::FunctionalCast, clang::KNRTypeList, clang::LambdaExpr, clang::LambdaExprParameter, clang::Member, clang::ObjCCatch, clang::ObjCParameter, clang::ObjCResult, clang::Prototype, clang::RequiresExpr, clang::SelectionInit, clang::TemplateArg, clang::TemplateParam, clang::TemplateTypeArg, clang::TrailingReturn, clang::TrailingReturnVar, and clang::TypeName.
Referenced by clang::Sema::ActOnDecompositionDeclarator().
|
inline |
mayHaveIdentifier - Return true if the identifier is either optional or required.
This is true for normal declarators and prototypes, but not typenames.
Definition at line 2273 of file DeclSpec.h.
References clang::AliasDecl, clang::AliasTemplate, clang::Association, clang::Block, clang::BlockLiteral, clang::Condition, clang::ConversionId, clang::CXXCatch, clang::CXXNew, clang::File, clang::ForInit, clang::FunctionalCast, clang::KNRTypeList, clang::LambdaExpr, clang::LambdaExprParameter, clang::Member, clang::ObjCCatch, clang::ObjCParameter, clang::ObjCResult, clang::Prototype, clang::RequiresExpr, clang::SelectionInit, clang::TemplateArg, clang::TemplateParam, clang::TemplateTypeArg, clang::TrailingReturn, clang::TrailingReturnVar, and clang::TypeName.
|
inline |
mayOmitIdentifier - Return true if the identifier is either optional or not allowed.
This is true for typenames, prototypes, and template parameter lists.
Definition at line 2233 of file DeclSpec.h.
References clang::AliasDecl, clang::AliasTemplate, clang::Association, clang::Block, clang::BlockLiteral, clang::Condition, clang::ConversionId, clang::CXXCatch, clang::CXXNew, clang::File, clang::ForInit, clang::FunctionalCast, clang::KNRTypeList, clang::LambdaExpr, clang::LambdaExprParameter, clang::Member, clang::ObjCCatch, clang::ObjCParameter, clang::ObjCResult, clang::Prototype, clang::RequiresExpr, clang::SelectionInit, clang::TemplateArg, clang::TemplateParam, clang::TemplateTypeArg, clang::TrailingReturn, clang::TrailingReturnVar, and clang::TypeName.
|
inline |
Definition at line 2809 of file DeclSpec.h.
|
inline |
Definition at line 2831 of file DeclSpec.h.
| void Declarator::setDecompositionBindings | ( | SourceLocation | LSquareLoc, |
| MutableArrayRef< DecompositionDeclarator::Binding > | Bindings, | ||
| SourceLocation | RSquareLoc ) |
Set the decomposition bindings for this declarator.
Definition at line 265 of file DeclSpec.cpp.
References hasName(), InlineBindings, and SetIdentifier().
|
inline |
Definition at line 2835 of file DeclSpec.h.
Referenced by GetFullTypeForDeclarator().
Definition at line 2812 of file DeclSpec.h.
|
inline |
Definition at line 2841 of file DeclSpec.h.
Referenced by clang::Sema::ActOnDeclarator(), clang::Sema::ActOnStartOfFunctionDef(), and clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope().
|
inline |
Definition at line 2826 of file DeclSpec.h.
Definition at line 2853 of file DeclSpec.h.
|
inline |
Set the name of this declarator to be the given identifier.
Definition at line 2439 of file DeclSpec.h.
Referenced by clang::Sema::ActOnCXXForRangeIdentifier(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnFinishKNRParamDeclarations(), clang::Sema::ActOnParamDeclarator(), clang::SemaOpenMP::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(), DiagnoseInvalidRedeclaration(), clang::Sema::ImplicitlyDefineFunction(), and setDecompositionBindings().
Definition at line 2821 of file DeclSpec.h.
Referenced by clang::Sema::ActOnDecompositionDeclarator(), clang::Sema::ActOnFunctionDeclarator(), clang::SemaObjC::ActOnIvar(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), checkIsValidOpenCLKernelParameter(), checkMethodTypeQualifiers(), ConvertDeclSpecToType(), CreateNewFunctionDecl(), diagnoseInvalidDeclaratorChunks(), GetDeclSpecTypeForDeclarator(), GetFullTypeForDeclarator(), getFunctionStorageClass(), clang::Sema::HandleDeclarator(), clang::Sema::HandleField(), and clang::Sema::HandleMSProperty().
|
inline |
Sets the template parameter list generated from the explicit template parameters along with any invented template parameters from placeholder-typed parameters.
Definition at line 2759 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFinishFunctionDeclarationDeclarator().
Definition at line 2815 of file DeclSpec.h.
Definition at line 2818 of file DeclSpec.h.
Referenced by clang::SemaObjC::ActOnProperty().
|
inline |
Definition at line 2839 of file DeclSpec.h.
|
inline |
SetRangeBegin - Set the start of the source range to Loc, unless it's invalid.
Definition at line 2188 of file DeclSpec.h.
References clang::SourceLocation::isInvalid().
|
inline |
SetRangeEnd - Set the end of the source range to Loc, unless it's invalid.
Definition at line 2193 of file DeclSpec.h.
References clang::SourceLocation::isInvalid().
Referenced by AddTypeInfo(), AddTypeInfo(), setTrailingRequiresClause(), and takeAttributesAppending().
|
inline |
Definition at line 2872 of file DeclSpec.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnTypedefDeclarator(), clang::Sema::ActOnVariableDeclarator(), and DiagnoseInvalidRedeclaration().
|
inline |
Definition at line 2185 of file DeclSpec.h.
|
inline |
Sets the template parameter lists that preceded the declarator.
Definition at line 2747 of file DeclSpec.h.
|
inline |
Sets a trailing requires clause for this declarator.
Definition at line 2729 of file DeclSpec.h.
References clang::Stmt::getEndLoc(), and SetRangeEnd().
|
inline |
takeAttributesAppending - Takes attributes from the given ParsedAttributes 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.
Definition at line 2779 of file DeclSpec.h.
References clang::SourceRange::getEnd(), clang::SourceLocation::isValid(), clang::ParsedAttributesView::Range, and SetRangeEnd().
Referenced by clang::Sema::ActOnCXXForRangeIdentifier().
|
inline |
Returns the range of type objects, from the identifier outwards.
Definition at line 2514 of file DeclSpec.h.
Referenced by clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), GetFullTypeForDeclarator(), getTrailingReturnType(), hasTrailingReturnType(), and warnAboutRedundantParens().
|
friend |
Definition at line 2101 of file DeclSpec.h.
References DeclaratorChunk.
Referenced by AddInnermostTypeInfo(), AddTypeInfo(), AddTypeInfo(), AddTypeInfo(), DeclaratorChunk, getInnermostNonParenChunk(), getOutermostNonParenChunk(), getTypeObject(), getTypeObject(), and isArrayOfUnknownBound().
| DecompositionDeclarator::Binding clang::Declarator::InlineBindings[16] |
Definition at line 2086 of file DeclSpec.h.
Referenced by setDecompositionBindings().
| DeclaratorChunk::ParamInfo clang::Declarator::InlineParams[16] |
InlineParams - This is a local array used for the first function decl chunk to avoid going to the heap for the common case when we have one function chunk in the declarator.
Definition at line 2085 of file DeclSpec.h.
Referenced by clang::DeclaratorChunk::getFunction().