diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-08-28 04:28:19 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-08-28 04:28:19 +0000 |
commit | 51be7a6a028d8705b03bb4f91510e797d01a3bbc (patch) | |
tree | d1ddbf897587b4dcc3d5bcef1ec48606524ef056 /lib/Sema/SemaLambda.cpp | |
parent | 9dfdd2d2a9e511caf339340d5596f2a6ce6c97ad (diff) |
[C++11] Support for capturing of variable length arrays in lambda expression.
Differential Revision: http://reviews.llvm.org/D4368
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLambda.cpp')
-rw-r--r-- | lib/Sema/SemaLambda.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index 6793bef757..2b2b16d3bd 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/lib/Sema/SemaLambda.cpp @@ -1414,6 +1414,12 @@ ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body, /*isImplicit=*/true)); continue; } + if (From.isVLATypeCapture()) { + Captures.push_back( + LambdaCapture(From.getLocation(), IsImplicit, LCK_VLAType)); + CaptureInits.push_back(nullptr); + continue; + } VarDecl *Var = From.getVariable(); LambdaCaptureKind Kind = From.isCopyCapture()? LCK_ByCopy : LCK_ByRef; |