Reintroduce r67870 (rval ref overloading), since I can't reproduce any test failures on i386 or x86_64. If this fails for someone, please contact me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67999 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/rval-references.cpp b/test/SemaCXX/rval-references.cpp
index d305760..569693a 100644
--- a/test/SemaCXX/rval-references.cpp
+++ b/test/SemaCXX/rval-references.cpp
@@ -37,14 +37,15 @@
not_int ni2 = over(ret_irr());
int i4 = over2(i1);
- // not_int ni3 = over2(0); FIXME: this should be well-formed.
+ not_int ni3 = over2(0);
ilr_c1 vilr1 = i1;
ilr_c2 vilr2 = i1;
conv_to_not_int_rvalue cnir;
- not_int &&ni4 = cnir;
+ not_int &&ni4 = cnir; // expected-error {{rvalue reference cannot bind to lvalue}}
not_int &ni5 = cnir; // expected-error{{non-const lvalue reference to type 'struct not_int' cannot be initialized with a value of type 'struct conv_to_not_int_rvalue'}}
+ not_int &&ni6 = conv_to_not_int_rvalue();
try {