summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/cast-conversion.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerdim <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commit39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/SemaCXX/cast-conversion.cpp
parent69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff)
downloadFreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip
FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
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