summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/cast-conversion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/cast-conversion.cpp')
-rw-r--r--test/SemaCXX/cast-conversion.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/SemaCXX/cast-conversion.cpp b/test/SemaCXX/cast-conversion.cpp
index d68e789..80707d1 100644
--- a/test/SemaCXX/cast-conversion.cpp
+++ b/test/SemaCXX/cast-conversion.cpp
@@ -8,14 +8,14 @@ struct A {
A(R);
};
-struct B {
- B(A);
+struct B { // expected-note 3 {{candidate constructor (the implicit copy constructor) not viable}}
+ B(A); // expected-note 3 {{candidate constructor not viable}}
};
int main () {
- B(10); // expected-error {{functional-style cast from 'int' to 'B' is not allowed}}
- (B)10; // expected-error {{C-style cast from 'int' to 'B' is not allowed}}
- static_cast<B>(10); // expected-error {{static_cast from 'int' to 'B' is not allowed}} \\
+ B(10); // expected-error {{no matching conversion for functional-style cast from 'int' to 'B'}}
+ (B)10; // expected-error {{no matching conversion for C-style cast from 'int' to 'B'}}
+ static_cast<B>(10); // expected-error {{no matching conversion for static_cast from 'int' to 'B'}} \\
// expected-warning {{expression result unused}}
}
OpenPOWER on IntegriCloud