class BindingDecl
Declaration
class BindingDecl : public ValueDecl { /* full declaration omitted */ };
Description
A binding in a decomposition declaration. For instance, given: int n[3]; auto & [a, b, c] = n; a, b, and c are BindingDecls, whose bindings are the expressions x[0], x[1], and x[2] respectively, where x is the implicit DecompositionDecl of type 'int ( & )[3]'.
Declared at: clang/include/clang/AST/DeclCXX.h:3992
Inherits from: ValueDecl
Member Variables
- private clang::ValueDecl* Decomp
- The declaration that this binding binds to part of.
- private clang::Expr* Binding = nullptr
- The binding represented by this declaration. References to this declaration are effectively equivalent to this expression (except that it is only evaluated once at the point of declaration of the binding).
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- private BindingDecl(clang::DeclContext * DC, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id)
- public static clang::BindingDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation IdLoc, clang::IdentifierInfo * Id)
- public static clang::BindingDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public clang::Expr * getBinding() const
- public clang::ValueDecl * getDecomposedDecl() const
- public clang::VarDecl * getHoldingVar() const
- public void setBinding(clang::QualType DeclaredType, clang::Expr * Binding)
- public void setDecomposedDecl(clang::ValueDecl * Decomposed)
Inherited from ValueDecl:
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶BindingDecl(clang::DeclContext* DC,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id)
BindingDecl(clang::DeclContext* DC,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id)
Declared at: clang/include/clang/AST/DeclCXX.h:4001
Parameters
¶static clang::BindingDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id)
static clang::BindingDecl* Create(
clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation IdLoc,
clang::IdentifierInfo* Id)
Declared at: clang/include/clang/AST/DeclCXX.h:4009
Parameters
¶static clang::BindingDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
static clang::BindingDecl* CreateDeserialized(
clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/DeclCXX.h:4011
Parameters
- clang::ASTContext& C
- unsigned int ID
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/DeclCXX.h:4004
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclCXX.h:4037
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/DeclCXX.h:4038
Parameters
- clang::Decl::Kind K
¶clang::Expr* getBinding() const
clang::Expr* getBinding() const
Description
Get the expression to which this declaration is bound. This may be null in two different cases: while parsing the initializer for the decomposition declaration, and when the initializer is type-dependent.
Declared at: clang/include/clang/AST/DeclCXX.h:4016
¶clang::ValueDecl* getDecomposedDecl() const
clang::ValueDecl* getDecomposedDecl() const
Description
Get the decomposition declaration that this binding represents a decomposition of.
Declared at: clang/include/clang/AST/DeclCXX.h:4020
¶clang::VarDecl* getHoldingVar() const
clang::VarDecl* getHoldingVar() const
Description
Get the variable (if any) that holds the value of evaluating the binding. Only present for user-defined bindings for tuple-like types.
Declared at: clang/include/clang/AST/DeclCXX.h:4024
¶void setBinding(clang::QualType DeclaredType,
clang::Expr* Binding)
void setBinding(clang::QualType DeclaredType,
clang::Expr* Binding)
Description
Set the binding for this BindingDecl, along with its declared type (which should be a possibly-cv-qualified form of the type of the binding, or a reference to such a type).
Declared at: clang/include/clang/AST/DeclCXX.h:4029
Parameters
- clang::QualType DeclaredType
- clang::Expr* Binding
¶void setDecomposedDecl(
clang::ValueDecl* Decomposed)
void setDecomposedDecl(
clang::ValueDecl* Decomposed)
Description
Set the decomposed variable for this BindingDecl.
Declared at: clang/include/clang/AST/DeclCXX.h:4035
Parameters
- clang::ValueDecl* Decomposed