[PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 05:45:14 PDT 2016


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

One minor typo fix, but otherwise LGTM. Thank you for the check!


================
Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:125-126
@@ +124,4 @@
+                   "forwarding reference passed to std::move(), which may "
+                   "unexpectedly cause lvalues to be moved; use "
+                   "std::forward() instead");
+
----------------
Anyone understanding what an lvalue is will probably also understand indeterminate state. ;-) However, I think the new wording is fine.

================
Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.h:31
@@ +30,3 @@
+/// indeterminate state) even though no std::move was applied to the lvalue at
+/// the callsite.
+//
----------------
s/callsite/call site


https://reviews.llvm.org/D22220





More information about the cfe-commits mailing list