diff options
Diffstat (limited to 'clang/test/SemaCXX/default2.cpp')
-rw-r--r-- | clang/test/SemaCXX/default2.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/default2.cpp b/clang/test/SemaCXX/default2.cpp index 863ac0e25fd..c2873af3f08 100644 --- a/clang/test/SemaCXX/default2.cpp +++ b/clang/test/SemaCXX/default2.cpp @@ -103,8 +103,20 @@ public: Z z2; // expected-error{{no matching constructor for initialization}} Z z3(z); } + + void test_Z(const Z& z) { + Z z2(z); // expected-error{{no matching constructor for initialization of 'z2'}} + } }; void test_Z(const Z& z) { Z z2(z); // expected-error{{no matching constructor for initialization of 'z2'}} } + +struct ZZ { + void f(ZZ z = g()); // expected-error{{no matching constructor for initialization}} + + static ZZ g(int = 17); + + ZZ(ZZ&, int = 17); // expected-note{{candidate function}} +}; |