Author: madsravn Date: Tue May 24 11:09:24 2016 New Revision: 270575 URL: http://llvm.org/viewvc/llvm-project?rev=270575&view=rev Log: [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 Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp?rev=270575&r1=270574&r2=270575&view=diff ============================================================================== --- clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp (original) +++ clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp Tue May 24 11:09:24 2016 @@ -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_; }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits