diff options
Diffstat (limited to 'test/SemaCXX/convert-to-bool.cpp')
-rw-r--r-- | test/SemaCXX/convert-to-bool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/SemaCXX/convert-to-bool.cpp b/test/SemaCXX/convert-to-bool.cpp index 937b272..277bfc6 100644 --- a/test/SemaCXX/convert-to-bool.cpp +++ b/test/SemaCXX/convert-to-bool.cpp @@ -49,7 +49,7 @@ void test_explicit_bool(ExplicitConvToBool ecb) { } void test_explicit_conv_to_ref(ExplicitConvToRef ecr) { - int& i1 = ecr; // expected-error{{non-const lvalue reference to type 'int' cannot be initialized with a value of type 'struct ExplicitConvToRef'}} + int& i1 = ecr; // expected-error{{non-const lvalue reference to type 'int' cannot bind to a value of unrelated type 'struct ExplicitConvToRef'}} int& i2(ecr); // okay } @@ -57,11 +57,11 @@ struct A { }; struct B { }; struct C { explicit operator A&(); // expected-warning{{explicit conversion functions are a C++0x extension}} - operator B&(); + operator B&(); // expected-note{{candidate}} }; void test_copy_init_conversions(C c) { - A &a = c; // expected-error{{non-const lvalue reference to type 'struct A' cannot be initialized with a value of type 'struct C'}} + A &a = c; // expected-error{{no viable conversion from 'struct C' to 'struct A'}} B &b = b; // okay } |