summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp
diff options
context:
space:
mode:
authorMads Ravn <madsravn@gmail.com>2016-05-24 16:09:24 +0000
committerMads Ravn <madsravn@gmail.com>2016-05-24 16:09:24 +0000
commitef88dc8fe4d28976ccd157493066a7f57ba98ce8 (patch)
tree8f5f00156462a0bda5d04c539fa92c6df1f82007 /clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp
parent1f5696f9c1bb4ccfb365edf175f9420535ea427c (diff)
downloadbcm5719-llvm-ef88dc8fe4d28976ccd157493066a7f57ba98ce8.tar.gz
bcm5719-llvm-ef88dc8fe4d28976ccd157493066a7f57ba98ce8.zip
[clang-tidy] modernize-pass-by-value bugfix. Reverting lit-style test
Adding to revision 270567. The lit-style test was wrong. This is being fixed by this commit. This is the bug on bugzilla: https://llvm.org/bugs/show_bug.cgi?id=27731 This is the code review on phabricator: http://reviews.llvm.org/D20365 llvm-svn: 270575
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp b/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp
index d7c9d141b4b..37f174e2451 100644
--- a/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp
+++ b/clang-tools-extra/test/clang-tidy/modernize-pass-by-value.cpp
@@ -150,8 +150,7 @@ template <typename T> struct N {
// Test with value parameter.
struct O {
O(Movable M) : M(M) {}
- // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: pass by value and use std::move
- // CHECK-FIXES: O(Movable M) : M(std::move(M)) {}
+ // CHECK-FIXES: O(Movable M) : M(M) {}
Movable M;
};
@@ -183,8 +182,7 @@ typedef ::Movable RMovable;
}
struct R {
R(ns_R::RMovable M) : M(M) {}
- // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: pass by value and use std::move
- // CHECK-FIXES: R(ns_R::RMovable M) : M(std::move(M)) {}
+ // CHECK-FIXES: R(ns_R::RMovable M) : M(M) {}
ns_R::RMovable M;
};
@@ -198,6 +196,7 @@ struct S {
// Test that types that are trivially copyable will not use std::move. This will
// cause problems with misc-move-const-arg, as it will revert it.
struct T {
- std::array<int, 10> a_;
T(std::array<int, 10> a) : a_(a) {}
+ // CHECK-FIXES: T(std::array<int, 10> a) : a_(a) {}
+ std::array<int, 10> a_;
};
OpenPOWER on IntegriCloud