[PATCH] D119370: [clang-tidy] add option performance-move-const-arg.CheckMoveToConstRef
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 9 13:41:36 PST 2022
ymandel accepted this revision.
ymandel added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:197-198
}
} else if (ReceivingExpr) {
- if ((*InvocationParmType)->isRValueReferenceType())
+ if ((*InvocationParmType)->isRValueReferenceType() || !CheckMoveToConstRef)
return;
----------------
nit, up to you. I think this way is a little clearer b/c it reads "proceed on this branch if the check is configured to "check move to const ref"".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119370/new/
https://reviews.llvm.org/D119370
More information about the cfe-commits
mailing list