PR c++/80452 - Core 1579, implicit move semantics on return/throw
commitff00c6744b9c024891c5406eac4f5665fa3fe2c7
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Aug 2017 19:07:30 +0000 (10 19:07 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Aug 2017 19:07:30 +0000 (10 19:07 +0000)
tree35dee6c3dcd6215feee0eca6d281f1e78ffc2975
parent6b90c65631eae77e26b7f88e79c510bcb9a1d450
PR c++/80452 - Core 1579, implicit move semantics on return/throw

* cp-tree.h (LOOKUP_PREFER_RVALUE): Now means that we've already
tentatively changed the lvalue to an rvalue.
* call.c (reference_binding): Remove LOOKUP_PREFER_RVALUE handling.
(build_over_call): If LOOKUP_PREFER_RVALUE, check that the first
parameter is an rvalue reference.
* except.c (build_throw): Do maybe-rvalue overload resolution twice.
* typeck.c (check_return_expr): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251035 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/except.c
gcc/cp/typeck.c
gcc/testsuite/g++.dg/cpp0x/move-return1.C [new file with mode: 0644]