https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rockwotj wrote:
Changed
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
LGTM.
Unless you want this to be merged by rockw...@users.noreply.github.com please
change your github privacy settings.
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing
@@ -0,0 +1,91 @@
+// RUN: %check_clang_tidy -std=c++17 %s
bugprone-unused-local-non-trivial-variable %t -- \
+// RUN: -config="{CheckOptions:
{bugprone-unused-local-non-trivial-variable.IncludeTypes: '::async::Future'}}"
rockwotj wrote:
Done.
@@ -0,0 +1,91 @@
+// RUN: %check_clang_tidy -std=c++17 %s
bugprone-unused-local-non-trivial-variable %t -- \
rockwotj wrote:
Done.
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
@@ -0,0 +1,92 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,92 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/rockwotj updated
https://github.com/llvm/llvm-project/pull/76101
>From 6f0b7e5a80a8812e95357397384217dde4f81b01 Mon Sep 17 00:00:00 2001
From: Tyler Rockwood
Date: Thu, 21 Dec 2023 16:31:12 -0600
Subject: [PATCH 1/2] clang-tidy/bugprone: introduce
@@ -0,0 +1,92 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,92 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,91 @@
+// RUN: %check_clang_tidy -std=c++17 %s
bugprone-unused-local-non-trivial-variable %t -- \
+// RUN: -config="{CheckOptions:
{bugprone-unused-local-non-trivial-variable.IncludeTypes: '::async::Future'}}"
PiotrZSL wrote:
would be nice to
@@ -0,0 +1,91 @@
+// RUN: %check_clang_tidy -std=c++17 %s
bugprone-unused-local-non-trivial-variable %t -- \
PiotrZSL wrote:
use -std=c++17-or-later
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits
https://github.com/PiotrZSL approved this pull request.
Overall looks fine.
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/rockwotj updated
https://github.com/llvm/llvm-project/pull/76101
>From cf118a475b8dfef36c365c417c9cf63b79ff4055 Mon Sep 17 00:00:00 2001
From: Tyler Rockwood
Date: Thu, 21 Dec 2023 16:31:12 -0600
Subject: [PATCH 1/2] clang-tidy/bugprone: introduce
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,45 @@
+.. title:: clang-tidy - bugprone-unused-local-non-trivial-variable
+
+bugprone-unused-local-non-trivial-variable
+==
+
+Warns when a local non trivial variable is unused within a function.
+The following types of variables
https://github.com/rockwotj updated
https://github.com/llvm/llvm-project/pull/76101
>From 9a9fe7fd0a7b54c90042c64aa9db23b4ca703ec0 Mon Sep 17 00:00:00 2001
From: Tyler Rockwood
Date: Thu, 21 Dec 2023 16:31:12 -0600
Subject: [PATCH 1/2] clang-tidy/bugprone: introduce
https://github.com/rockwotj updated
https://github.com/llvm/llvm-project/pull/76101
>From fff68e1854d16a166088d7199af09a7aeb19b4c4 Mon Sep 17 00:00:00 2001
From: Tyler Rockwood
Date: Thu, 21 Dec 2023 16:31:12 -0600
Subject: [PATCH 1/2] clang-tidy/bugprone: introduce
@@ -0,0 +1,45 @@
+.. title:: clang-tidy - bugprone-unused-local-non-trivial-variable
+
+bugprone-unused-local-non-trivial-variable
+==
+
+Warns when a local non trivial variable is unused within a function.
+The following types of variables
@@ -0,0 +1,79 @@
+// RUN: %check_clang_tidy %s bugprone-unused-local-non-trivial-variable %t -- \
+// RUN: -config="{CheckOptions:
{bugprone-unused-local-non-trivial-variable.IncludeTypeRegex:
'::async::Future'}}"
+
+
+namespace async {
+template
+class Ptr {
+ public:
@@ -0,0 +1,79 @@
+// RUN: %check_clang_tidy %s bugprone-unused-local-non-trivial-variable %t -- \
+// RUN: -config="{CheckOptions:
{bugprone-unused-local-non-trivial-variable.IncludeTypeRegex:
'::async::Future'}}"
+
+
+namespace async {
+template
+class Ptr {
+ public:
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -149,6 +149,7 @@ Clang-Tidy Checks
:doc:`bugprone-unhandled-self-assignment
`,
:doc:`bugprone-unique-ptr-array-mismatch
`, "Yes"
:doc:`bugprone-unsafe-functions `,
+ :doc:`bugprone-unused-local-non-trivial-variable
`, "Yes"
rockwotj wrote:
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,29 @@
+.. title:: clang-tidy - bugprone-unused-local-non-trivial-variable
+
+bugprone-unused-local-non-trivial-variable
+==
+
+Warns when a local non trivial variable is unused within a function.
+
+In the following example,
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/rockwotj updated
https://github.com/llvm/llvm-project/pull/76101
>From fff68e1854d16a166088d7199af09a7aeb19b4c4 Mon Sep 17 00:00:00 2001
From: Tyler Rockwood
Date: Thu, 21 Dec 2023 16:31:12 -0600
Subject: [PATCH] clang-tidy/bugprone: introduce
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,29 @@
+.. title:: clang-tidy - bugprone-unused-local-non-trivial-variable
+
+bugprone-unused-local-non-trivial-variable
+==
+
+Warns when a local non trivial variable is unused within a function.
+
+In the following example,
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,89 @@
+//===--- UnusedLocalNonTrivialVariableCheck.cpp - clang-tidy
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,79 @@
+// RUN: %check_clang_tidy %s bugprone-unused-local-non-trivial-variable %t -- \
+// RUN: -config="{CheckOptions:
{bugprone-unused-local-non-trivial-variable.IncludeTypeRegex:
'::async::Future'}}"
+
+
+namespace async {
+template
+class Ptr {
+ public:
@@ -0,0 +1,79 @@
+// RUN: %check_clang_tidy %s bugprone-unused-local-non-trivial-variable %t -- \
+// RUN: -config="{CheckOptions:
{bugprone-unused-local-non-trivial-variable.IncludeTypeRegex:
'::async::Future'}}"
+
+
+namespace async {
+template
+class Ptr {
+ public:
@@ -149,6 +149,7 @@ Clang-Tidy Checks
:doc:`bugprone-unhandled-self-assignment
`,
:doc:`bugprone-unique-ptr-array-mismatch
`, "Yes"
:doc:`bugprone-unsafe-functions `,
+ :doc:`bugprone-unused-local-non-trivial-variable
`, "Yes"
PiotrZSL wrote:
https://github.com/PiotrZSL requested changes to this pull request.
Minor tuning needed, some changes to documentation, options, default
configuration.
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
dotnwat wrote:
This is a very nice check for us to have @rockwotj.
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rockwotj edited
https://github.com/llvm/llvm-project/pull/76101
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
42 matches
Mail list logo