[PATCH] D70390: [clang-tidy] new performance-no-automatic-move check.

Clement Courbet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 20 00:09:56 PST 2019


courbet added a comment.

In D70390#1751751 <https://reviews.llvm.org/D70390#1751751>, @Quuxplusone wrote:

> that sounds like a big non-local change whose correctness would be very difficult to verify.


Agreed. That's why I did not make this check suggest a fixit, because it's too easy to click "apply" without thinking.

>   I think (FWIW) that such a fixit would be a very hard sell

I've seen several places in our codebase where it did make quite a big difference performance wise, so they were quite easy to sell :)

> Nobody is currently working on that Clang patch AFAIK. If you're interested in submitting Clang patches in this area, that might be a very high-value (if kind of fuzzy/user-experience/political) patch to work on!
>  Meanwhile, as of November 2019, the C++2a committee draft still contains unfixed corner cases that Clang doesn't warn about. For example:
>  https://godbolt.org/z/fBKM-4 (no warning from Clang; C++2a fixes this behavior)
>  https://godbolt.org/z/EfBCdQ (no warning from Clang; C++2a does NOT fix this behavior)

Super interesting, thanks ! I'll see if I have time to work on that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70390/new/

https://reviews.llvm.org/D70390





More information about the cfe-commits mailing list