summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/rval-references.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/rval-references.cpp')
-rw-r--r--clang/test/SemaCXX/rval-references.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/rval-references.cpp b/clang/test/SemaCXX/rval-references.cpp
index d3057602a08..569693a49b3 100644
--- a/clang/test/SemaCXX/rval-references.cpp
+++ b/clang/test/SemaCXX/rval-references.cpp
@@ -37,14 +37,15 @@ void f() {
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 {
OpenPOWER on IntegriCloud