[PATCH] D107450: [clang-tidy] Fix wrong FixIt in performance-move-const-arg
gehry via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 28 03:48:44 PST 2021
Sockke marked 13 inline comments as done.
Sockke added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:145
+ if ((!ReceivingCallExpr ||
+ ReceivingCallExpr->getDirectCallee()->isTemplateInstantiation()) &&
+ (!ReceivingConstructExpr ||
----------------
aaron.ballman wrote:
> Not all `CallExpr` objects have a direct callee, so this will crash (such as calls through a function pointer rather than a direct function call). It may be worth adding test coverage for this.
Use `InvocationParm` to determine whether objects have a direct callee.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107450/new/
https://reviews.llvm.org/D107450
More information about the cfe-commits
mailing list