summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
diff options
context:
space:
mode:
authorFelix Berger <flx@google.com>2016-03-05 21:17:58 +0000
committerFelix Berger <flx@google.com>2016-03-05 21:17:58 +0000
commitadfdc14832213a80183c7665c2dfdfa466e13fc5 (patch)
tree3ff5793568f78e25c9497a020fe734d4c554b9fa /clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
parentac25f2c0737179bb90ec6c29d11ccd8930f78215 (diff)
downloadbcm5719-llvm-adfdc14832213a80183c7665c2dfdfa466e13fc5.tar.gz
bcm5719-llvm-adfdc14832213a80183c7665c2dfdfa466e13fc5.zip
[clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.
Summary: Move code shared between UnnecessaryCopyInitialization and ForRangeCopyCheck into utilities files. Add more test cases for UnnecessaryCopyInitialization and disable fixes inside of macros. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17488 llvm-svn: 262781
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h')
-rw-r--r--clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h b/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
index 22a80a86e53..73d0b3411d7 100644
--- a/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
+++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryCopyInitialization.h
@@ -16,10 +16,10 @@ namespace clang {
namespace tidy {
namespace performance {
-// A check that detects const local variable declarations that are copy
-// initialized with the const reference of a function call or the const
-// reference of a method call whose object is guaranteed to outlive the
-// variable's scope and suggests to use a const reference.
+// The check detects local variable declarations that are copy initialized with
+// the const reference of a function call or the const reference of a method
+// call whose object is guaranteed to outlive the variable's scope and suggests
+// to use a const reference.
//
// The check currently only understands a subset of variables that are
// guaranteed to outlive the const reference returned, namely: const variables,
OpenPOWER on IntegriCloud