Diagnose when base classes and members to be intialized
with constructors don't have a matching constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76913 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp
index 66a5f57..71d38a1 100644
--- a/test/SemaCXX/constructor-initializer.cpp
+++ b/test/SemaCXX/constructor-initializer.cpp
@@ -96,3 +96,23 @@
                            INT::NonExisting()  {} // expected-error {{expected a class or namespace}} \
 						  // expected-error {{member initializer 'NonExisting' does not name a non-static data member or}}
 };
+
+                        // FIXME. This is bad message!
+struct M { 		// expected-note {{candidate function}}	\
+                        // expected-note {{candidate function}}
+  M(int i, int j);	// expected-note {{candidate function}} \
+			// // expected-note {{candidate function}}
+};
+
+struct N : M  {
+  N() : M(1), 	// expected-error {{no matching constructor for initialization of 'M'}}
+        m1(100) {  } // expected-error {{no matching constructor for initialization of 'm1'}}
+  M m1;
+};
+
+struct P : M  { // expected-error {{default constructor for 'struct M' is missing in initialization of base class}}
+  P()  {  }
+  M m; // expected-error {{default constructor for 'struct M' is missing in initialization of mamber}}
+};
+
+