[PATCH] D74692: [clang-tidy][bugprone-use-after-move] Warn on std::move for consts

Zinovy Nis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 15 03:11:18 PDT 2020


zinovy.nis added a comment.

In D74692#1923191 <https://reviews.llvm.org/D74692#1923191>, @Quuxplusone wrote:

> I still think this entire patch is misguided; there's no reason to make the note for `const std::string s; std::move(s)` any longer than the note for `int i; std::move(i)` or `volatile std::string v; std::move(v)`. People should not be using moved-from objects, period; and those who want to use moved-from objects, should not enable this clang-tidy check.
>
> However, I have no further comments //besides// philosophical opposition to the whole idea.


By this patch I'd like to provide more helpful info to the user on why the code is wrong.
Anyway I don't like submit this patch if you still have objections.


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

https://reviews.llvm.org/D74692





More information about the cfe-commits mailing list