[PATCH] D102175: [clang-tidy] performance-unnecessary-copy-initialization: Remove the complete statement when the copied variable is unused.
Yitzhak Mandelbaum via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 2 07:01:15 PDT 2021
ymandel accepted this revision.
ymandel added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp:541
Orig.constMethod();
+ UnnecessaryCopy.constMethod();
}
----------------
If this line weren't here, then we'd delete line 537, in which case `Ref` itself becomes unused and so line 536 should be deleted as well. Do you handle this case?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102175/new/
https://reviews.llvm.org/D102175
More information about the cfe-commits
mailing list