r236075 - Add -Wpessimizing-move and -Wredundant-move warnings.
thakis at chromium.org
Sat May 2 11:47:23 PDT 2015
On Wed, Apr 29, 2015 at 2:41 AM, Benjamin Kramer <benny.kra at gmail.com>
> On Wed, Apr 29, 2015 at 5:59 AM, Richard Trieu <rtrieu at google.com> wrote:
> > Since this warning did not exist when std::move was first introduced, and
> > many people are not familiar with copy elision rules, there have been a
> > of uses of the pessimizing move pattern. In relative numbers, the
> > pessimizing move warning is over 5x more common than either the range
> > warning (-Wrange-loop-analysis) or the proposed comma warning (-Wcomma).
> > With such a high occurrence, it seemed better not to have it on by
> And every single occurence is a potential performance issue and easy
> to fix. While this may be too noisy for default, it's definitely a
> candidate for -Wall imho.
+1. As-is, nobody will find this warning. And in general, the bar for
warnings is "useful enough to be in -Wall, or it shouldn't be there",
right? (Which this warning definitely is.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits