[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check

Aaron Gokaslan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 9 07:05:46 PST 2022


Skylion007 added a comment.

Currently, this check also tries to move static values which is very undesirable and unlikely to be correct.

     static auto value = std::string("CONSTANT");
  -  return value;
  +  return std::move(value);


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137205/new/

https://reviews.llvm.org/D137205



More information about the cfe-commits mailing list