[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg
Whisperity via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 28 01:48:50 PDT 2021
whisperity added a comment.
Okay. I think I am convinced. And removing a bogus automated fix is always a positive change!
================
Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:144
+ << (InvocationParm->getFunctionScopeIndex() + 1)
+ << ReceivingCallExpr->getDirectCallee()->getName()
+ << InvocationParm->getOriginalType() << ExpectParmTypeName;
----------------
I am not sure if this will always return something reasonable as a printed name.
Could you please add a test case where the receiving function is a //constructor//? E.g. a `testStringView` that takes, let's say, `const char*&&`?
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:116-119
+- Improved :doc:`performance-move-const-arg` check.
+
+ Removed fixes for that a trivially-copyable object wrapped by std::move is passed to the function with rvalue reference parameters because the code was broken by removing std::move.
+
----------------
I tried to make the release note entry a bit easier to understand. Of course, please reflow!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107450/new/
https://reviews.llvm.org/D107450
More information about the cfe-commits
mailing list