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 /test/CXX/expr/expr.prim/expr.prim.lambda/blocks.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 'test/CXX/expr/expr.prim/expr.prim.lambda/blocks.cpp')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/blocks.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.cpp index faf686d111..2ed738d3fd 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.cpp @@ -5,7 +5,6 @@ void block_capture_errors() { (void)[var] { }; // expected-error{{__block variable 'var' cannot be captured in a lambda}} \ // expected-error{{lambda expressions are not supported yet}} - // FIXME: this should produce the same error as above - (void)[=] { var = 17; }; // expected-error{{reference to local variable 'var' declared in enclosed function 'block_capture_errors'}} \ + (void)[=] { var = 17; }; // expected-error{{__block variable 'var' cannot be captured in a lambda}} \ // expected-error{{lambda expressions are not supported yet}} } |