================
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - performance-lost-std-move
+
+performance-lost-std-move
+=========================
+
+Warns if copy constructor is used instead of std::move() and suggests a fix.
+It honours cycles, lambdas, and unspecified call order in compound expressions.
+
+.. code-block:: c++
+
+   void f(X);
+
+   void g(X x) {
+     f(x);  // warning: Could be std::move() [performance-lost-std-move]
+   }
+
+It finds the last local variable usage, and if it is a copy, emits a warning.
+The check is based on pure AST matching and doesn't take into account any data 
flow information.
----------------
EugeneZelenko wrote:

Please follow 80-characters limit.

https://github.com/llvm/llvm-project/pull/139525
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to