Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95223 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 7c52df5..1f1e76c 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -3304,31 +3304,16 @@
// Check exception specifications
if (S.CheckExceptionSpecCompatibility(CurInitExpr, DestType))
return S.ExprError();
-
- // FIXME: We should do this for all types.
- if (DestType->isAnyComplexType()) {
- CurInit =
- S.Owned(CXXBindReferenceExpr::Create(S.Context,
- CurInit.takeAs<Expr>(),
- /*ExtendsLifetime=*/false,
- /*RequiresTemporaryCopy=*/false));
- }
break;
case SK_BindReferenceToTemporary:
+ // Reference binding does not have any corresponding ASTs.
+
// Check exception specifications
if (S.CheckExceptionSpecCompatibility(CurInitExpr, DestType))
return S.ExprError();
- // FIXME: We should do this for all types.
- if (DestType->isAnyComplexType()) {
- CurInit =
- S.Owned(CXXBindReferenceExpr::Create(S.Context,
- CurInit.takeAs<Expr>(),
- /*ExtendsLifetime=*/false,
- /*RequiresTemporaryCopy=*/true));
- }
break;
case SK_UserConversion: {