[PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 29 02:29:15 PDT 2016
malcolm.parsons added a comment.
The modernize-pass-by-value check does the same thing:
test/clang-tidy/misc-move-constructor-init.cpp:98:12: warning: pass by value and use std::move [modernize-pass-by-value]
Positive(Movable M) : M_(M) {}
^
std::move( )
test/clang-tidy/misc-move-constructor-init.cpp:98:28: warning: value argument 'M' can be moved to avoid copy [misc-move-constructor-init]
Positive(Movable M) : M_(M) {}
^
Do we need two checks for this?
https://reviews.llvm.org/D12839
More information about the cfe-commits
mailing list