If a non-dependent base class initializer fails to match any direct or
virtual base class, but the class still has dependent base classes,
then don't diagnose the failed match as an error: the right base class
might magically appear. Fixes PR7259.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106103 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/class-template-ctor-initializer.cpp b/test/SemaTemplate/class-template-ctor-initializer.cpp
index fd9417c..81a5e2b 100644
--- a/test/SemaTemplate/class-template-ctor-initializer.cpp
+++ b/test/SemaTemplate/class-template-ctor-initializer.cpp
@@ -31,3 +31,25 @@
             TmplB<char>() {}
 };
 
+namespace PR7259 {
+  class Base {
+  public:
+    Base() {}
+  };
+
+  template <class ParentClass>
+  class Derived : public ParentClass {
+  public:
+    Derived() : Base() {}
+  };
+
+  class Final : public Derived<Base> {
+  };
+
+  int
+  main (void)
+  {
+    Final final();
+    return 0;
+  }
+}