vbvictor wrote: To sum up: With `std::move` it's 1 copy 1 move for lvalue or 1 move for rvalue With `const&` it's 1 copy for lvalue or rvalue small repro https://godbolt.org/z/EosczKoo7
For me it this patch adds inconsistency for the check: if we have ```cpp void NegativeMoved(ExpensiveToCopyType A) { ExpensiveToCopyType Copy = std::move(A); // no warning } ``` then I remove `std::move`, I'd expect the check to suggest it, but now it wants `const&` ``` https://github.com/llvm/llvm-project/pull/145871 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits