[PATCH] D102175: [clang-tidy] performance-unnecessary-copy-initialization: Remove the complete statement when the copied variable is unused.

Felix Berger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 10 08:46:11 PDT 2021


flx created this revision.
flx added reviewers: aaron.ballman, ymandel, hokein.
Herald added a subscriber: xazax.hun.
flx requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

It is not useful to keep the statement around and can lead to compiler
warnings when -Wall (-Wunused-variable specifically) turned on.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102175

Files:
  clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
  clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
  clang-tools-extra/test/clang-tidy/checkers/performance-unnecessary-copy-initialization.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102175.344072.patch
Type: text/x-patch
Size: 18800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210510/d61c2d10/attachment-0001.bin>


More information about the cfe-commits mailing list