Add check for unneeded copies of locals
authorHaojian Wu <hokein@google.com>
Wed, 23 Mar 2016 09:33:07 +0000 (09:33 +0000)
committerHaojian Wu <hokein@google.com>
Wed, 23 Mar 2016 09:33:07 +0000 (09:33 +0000)
commit6ccb1dd9f053758ed169a319e7cb4e746943de0d
tree0408c0d98f5eecea5ed56411276cfac64eca3ced
parentbea20c3502fbff1f95848c7691beff715a715862
Add check for unneeded copies of locals

Summary: Extends the UnnecessaryCopyInitialization to detect copies of local variables and parameters that are unneeded.

Patch by Matt Kulukundis!

Reviewers: alexfh, hokein

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18149

llvm-svn: 264146
clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
clang-tools-extra/docs/clang-tidy/checks/performance-unnecessary-copy-initialization.rst
clang-tools-extra/test/clang-tidy/performance-unnecessary-copy-initialization.cpp