[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 22 07:53:07 PST 2023
================
@@ -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 are excluded from this check:
+
+* trivial and trivially copyable
+* references and pointers
+* exception variables in catch clauses
+* static or thread local
+* structured bindings
+
+This check can be configured to warn on all non-trivial variables by setting `ExcludeTypes` to `.*`.
----------------
EugeneZelenko wrote:
Please follow 80-characters limit. Same in other places in this file.
https://github.com/llvm/llvm-project/pull/76101
More information about the cfe-commits
mailing list