summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/DeclCXX.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-08-14 23:15:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-08-14 23:15:52 +0000
commit72a2930a202d56bcec209eef295f5922da1de899 (patch)
tree88280e49d427d120ade65eacfd26c4389ccce29a /include/clang/AST/DeclCXX.h
parentac8b5158fc9da0965dc513e488e7ca44b1518077 (diff)
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
Diffstat (limited to 'include/clang/AST/DeclCXX.h')
-rw-r--r--include/clang/AST/DeclCXX.h4
1 files changed, 4 insertions, 0 deletions
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).