[PATCH] D119370: [clang-tidy] add option performance-move-const-arg.CheckMoveToConstRef
Greg Miller via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 9 14:09:27 PST 2022
devjgm updated this revision to Diff 407288.
devjgm added a comment.
Accepted ymandel's suggestion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119370/new/
https://reviews.llvm.org/D119370
Files:
clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
Index: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
+++ clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
@@ -194,8 +194,8 @@
<< (InvocationParm->getFunctionScopeIndex() + 1) << FunctionName
<< *InvocationParmType << ExpectParmTypeName;
}
- } else if (ReceivingExpr) {
- if ((*InvocationParmType)->isRValueReferenceType() || !CheckMoveToConstRef)
+ } else if (ReceivingExpr && CheckMoveToConstRef) {
+ if ((*InvocationParmType)->isRValueReferenceType())
return;
auto Diag = diag(FileMoveRange.getBegin(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119370.407288.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220209/c1912ad4/attachment.bin>
More information about the cfe-commits
mailing list