diff options
Diffstat (limited to 'clang/test/SemaCXX/copy-initialization.cpp')
-rw-r--r-- | clang/test/SemaCXX/copy-initialization.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/copy-initialization.cpp b/clang/test/SemaCXX/copy-initialization.cpp index d219ee508f0..4f6c65cf550 100644 --- a/clang/test/SemaCXX/copy-initialization.cpp +++ b/clang/test/SemaCXX/copy-initialization.cpp @@ -30,7 +30,7 @@ void test(const foo *P) { P->bar(); } // expected-error{{'bar' not viable: 'this namespace PR6757 { struct Foo { - Foo(); + Foo(); // expected-note{{not viable}} Foo(Foo&); // expected-note{{candidate constructor not viable}} }; @@ -71,3 +71,12 @@ namespace DR5 { const S b = 0; } } + +struct A {}; +struct B : A { + B(); + B(B&); + B(A); + B(int); +}; +B b = 0; // ok, calls B(int) then A(const A&) then B(A). |