diff options
Diffstat (limited to 'test/CXX/expr/expr.prim/expr.prim.lambda')
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp | 4 | ||||
-rw-r--r-- | test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp index 551c100ff7af3..7fc86e8109270 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp @@ -15,8 +15,8 @@ public: void capture_by_copy(NonCopyable nc, NonCopyable &ncr, const NonConstCopy nco) { (void)[nc] { }; // expected-error{{capture of variable 'nc' as type 'NonCopyable' calls private copy constructor}} - (void)[=] { - ncr.foo(); // expected-error{{capture of variable 'ncr' as type 'NonCopyable' calls private copy constructor}} + (void)[=] { // expected-error{{capture of variable 'ncr' as type 'NonCopyable' calls private copy constructor}} + ncr.foo(); }(); [nco] {}(); // expected-error{{no matching constructor for initialization of 'const NonConstCopy'}} diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp index 31213c9ebc334..2bb75df7ac6aa 100644 --- a/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp +++ b/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp @@ -88,8 +88,8 @@ namespace p2 { template<typename R, typename T> void odr_used2(R &r, Boom<T> boom) { const std::type_info &ti - = typeid([=,&r] () -> R& { - boom.tickle(); // expected-note{{in instantiation of member function}} + = typeid([=,&r] () -> R& { // expected-note{{in instantiation of member function 'p2::Boom<float>::Boom' requested here}} + boom.tickle(); return r; }()); } @@ -139,11 +139,11 @@ namespace NonLocalLambdaInstantation { } template<typename T> - struct X2 { + struct X2 { // expected-note{{in instantiation of default member initializer 'NonLocalLambdaInstantation::X2<int *>::x'}} int x = []{ return T(); }(); // expected-error{{cannot initialize a member subobject of type 'int' with an rvalue of type 'int *'}} }; X2<int> x2i; X2<float> x2f; - X2<int*> x2ip; // expected-note{{in instantiation of default member initializer 'NonLocalLambdaInstantation::X2<int *>::x'}} + X2<int*> x2ip; // expected-note {{in evaluation of exception spec}} } |