]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/86982, -Wreturn-local-addr and std::move and std::forward.
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Sep 2018 00:38:13 +0000 (00:38 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 6 Sep 2018 00:38:13 +0000 (00:38 +0000)
commitd66aa2617fa5fe3c0fa2feb21e3064925a57158b
tree8c35a937933ae3e55c78546616653aa06d11b0e0
parent5640bf9559a6b174720ebcb0c8b8369bfd9b4906
PR c++/86982, -Wreturn-local-addr and std::move and std::forward.
* typeck.c (maybe_warn_about_returning_address_of_local): Handle calls
to std::move or std::forward.
(is_std_forward_p): New function.

* g++.dg/warn/Wreturn-local-addr-5.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264139 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wreturn-local-addr-5.C [new file with mode: 0644]