Add implicitly-declared default and copy constructors to C++ classes,
when appropriate.
Conversions for class types now make use of copy constructors. I've
replaced the egregious hack allowing class-to-class conversions with a
slightly less egregious hack calling these conversions standard
conversions (for overloading reasons).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58622 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index d4d4f39..99b0829 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -982,6 +982,13 @@
ImpCastExprToType(From, FromType);
break;
+ case ICK_Derived_To_Base:
+ // FIXME: This should never happen. It's a consequence of
+ // pretending that a user-defined conversion via copy constructor
+ // is actually a standard conversion.
+ ImpCastExprToType(From, ToType);
+ break;
+
default:
assert(false && "Improper second standard conversion");
break;