[PATCH] D103021: [clang-tidy] performance-unnecessary-copy-initialization: Search whole function body for variable initializations.

Felix Berger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 24 06:50:52 PDT 2021


flx created this revision.
flx added reviewers: hokein, ymandel, aaron.ballman.
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.

This fixes false positive cases where a reference is initialized outside of a
block statement and then its initializing variable is modified. Another case is
when the looped over container is modified.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103021

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: D103021.347377.patch
Type: text/x-patch
Size: 7438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210524/3d1bfe60/attachment-0001.bin>


More information about the cfe-commits mailing list