[clang-tidy] Use hasLocalStorage() to identify unnecessary copy initializations to...
authorAlexander Kornienko <alexfh@google.com>
Wed, 30 Dec 2015 11:35:50 +0000 (11:35 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 30 Dec 2015 11:35:50 +0000 (11:35 +0000)
commit8d228dda413a3c4b40cf0480f06b0edb232ba2c4
treed81c05af7697122cd3f2e81d9e6afa3aa2adea93
parent72a96c66b275a27c5d7975d3a3435c1ffcd98c9d
[clang-tidy] Use hasLocalStorage() to identify unnecessary copy initializations to exclude static local variables.

Summary: Since local static variables can outlive other local variables exclude them from the unnecessary copy initialization check.

Reviewers: alexfh

Patch by Felix Berger!

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

llvm-svn: 256636
clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.cpp
clang-tools-extra/test/clang-tidy/performance-unnecessary-copy-initialization.cpp