PR c++/83160] local ref to capture
commitbc97e2310354da81124800dfb4e3203f90a24398
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2018 11:53:50 +0000 (18 11:53 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2018 11:53:50 +0000 (18 11:53 +0000)
tree3046a3abdcbe7ee5a733086c11fc73ee9929a57c
parent1290f09357aa0d183bd8337a14a8e7c11bc7546a
PR c++/83160] local ref to capture

https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01638.html
PR c++/83160
* cp-tree.h (mark_use): Declare.
* expr.c (mark_use): Make extern.
* call.c (direct_reference_binding): Set inner conv's
rvaluedness_matches_p, if it is an identity.
(convert_like_real): Mark lvalue or rvalue use for identity as
rvaledness_matches_p demands.

PR c++/83160
* g++.dg/cpp0x/pr83160.C: New.

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