PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.
authorMarek Polacek <polacek@redhat.com>
Fri, 11 Jan 2019 23:21:40 +0000 (23:21 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 11 Jan 2019 23:21:40 +0000 (23:21 +0000)
commit1439f35553a8aaa034deda26b4072bdec4af8f79
tree0118cad4ed344b3d30e541633c945294301995f5
parent378b9abe569d030bbe33f74a55b55519da9bf4bb
PR c++/88692, c++/87882 - -Wredundant-move false positive with *this.

* typeck.c (maybe_warn_pessimizing_move): Return if ARG isn't
ADDR_EXPR.

* g++.dg/cpp0x/Wredundant-move5.C: New test.
* g++.dg/cpp0x/Wredundant-move6.C: New test.

From-SVN: r267862
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/Wredundant-move5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/Wredundant-move6.C [new file with mode: 0644]