Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 5450d19..b3d94c3 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -764,7 +764,7 @@
// the constructor or conversion operator, and then cope with the
// standard conversions.
ImpCastExprToType(From, ToType.getNonReferenceType(),
- ToType->isReferenceType());
+ ToType->isLValueReferenceType());
return false;
case ImplicitConversionSequence::EllipsisConversion:
@@ -800,7 +800,7 @@
// FIXME: Create a temporary object by calling the copy
// constructor.
ImpCastExprToType(From, ToType.getNonReferenceType(),
- ToType->isReferenceType());
+ ToType->isLValueReferenceType());
return false;
}
@@ -893,8 +893,10 @@
break;
case ICK_Qualification:
+ // FIXME: Not sure about lvalue vs rvalue here in the presence of
+ // rvalue references.
ImpCastExprToType(From, ToType.getNonReferenceType(),
- ToType->isReferenceType());
+ ToType->isLValueReferenceType());
break;
default: