[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg

Whisperity via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 26 05:50:44 PDT 2021


whisperity added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:140
+      diag(InvocationParm->getLocation(),
+           "consider changing the %0st parameter of %1 from %2 to 'const %3 &'",
+           DiagnosticIDs::Note)
----------------



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg.cpp:260
+  // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: std::move of the variable 'a' of the trivially-copyable type 'int' has no effect [performance-move-const-arg]
+  // CHECK-MESSAGES: :[[@LINE-9]]:28: note: consider changing the 2st parameter of showInt from 'int &&' to 'const int &'
+}
----------------



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

https://reviews.llvm.org/D107450



More information about the cfe-commits mailing list