[PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 11:10:12 PDT 2016


aaron.ballman added inline comments.

================
Comment at: test/clang-tidy/misc-move-const-arg.cpp:75-76
@@ +74,4 @@
+
+struct NonMoveable {
+ public:
+  NonMoveable();
----------------
This type isn't non-moveable. For that, you need to explicitly delete the move constructor. Perhaps a better name is `NonMoveConstructible`?

Also, no need for the `public` access specifier.

================
Comment at: test/clang-tidy/misc-move-const-arg.cpp:116
@@ +115,3 @@
+struct Moveable {
+ public:
+  Moveable();
----------------
No need for the `public` access specifier.


http://reviews.llvm.org/D21223





More information about the cfe-commits mailing list