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

Chris Cotter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 5 21:09:39 PST 2023


ccotter added inline comments.
Herald added a subscriber: ChuanqiXu.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/performance/unnecessary-copy-on-last-use.cpp:77
+
+Movable testReturn2(Movable && Mov, bool F) {
+  return F? Mov: Movable{}; 
----------------
Could you add another test where `Mov` is just a `Movable` 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