diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-10-24 20:28:18 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-10-24 20:28:18 +0000 |
commit | 9dd686d2be3c3785a089ff12a3d3eb64e9b32dc0 (patch) | |
tree | 8068e9fb4e7d41536901bfb3ac5768acb815bcf1 /test/SemaCXX/lambda-expressions.cpp | |
parent | a45451d0959501c7d82582c61571a29cfdacdb0b (diff) |
Update regression tests for r166617.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/lambda-expressions.cpp')
-rw-r--r-- | test/SemaCXX/lambda-expressions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/lambda-expressions.cpp b/test/SemaCXX/lambda-expressions.cpp index 0630aedf77..6f92373a69 100644 --- a/test/SemaCXX/lambda-expressions.cpp +++ b/test/SemaCXX/lambda-expressions.cpp @@ -77,8 +77,8 @@ namespace ImplicitCapture { struct G { G(); G(G&); int a; }; // expected-note 6 {{not viable}} G g; [=]() { const G* gg = &g; return gg->a; }; - [=]() { return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error {{no matching constructor for initialization of 'ImplicitCapture::G'}} - (void)^{ return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error 2 {{no matching constructor for initialization of 'const ImplicitCapture::G'}} + [=]() { return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error {{no matching constructor for initialization of 'G'}} + (void)^{ return [=]{ const G* gg = &g; return gg->a; }(); }; // expected-error 2 {{no matching constructor for initialization of 'const G'}} const int h = a; // expected-note {{declared}} []() { return h; }; // expected-error {{variable 'h' cannot be implicitly captured in a lambda with no capture-default specified}} expected-note {{lambda expression begins here}} |