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 37f174e24519..bfb853096e0e 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 @@ -1,8 +1,5 @@ // RUN: %check_clang_tidy %s modernize-pass-by-value %t -- -- -std=c++11 -fno-delayed-template-parsing -// CHECK-FIXES: #include -#include - namespace { // POD types are trivially move constructible. struct Movable { @@ -193,10 +190,12 @@ struct S { Movable M; }; +template struct array { T A[N]; }; + // 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 { - T(std::array a) : a_(a) {} - // CHECK-FIXES: T(std::array a) : a_(a) {} - std::array a_; + T(array a) : a_(a) {} + // CHECK-FIXES: T(array a) : a_(a) {} + array a_; };