[clang-tidy] Add UnnecessaryCopyInitialization check to new "performance" module in ClangTidy

Summary:
The patch adds a new ClangTidy check that detects when expensive-to-copy types are unnecessarily copy initialized from a const reference that has the same or are larger scope than the copy.

It currently only detects this when the copied variable is const qualified. But this will be extended to non const variables if they are only used in a const fashion.

Reviewers: alexfh

Subscribers: cfe-commits

Patch by Felix Berger!

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


git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@256632 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed