Now that we have copy initialization support, use it for checking the default arguments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58692 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/default1.cpp b/test/SemaCXX/default1.cpp
index fe019c8..3acf119 100644
--- a/test/SemaCXX/default1.cpp
+++ b/test/SemaCXX/default1.cpp
@@ -15,3 +15,15 @@
struct S { } s;
void i(int = s) { } // expected-error {{incompatible type}}
+
+struct X {
+ X(int);
+};
+
+void j(X x = 17);
+
+struct Y {
+ explicit Y(int);
+};
+
+void k(Y y = 17); // expected-error{{incompatible type in default argument}}