c.opt
64.6 KB
-
PR c++/87029, Implement -Wredundant-move. · b5be6d0c
* c.opt (Wredundant-move): New option. * typeck.c (treat_lvalue_as_rvalue_p): New function. (maybe_warn_pessimizing_move): Call convert_from_reference. Warn about redundant moves. * doc/invoke.texi: Document -Wredundant-move. * g++.dg/cpp0x/Wredundant-move1.C: New test. * g++.dg/cpp0x/Wredundant-move2.C: New test. * g++.dg/cpp0x/Wredundant-move3.C: New test. * g++.dg/cpp0x/Wredundant-move4.C: New test. From-SVN: r263863
Marek Polacek committed