Don't gratuitously mark the default constructors of base or member initializers as used

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88847 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp
index ec87176..4318601 100644
--- a/test/SemaCXX/constructor-initializer.cpp
+++ b/test/SemaCXX/constructor-initializer.cpp
@@ -158,3 +158,18 @@
         B(B),  // expected-warning {{field is uninitialized when used here}}
         C(rhs.C || C) { }  // expected-warning {{field is uninitialized when used here}}
 };
+
+// Make sure we aren't marking default constructors when we shouldn't be.
+template<typename T>
+struct NDC {
+  T &ref;
+  
+  NDC() { }
+  NDC(T &ref) : ref(ref) { }
+};
+  
+struct X0 : NDC<int> {
+  X0(int &ref) : NDC<int>(ref), ndc(ref) { }
+  
+  NDC<int> ndc;
+};