From 72a2930a202d56bcec209eef295f5922da1de899 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sun, 14 Aug 2016 23:15:52 +0000 Subject: Explicitly generate a reference variable to hold the initializer for a tuple-like decomposition declaration. This significantly simplifies the semantics of BindingDecls for AST consumers (they can now always be evalated at the point of use). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278640 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/DeclCXX.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/clang/AST/DeclCXX.h') diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 5a692e97ce..2071c1b0e1 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -3404,6 +3404,10 @@ public: /// decomposition declaration, and when the initializer is type-dependent. Expr *getBinding() const { return Binding; } + /// Get the variable (if any) that holds the value of evaluating the binding. + /// Only present for user-defined bindings for tuple-like types. + VarDecl *getHoldingVar() const; + /// 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). -- cgit v1.2.3