Patch for code gen. for c-style cast which ends in
using class's conversion functions [12.3.2-p2]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80433 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index fe67ec6..16e83e6 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -939,6 +939,7 @@
OwningExprResult InitResult =
BuildCXXConstructExpr(ToType.getNonReferenceType(),
CD, &From, 1);
+ // Take ownership of this expression.
From = InitResult.takeAs<Expr>();
CastKind = CastExpr::CK_ConstructorConversion ;
}