diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-03 22:47:37 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-03 22:47:37 +0000 |
commit | b942cb24a060435b18fef5b43eb33d77afc0d03a (patch) | |
tree | f4284905fbe1487823a4583271eba4de1201b55e /lib/Sema/SemaExprCXX.cpp | |
parent | 285c6070cba54ab9bb1d3bacdc2028498a83baef (diff) |
Implement implicit capture for lambda expressions.
Still left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 1ff6f59bae..3dd271bb8a 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -5051,7 +5051,8 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, // the variable. // FIXME: Unify with normal capture path, so we get all of the necessary // nested captures. - LSI->AddCapture(Var, C->Kind == LCK_ByRef, /*isNested=*/false, C->Loc, 0); + LSI->AddCapture(Var, /*isBlock*/false, C->Kind == LCK_ByRef, + /*isNested=*/false, C->Loc, 0); } LSI->finishedExplicitCaptures(); |