From 5b1cd46b546370e340f69c7a148183b24d0544db Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 3 Jan 2025 16:25:17 +0100 Subject: [PATCH] Add performance-unnecessary-value-param check (#739) --- .clang-tidy | 1 - tests/splines/splines_linear_problem.cpp | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index af8c39a25..40c1c6d04 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -53,7 +53,6 @@ Checks: > -modernize-use-trailing-return-type, performance-*, -performance-enum-size, - -performance-unnecessary-value-param, portability-*, readability-*, -readability-function-cognitive-complexity, diff --git a/tests/splines/splines_linear_problem.cpp b/tests/splines/splines_linear_problem.cpp index 35d695ed1..2665ce9ca 100644 --- a/tests/splines/splines_linear_problem.cpp +++ b/tests/splines/splines_linear_problem.cpp @@ -24,7 +24,7 @@ namespace DDC_HIP_5_7_ANONYMOUS_NAMESPACE_WORKAROUND(MATRIX_CPP) { void fill_identity( - ddc::detail::SplinesLinearProblem::MultiRHS mat) + ddc::detail::SplinesLinearProblem::MultiRHS const& mat) { for (std::size_t i(0); i < mat.extent(0); ++i) { for (std::size_t j(0); j < mat.extent(1); ++j) { @@ -34,7 +34,7 @@ void fill_identity( } void copy_matrix( - ddc::detail::SplinesLinearProblem::MultiRHS copy, + ddc::detail::SplinesLinearProblem::MultiRHS const& copy, ddc::detail::SplinesLinearProblem const& mat) { assert(mat.size() == copy.extent(0)); @@ -48,8 +48,9 @@ void copy_matrix( } void check_inverse( - ddc::detail::SplinesLinearProblem::MultiRHS matrix, - ddc::detail::SplinesLinearProblem::MultiRHS inv) + ddc::detail::SplinesLinearProblem::MultiRHS const& + matrix, + ddc::detail::SplinesLinearProblem::MultiRHS const& inv) { double const TOL = 1e-10; std::size_t const N = matrix.extent(0); @@ -66,8 +67,9 @@ void check_inverse( } void check_inverse_transpose( - ddc::detail::SplinesLinearProblem::MultiRHS matrix, - ddc::detail::SplinesLinearProblem::MultiRHS inv) + ddc::detail::SplinesLinearProblem::MultiRHS const& + matrix, + ddc::detail::SplinesLinearProblem::MultiRHS const& inv) { double const TOL = 1e-10; std::size_t const N = matrix.extent(0);