[clang-tools-extra] [clang] [llvm] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,235 @@ +//===--- UseDigitSeparatorCheck.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: Ap

[llvm] [clang-tools-extra] [clang] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Did some quick glace, some work still needed, my main concern is performance of this check. https://github.com/llvm/llvm-project/pull/76153 ___ cfe-commits mailing list cfe-commits@li

[llvm] [clang-tools-extra] [clang] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,235 @@ +//===--- UseDigitSeparatorCheck.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: Ap

[clang] [llvm] [clang-tools-extra] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,235 @@ +//===--- UseDigitSeparatorCheck.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: Ap

[llvm] [clang] [clang-tools-extra] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,235 @@ +//===--- UseDigitSeparatorCheck.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: Ap

[llvm] [clang] [clang-tools-extra] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,235 @@ +//===--- UseDigitSeparatorCheck.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: Ap

[llvm] [clang-tools-extra] [clang] [clang-tidy] modernize-use-digit-separator issue #35414 (PR #76153)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,235 @@ +//===--- UseDigitSeparatorCheck.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: Ap

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via 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

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Simple check, not bad. My main blocker for this check is a name. https://github.com/llvm/llvm-project/pull/76101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +//===--- MustUseCheck.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: Apa

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - misc-must-use + +misc-must-use += + +Allow strictly enforcing that variables are used for specific classes, +even with they would not be normally warned using `-Wunused-variable` due +templates or custom destructors. + +In the

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +//===--- MustUseCheck.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: Apa

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,40 @@ +//===--- MustUseCheck.h - clang-tidy *- C++ -*-===// +// +// 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: Apa

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,40 @@ +//===--- MustUseCheck.h - clang-tidy *- C++ -*-===// +// +// 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: Apa

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -54,6 +55,7 @@ class MiscModule : public ClangTidyModule { CheckFactories.registerCheck( "misc-misleading-identifier"); CheckFactories.registerCheck("misc-misplaced-const"); +CheckFactories.registerCheck("misc-must-use"); PiotrZSL wrote:

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +// RUN: %check_clang_tidy %s misc-must-use %t -- \ +// RUN: -config="{CheckOptions: [{key: 'misc-must-use.Types', value: '::async::Future'}]}" + +namespace async { +template +class Future { +public: +T get() { +return Pending; +} +priva

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,48 @@ +// RUN: %check_clang_tidy %s misc-must-use %t -- \ +// RUN: -config="{CheckOptions: [{key: 'misc-must-use.Types', value: '::async::Future'}]}" PiotrZSL wrote: write in new format. https://github.com/llvm/llvm-project/pull/76101 _

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - misc-must-use + +misc-must-use += + +Allow strictly enforcing that variables are used for specific classes, +even with they would not be normally warned using `-Wunused-variable` due PiotrZSL wrote: consider

[clang-tools-extra] [clang-tidy] introduce a must use check (PR #76101)

2023-12-21 Thread Piotr Zegar via cfe-commits
@@ -54,6 +55,7 @@ class MiscModule : public ClangTidyModule { CheckFactories.registerCheck( "misc-misleading-identifier"); CheckFactories.registerCheck("misc-misplaced-const"); +CheckFactories.registerCheck("misc-must-use"); PiotrZSL wrote:

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via 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

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via cfe-commits
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 cfe-commits@lists.llv

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -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: che

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -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: +

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -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: +

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via 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: Apa

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via 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: Apa

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -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, `futu

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via 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: Apa

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-22 Thread Piotr Zegar via 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: Apa

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Not too bad, think more about check name and warning message. https://github.com/llvm/llvm-project/pull/76249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,31 @@ +//===--- ReturnExpressionInVoidFunctionCheck.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: Apa

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/76249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -119,6 +120,8 @@ class ReadabilityModule : public ClangTidyModule { "readability-redundant-preprocessor"); CheckFactories.registerCheck( "readability-reference-to-constructed-temporary"); +CheckFactories.registerCheck( +"readability-return-exp

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,30 @@ +//===--- ReturnExpressionInVoidFunctionCheck.h - clang-tidy -*- C++ -*-===// +// +// 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: Apa

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -371,6 +371,7 @@ Clang-Tidy Checks :doc:`readability-redundant-string-cstr `, "Yes" :doc:`readability-redundant-string-init `, "Yes" :doc:`readability-reference-to-constructed-temporary `, + :doc:`readability-return-expression-in-void-function `, "Yes" ---

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %check_clang_tidy %s readability-return-expression-in-void-function %t + +void f1(); + +void f2() { +return f1(); PiotrZSL wrote: add tests with normal returns: "return;" https://github.com/llvm/llvm-project/pull/76249 _

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -119,6 +120,8 @@ class ReadabilityModule : public ClangTidyModule { "readability-redundant-preprocessor"); CheckFactories.registerChec

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/76249 ___ cfe-commit

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: https://github.com/PiotrZSL commented: Last nits. https://github.com/llvm/llvm-project/pull/76249 _

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -0,0 +1,30 @@ +.. title:: clang-tidy - readability-avoid-return-with-void-value + +readability-avoid-return-with-void-valu

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: @@ -0,0 +1,31 @@ +//===--- AvoidReturnWithVoidValueCheck.cpp - clang-tidy -===// ---

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -218,6 +218,13 @@ New checks Detects C++ code where a reference variable is used to extend the lifetime of a tempora

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: @@ -0,0 +1,30 @@ +.. title:: clang-tidy - readability-avoid-return-with-void-value + +readability-av

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -0,0 +1,33 @@ +//===--- AvoidReturnWithVoidValueCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-22 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -0,0 +1,31 @@ +//===--- AvoidReturnWithVoidValueCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-23 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -221,9 +221,8 @@ New checks - New :doc:`rea

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-23 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: PiotrZSL wrote: One more thing, there are issues like this repo

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-24 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: PiotrZSL wrote: I run check on llvm-project, finds thousands of

[clang-tools-extra] Allow to pass config file to clang-tidy-diff (PR #75457)

2023-12-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. LGTM, release notes can always by changed later if needed. https://github.com/llvm/llvm-project/pull/75457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang-tools-extra] Allow to pass config file to clang-tidy-diff (PR #75457)

2023-12-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM (wrong button) https://github.com/llvm/llvm-project/pull/75457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via 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: Apa

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via 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

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via 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

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via cfe-commits
@@ -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 mail

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via cfe-commits
@@ -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 a

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via cfe-commits
@@ -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: Apa

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via cfe-commits
@@ -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: Apa

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-24 Thread Piotr Zegar via 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 li

[clang-tools-extra] [clang-tidy] introduce a unused local non trival variable check (PR #76101)

2023-12-25 Thread Piotr Zegar via cfe-commits
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

[clang-tools-extra] 007ed0d - [clang-tidy][NFC] Enable exceptions in test for bugprone-unused-local-non-trivial-variable

2023-12-25 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-25T11:30:02Z New Revision: 007ed0dccd6a3d19f331eb7cd91438d792754439 URL: https://github.com/llvm/llvm-project/commit/007ed0dccd6a3d19f331eb7cd91438d792754439 DIFF: https://github.com/llvm/llvm-project/commit/007ed0dccd6a3d19f331eb7cd91438d792754439.diff LOG: [

[clang-tools-extra] 37fc9c6 - [clang-tidy][NFC] Enable exceptions in test for bugprone-unused-local-non-trivial-variable

2023-12-25 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-25T11:38:06Z New Revision: 37fc9c6a4227b1736cc643eb95636d9f7ec30190 URL: https://github.com/llvm/llvm-project/commit/37fc9c6a4227b1736cc643eb95636d9f7ec30190 DIFF: https://github.com/llvm/llvm-project/commit/37fc9c6a4227b1736cc643eb95636d9f7ec30190.diff LOG: [

[clang-tools-extra] 9fba1d5 - [clang-tidy] Fixes for bugprone-unused-local-non-trivial-variable

2023-12-25 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-25T13:09:12Z New Revision: 9fba1d5f3a52af0ae62f386d0c494bd9510fa845 URL: https://github.com/llvm/llvm-project/commit/9fba1d5f3a52af0ae62f386d0c494bd9510fa845 DIFF: https://github.com/llvm/llvm-project/commit/9fba1d5f3a52af0ae62f386d0c494bd9510fa845.diff LOG: [

[clang-tools-extra] [clang-tidy] Add bugprone-chained-comparison check (PR #76365)

2023-12-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/76365 Check that flags chained comparison expressions, such as a < b < c or a == b == c, which may have unintended behavior due to implicit operator associativity. Moved from Phabricator (D144429). >From 5ece73a5b1

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2023-12-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Missing tests, documentation, release notes. https://github.com/llvm/llvm-project/pull/76117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang-tools-extra] Fix #75687: add std::span to the default types. (PR #76116)

2023-12-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/76116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 9e98f8d - [clng-tidy][NFC] Update documentation for readability-simplify-subscript-expr

2023-12-25 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-25T20:33:19Z New Revision: 9e98f8d7ac11c63768b1ed69c11ea75c8b794063 URL: https://github.com/llvm/llvm-project/commit/9e98f8d7ac11c63768b1ed69c11ea75c8b794063 DIFF: https://github.com/llvm/llvm-project/commit/9e98f8d7ac11c63768b1ed69c11ea75c8b794063.diff LOG: [

[clang-tools-extra] Allow to pass config file to clang-tidy-diff (PR #75457)

2023-12-25 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/75457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-12-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 34621aa - Revert "[clang-tidy] Don't replace typedefs in extern c scope (#69102)"

2023-12-26 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-26T09:35:18Z New Revision: 34621aa81f63812b31d1356030e9d74ce59e56fc URL: https://github.com/llvm/llvm-project/commit/34621aa81f63812b31d1356030e9d74ce59e56fc DIFF: https://github.com/llvm/llvm-project/commit/34621aa81f63812b31d1356030e9d74ce59e56fc.diff LOG: R

[clang-tools-extra] 7a48039 - [clang-tidy] Fix compilation of modernize-use-using check

2023-12-26 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-12-26T10:20:10Z New Revision: 7a48039eb79fc887f473e80618b6bc98effea077 URL: https://github.com/llvm/llvm-project/commit/7a48039eb79fc887f473e80618b6bc98effea077 DIFF: https://github.com/llvm/llvm-project/commit/7a48039eb79fc887f473e80618b6bc98effea077.diff LOG: [

[clang-tools-extra] 583a258 - [clang-tidy] Don't replace typedefs in extern c scope (#69102)

2023-12-26 Thread Piotr Zegar via cfe-commits
Author: Da-Viper Date: 2023-12-26T09:36:07Z New Revision: 583a2583bb5f53b7b2cbd3d2043c0b2ac286464f URL: https://github.com/llvm/llvm-project/commit/583a2583bb5f53b7b2cbd3d2043c0b2ac286464f DIFF: https://github.com/llvm/llvm-project/commit/583a2583bb5f53b7b2cbd3d2043c0b2ac286464f.diff LOG: [cla

[clang-tools-extra] [clang-tidy] Treat fields in anonymous records as names in enclosing scope when checking name styles (PR #75701)

2023-12-26 Thread Piotr Zegar via cfe-commits
@@ -207,6 +208,31 @@ After if AggressiveDependentMemberLookup is `true`: } }; +.. option:: CheckAnonFieldInParent + +When set to `true`, fields in anonymous records (i.e. anonymous +unions and structs) will be treated as names in the enclosing scope +rath

[clang-tools-extra] [clang-tidy] Treat fields in anonymous records as names in enclosing scope when checking name styles (PR #75701)

2023-12-26 Thread Piotr Zegar via cfe-commits
@@ -207,6 +208,31 @@ After if AggressiveDependentMemberLookup is `true`: } }; +.. option:: CheckAnonFieldInParent + +When set to `true`, fields in anonymous records (i.e. anonymous +unions and structs) will be treated as names in the enclosing scope +rath

[clang-tools-extra] [clang-tidy] Treat fields in anonymous records as names in enclosing scope when checking name styles (PR #75701)

2023-12-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Treat fields in anonymous records as names in enclosing scope when checking name styles (PR #75701)

2023-12-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/75701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Treat fields in anonymous records as names in enclosing scope when checking name styles (PR #75701)

2023-12-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/75701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][misleading-indentation]ignore false-positives for line started with empty macro (PR #75061)

2023-12-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check readability-return-expression-in-void-function (PR #76249)

2023-12-28 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang-tools-extra] 4b7707b - [clang-tidy][DOC] Generate documentation for new Clang-Analyzer checks

2024-01-02 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-01-02T18:26:44Z New Revision: 4b7707bfd9b24e972212c6e40d91c1b21f6f65b6 URL: https://github.com/llvm/llvm-project/commit/4b7707bfd9b24e972212c6e40d91c1b21f6f65b6 DIFF: https://github.com/llvm/llvm-project/commit/4b7707bfd9b24e972212c6e40d91c1b21f6f65b6.diff LOG: [

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/66169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d67c2d8 - [clang-tidy][NFC] Code format - leftover after #66169

2024-01-04 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-01-04T20:48:41Z New Revision: d67c2d85548437ef8c3bb12a29ea330180b87913 URL: https://github.com/llvm/llvm-project/commit/d67c2d85548437ef8c3bb12a29ea330180b87913 DIFF: https://github.com/llvm/llvm-project/commit/d67c2d85548437ef8c3bb12a29ea330180b87913.diff LOG: [

[libc] [openmp] [compiler-rt] [libcxx] [clang-tools-extra] [llvm] [clang] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.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: Ap

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/70962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. Looks fine even in current stage. https://github.com/llvm/llvm-project/pull/76117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/76117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-04 Thread Piotr Zegar via cfe-commits
@@ -586,6 +586,16 @@ void swap(int&, int&) { throw 1; } +void iter_swap(int&, int&) { + // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'iter_swap' which should not throw exceptions + throw 1; +} + +void iter_move(int&, int&) { -

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-04 Thread Piotr Zegar via cfe-commits
@@ -58,14 +58,15 @@ void ExceptionEscapeCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { void ExceptionEscapeCheck::registerMatchers(MatchFinder *Finder) { Finder->addMatcher( - functionDecl(isDefinition(), - anyOf(isNoThrow(), -

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-04 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-04 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-04 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-04 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-04 Thread Piotr Zegar via cfe-commits
��___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Invalid Fix-It generated for implicit-widening-multiplication-result (PR #76315)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/76315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Invalid Fix-It generated for implicit-widening-multiplication-result (PR #76315)

2024-01-04 Thread Piotr Zegar via cfe-commits
@@ -18,7 +18,7 @@ char *t0(char *base, int a, int b) { // CHECK-NOTES-CXX: static_cast( ) // CHECK-NOTES-ALL: :[[@LINE-5]]:17: note: perform multiplication in a wider type // CHECK-NOTES-C:(ptrdiff_t) - // CHECK-NOTES-CXX:

[clang-tools-extra] [clang-tidy] Invalid Fix-It generated for implicit-widening-multiplication-result (PR #76315)

2024-01-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/76315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-04 Thread Piotr Zegar via cfe-commits
@@ -586,6 +586,16 @@ void swap(int&, int&) { throw 1; } +void iter_swap(int&, int&) { + // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'iter_swap' which should not throw exceptions + throw 1; +} + +void iter_move(int&, int&) { -

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2024-01-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/76065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2024-01-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Overall what is now is +- working. Few fixes are still needed to tests, code, maybe some tiny refactoring and code formatting. Consider adding support for implicit casts: ``` unsigned X = 10; `-VarDecl col:10 X 'unsigned int'

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2024-01-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,161 @@ +//===--- UseBuiltinLiteralsCheck.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: Ap

[clang-tools-extra] [clang-tidy] Add readability-use-builtin-literals check (PR #76065)

2024-01-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,161 @@ +//===--- UseBuiltinLiteralsCheck.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: Ap

<    1   2   3   4   5   6   7   8   9   10   >