[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [clang-tidy] Remove 'clang-analyzer-*' checks from default che

[clang-tools-extra] [clang-tidy][NFC] http -> https (PR #160128)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, thank you for the refactor https://github.com/llvm/llvm-project/pull/160128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,10 @@ +.. title:: clang-tidy - modernize-avoid-setjmp-longjmp + +modernize-avoid-setjmp-longjmp +== + +Flags all call expressions involving ``setjmp()`` and ``longjmp()``. + vbvictor wrote: One more sentence left: "Exceptio

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
@@ -3,7 +3,9 @@ cert-err52-cpp == -This check flags all call expressions involving ``setjmp()`` and ``longjmp()``. +The cert-err52-cpp check is an alias, please see vbvictor wrote: ```suggestion The `cert-err52-cpp` check is an alias, please see `

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,10 @@ +.. title:: clang-tidy - modernize-avoid-setjmp-longjmp + +modernize-avoid-setjmp-longjmp +== + +Flags all call expressions involving ``setjmp()`` and ``longjmp()``. + vbvictor wrote: ```suggestion Flags all call expre

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,10 @@ +.. title:: clang-tidy - modernize-avoid-setjmp-longjmp + +modernize-avoid-setjmp-longjmp +== + +Flags all call expressions involving ``setjmp()`` and ``longjmp()``. + vbvictor wrote: ```suggestion References

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,10 @@ +.. title:: clang-tidy - modernize-avoid-setjmp-longjmp + +modernize-avoid-setjmp-longjmp +== + +Flags all call expressions involving ``setjmp()`` and ``longjmp()``. + vbvictor wrote: We should give small example what

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'modernize-avoid-setjmp-longjmp' (PR #159813)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, only docs should be improved a little https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159911 ___ 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-redundant-parentheses (PR #159911)

2025-09-22 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-redundant-parentheses %t vbvictor wrote: > seems that this check has no standard-related content. So there should be no problem to make it run in `98-or-later`? https://github.com/llvm/llvm-project/pull

[clang-tools-extra] [clang-tidy] Fix `modernize-use-nullptr` crash on 32-bit Windows (PR #160023)

2025-09-22 Thread Baranov Victor via cfe-commits
vbvictor wrote: > cc @AaronBallman as maintainer of AST matchers Should retry pinging after 6th of october (preferably give one more week), https://discourse.llvm.org/t/my-upcoming-availability/87851 https://github.com/llvm/llvm-project/pull/160023

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: After looking at the rule, I think we should place in "modernize" category: `modernize-avoud-setjmp-longjmp`. "bugprone" checks in general are expected to give only warnings for real problems: `setjmp` can be perfectly fine but it's not how exceptions sho

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -3,8 +3,6 @@ cert-err52-cpp == -This check flags all call expressions involving ``setjmp()`` and ``longjmp()``. - -This check corresponds to the CERT C++ Coding Standard rule -`ERR52-CPP. Do not use setjmp() or longjmp() -

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: code-lint failure would be fixed in https://github.com/llvm/llvm-project/pull/160014. https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/158151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: code-lint failure would be fixed in https://github.com/llvm/llvm-project/pull/160014. https://github.com/llvm/llvm-project/pull/158151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang-tools-extra] [llvm] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/4] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/158151 >From f24956299044d7278fa9de634fdd436d357fff1f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 11 Sep 2025 23:29:55 +0300 Subject: [PATCH] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-st

[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [clang-tidy] Remove 'clang-analyzer-*' checks from default che

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang-tools-extra] [llvm] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH 1/2] [clang-tidy] Remove 'clang-analyzer-*' checks from default

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,54 @@ + +//===--===// +// +// 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-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,31 @@ + +//===--===// +// +// 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-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-redundant-parentheses %t vbvictor wrote: By default test use `c++11-or-later`, could we manually set `c++98-or-later` because it should work in any standard? https://github.com/llvm/llvm-project/pull/15

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158462 ___ 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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][NFC] Enable 'readability-named-parameter' check (PR #158774)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: > > so I vote for keeping this check disable to avoid unnecessary churn > > I agree! It might however be worth briefly documenting why we want to keep > this check disabled, so we don't accidentally have the same discussion again > in the future. I'd convert `.clang-tidy` to Y

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158462 ___ 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,433 @@ +// RUN: %check_clang_tidy -check-suffix=ALL,CPP20ORLATER -std=c++20-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ +// RUN: %check_clang_tidy -check-suffix=ALL -std=c++17 %s modernize-use-structured-binding %t -- --

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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][NFC] Enable 'readability-named-parameter' check (PR #158774)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Do we really need it? IMO it is fine to keep parameter name empty when we > don't need it. I feel in current state it doesn't bring any readability in code, so I vote for keeping this check disable to avoid unnecessary churn https://github.com/llvm/llvm-project/pull/158

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,433 @@ +// RUN: %check_clang_tidy -check-suffix=ALL,CPP20ORLATER -std=c++20-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ +// RUN: %check_clang_tidy -check-suffix=ALL -std=c++17 %s modernize-use-structured-binding %t -- --

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158462 ___ 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158462 ___ 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -201,6 +201,11 @@ Changes in existing checks namespace are treated as the tag or the data part of a user-defined tagged union respectively. +- Improved :doc:`bugprone-unchecked-optional-access + ` check by supporting + `NullableValue::makeValue` and `NullableValue::m

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,48 @@ +.. title:: clang-tidy - bugprone-loop-variable-copied-then-modified + +bugprone-loop-variable-copied-then-modified +=== + +Detects when a loop variable is copied and then subsequently modified and +suggests replacing with a

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. vbvictor wrote: ```suggestion Finds places where struc

[clang-tools-extra] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests. (PR #156950)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: shell +// UNSUPPORTED: system-windows vbvictor wrote: Will the test not run on Windows anymore? This script is pretty important for users, so I don't think it's a good idea to remove it from windows test-suite https://github.com/ll

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,89 @@ +//===--===// +// +// 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: Apac

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-20 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor deleted https://github.com/llvm/llvm-project/pull/144313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [TEST] Add clang tidy premerge CI [WIP] (PR #154223)

2025-09-20 Thread Baranov Victor via cfe-commits
vbvictor wrote: Original PR was merged https://github.com/llvm/llvm-project/pull/154223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [TEST] Add clang tidy premerge CI [WIP] (PR #154223)

2025-09-20 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/154223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -201,6 +201,11 @@ Changes in existing checks namespace are treated as the tag or the data part of a user-defined tagged union respectively. +- Improved :doc:`bugprone-unchecked-optional-access + ` check by supporting + `NullableValue::makeValue` and `NullableValue::m

[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-simplify-boolean-expr' check (PR #158706)

2025-09-20 Thread Baranov Victor via cfe-commits
vbvictor wrote: > > > What do others think? > > > > I agree, I have somewhat mixed feelings about this rule. Also negating > > conditions to make them more optimal/short can also lead to worse > > readability. I believe this is alleviated by setting `SimplifyDeMorgan` to > > `false`. > > I w

[clang-tools-extra] [clang-tidy] add readability-redundant-parentheses (PR #159911)

2025-09-20 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Clang-format has [an option like > this](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#removeparentheses) > already. Unlike clang-format, we have full semantic information, so this > check has the potential to be more reliable, but I’m concerned about > duplicatin

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -201,6 +201,11 @@ Changes in existing checks namespace are treated as the tag or the data part of a user-defined tagged union respectively. +- Improved :doc:`bugprone-unchecked-optional-access + ` check by supporting + `NullableValue::makeValue` and `NullableValue::m

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

[clang-tools-extra] [clang-tidy][NFC] add comment in llvm-use-ranges for add_new_check.py (PR #159927)

2025-09-20 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, but does it matter if it already says "Yes" in "Offers fixes" in https://clang.llvm.org/extra/clang-tidy/checks/list.html https://github.com/llvm/llvm-project/pull/159927 ___ cfe-commits ma

[clang-tools-extra] [clang-tidy][NFC] add comment in llvm-use-ranges for add_new_check.py (PR #159927)

2025-09-20 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `bugprone-sizeof-expression` crash on arrays of dependent type (PR #159701)

2025-09-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/159701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,17 @@ +.. title:: clang-tidy - modernize-avoid-variadic-functions + +modernize-avoid-variadic-functions +== + +Find all function definitions (but not declarations) of C-style variadic +functions. + +Instead of C-style variadic functions,

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From d2d7a00a4199329e32557f6787462f4ade948cbc Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang-tools-extra] [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (PR #157468)

2025-09-18 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/157468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-18 Thread Baranov Victor via cfe-commits
@@ -1,10 +1,13 @@ .. title:: clang-tidy - cert-dcl50-cpp +.. meta:: + :http-equiv=refresh: 5;URL=../modernize/avoid-variadic-functions.html cert-dcl50-cpp == -This check flags all function definitions (but not declarations) of C-style -variadic functions. +The

[clang-tools-extra] [clang-tidy] Enable `modernize-return-braced-init-list`'s tests in C++11 (PR #158196)

2025-09-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: > There are checks that don't require any specific standard, there it would > make sense to keep whatever the default is. But this could also backfire for users that use "old" c++11. Imagine if the default standard is increased in `check_clang_tidy.py`, then the people who dev

[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

2025-09-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-loop-variable-copied-then-modified %t + +template +struct Iterator { + void operator++() {} + const T& operator*() { +static T* TT = new T(); +return *TT; + } + bool operator!=(const Iterator

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-09-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: > @vbvictor @5chmidti would you say it makes sense to cherry-pick these changes > to branch `release/21.x`? If yes, could you maybe edit this PR's milestones? Taking into account that we already have an official release (not RC) and reading from https://llvm.org/docs/HowToRelea

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-17 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Very interesting check, thank you for working on it! For now, looked only at tests/docs https://github.com/llvm/llvm-project/pull/158462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Baranov Victor via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -88,12 +90,22 @@ class FindEnumMember : public TypeVisitor { InvalidEnumDefaultInitializationCheck::InvalidEnumDefaultInitializationCheck( StringRef Name, ClangTidyContext *Context) -: ClangTidyCheck(Na

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Baranov Victor via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -70,3 +70,8 @@ enum type) are set to 0. enum Enum1 Array3[2][2] = {{Enum1_A, Enum1_A}}; // warn: elements of second array are initialized to 0 struct Struct1 S1 = {1}; // warn: element 'b' is initialized t

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: @carlosgalvezp, Do you like new doc style? If so I'd rebase and merge https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Baranov Victor via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -88,12 +90,22 @@ class FindEnumMember : public TypeVisitor { InvalidEnumDefaultInitializationCheck::InvalidEnumDefaultInitializationCheck( StringRef Name, ClangTidyContext *Context) -: ClangTidyCheck(Na

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Baranov Victor via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -219,6 +219,10 @@ Changes in existing checks ` check by adding detection for variables introduced by structured bindings. +- Improved :doc:`bugprone-invalid-enum-default-initialization + ` with new +

[clang-tools-extra] Revert "[clang-tidy] support query based custom check" (PR #159380)

2025-09-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: Could you share your system/compilers/cmake version for ease of reproduction? https://github.com/llvm/llvm-project/pull/159380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] [clang-tidy] Enable `modernize-return-braced-init-list`'s tests in C++11 (PR #158196)

2025-09-17 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. https://github.com/llvm/llvm-project/pull/158196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [WIP] Formatting suggestions in CI (PR #158779)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -1,7 +1,9 @@ name: "Check code formatting" permissions: - contents: read + contents: write vbvictor wrote: "issue-write.yaml" https://github.com/llvm/llvm-project/pull/158779 ___ cfe-commits mailing list cfe-c

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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 new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,67 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ vbvictor wrote: Is lambda-capture will be available in c++20 and onwards? If so, we should test it. (maybe you can merge bot

[clang-tools-extra] [llvm] [WIP] Formatting suggestions in CI (PR #158779)

2025-09-16 Thread Baranov Victor via cfe-commits
@@ -1,7 +1,9 @@ name: "Check code formatting" permissions: - contents: read + contents: write vbvictor wrote: The base permission is "read" due to security concerns. There is a different job that reads output from "comments" file and posts giithub comment

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/158480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >