diff --git a/test/CodeGenCXX/rvalue-references.cpp b/test/CodeGenCXX/rvalue-references.cpp index f8e3eb29dd..5300d36800 100644 --- a/test/CodeGenCXX/rvalue-references.cpp +++ b/test/CodeGenCXX/rvalue-references.cpp @@ -101,3 +101,11 @@ namespace test1 { // CHECK-NEXT: ret void B::B(int i) : a(move(i)) {} } + +// PR11009 +struct MoveConvertible { + operator int&& () const; +}; +void moveConstruct() { + (void)(int)MoveConvertible(); +} diff --git a/test/SemaCXX/rval-references.cpp b/test/SemaCXX/rval-references.cpp index 38b45a530f..74afdbe410 100644 --- a/test/SemaCXX/rval-references.cpp +++ b/test/SemaCXX/rval-references.cpp @@ -92,11 +92,3 @@ MoveOnly returningNonEligible() { else // Construction from different type can't be elided return i; // expected-error {{no viable conversion from 'int' to 'MoveOnly'}} } - -// PR11009 -struct MoveConvertible { - operator int&& () const; -}; -void moveConstruct() { - (void)(int)MoveConvertible(); -}