When we're type-checking the result of calling a conversion function
(while computing user conversion sequences), make sure that a result
of class type is a complete class type. Had we gone through
ActOnCallExpr, this would have happened when we built the CallExpr.

Fixes PR8425.

llvm-svn: 119005
diff --git a/clang/test/SemaTemplate/instantiate-complete.cpp b/clang/test/SemaTemplate/instantiate-complete.cpp
index 91d4d32..4b27da7 100644
--- a/clang/test/SemaTemplate/instantiate-complete.cpp
+++ b/clang/test/SemaTemplate/instantiate-complete.cpp
@@ -126,3 +126,23 @@
 
   template class B<int>; // expected-note {{in instantiation}}
 }
+
+namespace PR8425 {
+  template <typename T>
+  class BaseT {};
+
+  template <typename T>
+  class DerivedT : public BaseT<T> {};
+
+  template <typename T>
+  class FromT {
+  public:
+    operator DerivedT<T>() const { return DerivedT<T>(); }
+  };
+
+  void test() {
+    FromT<int> ft;
+    BaseT<int> bt(ft);
+  }
+}
+