[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-10 Thread Vitaly Goldshteyn via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param goldvitaly wrote: F

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-10 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-10 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/7] Allow unnecessary-value-param to match

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/6] Allow unnecessary-value-param to match

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-08 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/5] Allow unnecessary-value-param to match

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-06 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-06 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param + ` check + detecting more cases fo

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
@@ -483,6 +483,12 @@ Changes in existing checks usages of ``std::string_view::compare``. Added a `StringLikeClasses` option to detect usages of ``compare`` method in custom string-like classes. +- Improved :doc:`unnecessary-value-param + ` check + detecting more cases fo

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/4] Allow unnecessary-value-param to match

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,92 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-05 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly updated https://github.com/llvm/llvm-project/pull/97767 >From 1cf4340d7302e075a8785f23fd383db29cedd590 Mon Sep 17 00:00:00 2001 From: %username% <%userna...@google.com> Date: Thu, 4 Jul 2024 22:32:19 +0200 Subject: [PATCH 1/3] Allow unnecessary-value-param to match

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-04 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly created https://github.com/llvm/llvm-project/pull/97767 Clang-Tidy unnecessary-value-param value param will be triggered for templated functions if at least one instantiontion with expensive to copy type is present in translation unit. It is relatively common mista

[clang-tools-extra] . (PR #97766)

2024-07-04 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly edited https://github.com/llvm/llvm-project/pull/97766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97766)

2024-07-04 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly closed https://github.com/llvm/llvm-project/pull/97766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97766)

2024-07-04 Thread Vitaly Goldshteyn via cfe-commits
https://github.com/goldvitaly created https://github.com/llvm/llvm-project/pull/97766 Clang-Tidy unnecessary-value-param value param will be triggered for templated functions if at least one instantiontion with expensive to copy type is present in translation unit. It is relatively common mista