[PATCH] D114249: [clang-tidy] performance-unnecessary-copy-initialization: Fix false negative.
Felix Berger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 19 17:13:35 PST 2021
flx added a comment.
Thank you for catching and fixing this!
================
Comment at: clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp:97
+ cxxOperatorCallExpr(callee(MethodDecl), hasArgument(0, ReceiverExpr),
+ hasArgument(0, hasType(recordType(hasDeclaration(
+ ReceiverTypeDecl)))))));
----------------
Does this work if if the object argument is a pointer or a type alias? Could you add a test to confirm?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114249/new/
https://reviews.llvm.org/D114249
More information about the cfe-commits
mailing list