When we encounter a derived-to-base conversion when performing an
implicit conversion sequence, check the validity of this conversion
and then perform it.

llvm-svn: 86210
diff --git a/clang/test/SemaCXX/overload-call.cpp b/clang/test/SemaCXX/overload-call.cpp
index 94f352e..3a0bf30 100644
--- a/clang/test/SemaCXX/overload-call.cpp
+++ b/clang/test/SemaCXX/overload-call.cpp
@@ -278,3 +278,16 @@
 void db_rebind_test(Z2 z2) {
   float& f1 = db_rebind(z2);
 }
+
+class string { };
+class opt : public string { };
+
+struct SR {
+  SR(const string&);
+};
+
+void f(SR) { }
+
+void g(opt o) {
+  f(o);
+}