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
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 1ff6f59..3dd271b 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -5051,7 +5051,8 @@
// 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();