diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-14 19:27:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-14 19:27:52 +0000 |
commit | a73652465bcc4c0f6cb7d933ad84e002b527a643 (patch) | |
tree | 04ea4a96da25afda7a6dc6353d0ad0bbee083894 /lib/Sema/SemaExpr.cpp | |
parent | 63aae82bb12bbbe9028e597fb77e40fa8d348c12 (diff) |
Implement support for lambda capture pack expansions, e.g.,
[&values...] { print(values...); }
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 4dc8a7bedd..371a4e39eb 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -9831,7 +9831,7 @@ bool Sema::canCaptureVariable(VarDecl *Var, SourceLocation Loc, bool Explicit, // Check if the variable needs to be captured; if so, try to perform // the capture. void Sema::TryCaptureVar(VarDecl *var, SourceLocation loc, - TryCaptureKind Kind) { + TryCaptureKind Kind, SourceLocation EllipsisLoc) { QualType type; unsigned functionScopesIndex; bool Nested; @@ -9909,7 +9909,8 @@ void Sema::TryCaptureVar(VarDecl *var, SourceLocation loc, } } - CSI->AddCapture(var, hasBlocksAttr, byRef, Nested, loc, copyExpr); + CSI->AddCapture(var, hasBlocksAttr, byRef, Nested, loc, EllipsisLoc, + copyExpr); Nested = true; if (shouldAddConstForScope(CSI, var)) |