@@ -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
@@ -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
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
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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
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
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
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
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
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
17 matches
Mail list logo