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

2025-09-11 Thread Baranov Victor via cfe-commits
@@ -138,9 +138,9 @@ void UseIntegerSignComparisonCheck::check( return; const Expr *SubExprLHS = nullptr; const Expr *SubExprRHS = nullptr; - SourceRange R1 = SourceRange(LHS->getBeginLoc()); - SourceRange R2 = SourceRange(BinaryOp->getOperatorLoc()); - SourceRange R3

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

2025-09-11 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed 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] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-11 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/154746 ___ 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 google-runtime-float Clang-Tidy check (PR #156763)

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

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

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: shell +// UNSUPPORTED: system-windows vbvictor wrote: Yeah, that's unfortunate. I also found this in test results: ``` ``` >From >[this](https://github.com/llvm/llvm-project/actions/runs/17517903882/job/49757841499?pr=157285) > a

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -263,6 +263,10 @@ Changes in existing checks ` check to avoid false positives on pure virtual member functions. +- Improved :doc:`readability-container-contains + ` to support string + comparisons to ``npos``. vbvictor wrote: Could you also add that

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/156763 ___ 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 google-runtime-float Clang-Tidy check (PR #156763)

2025-09-09 Thread Baranov Victor via cfe-commits
vbvictor wrote: > > I think this can go straight into `portability`. Also linking this recent > > related PR: #146970. > > It could go there and then have an alias to `google` if wanted maybe? I'm weak +1 on this, `portability-avoid-long-double` maybe? But if anything happens, we could add al

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

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: shell +// UNSUPPORTED: system-windows vbvictor wrote: Could you share info what you found (if any) so we would fix tests and enable them in the future? https://github.com/llvm/llvm-project/pull/156950 __

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

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: shell +// UNSUPPORTED: system-windows vbvictor wrote: Thank you! https://github.com/llvm/llvm-project/pull/156950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2025-09-09 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] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -166,6 +166,10 @@ New checks New check aliases ^ +- New alias :doc:`bugprone-unchecked-string-to-number-conversion vbvictor wrote: @EugeneZelenko, do you have any remarks on the new text in ReleaseNotes? Otherwise, I'd merge the PR. https

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

2025-09-08 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, thank you 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][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

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

[clang-tools-extra] [clang-tidy] Minor documentation wording for performance-noexcept-move-constructor (PR #157384)

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

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

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

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `NoLintDirectiveHandler` (PR #147553)

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

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

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

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

2025-09-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: Do you wish to have this merged or wait for your commit approval (it can take 2-3week if unlucky)? https://github.com/llvm/llvm-project/pull/157123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

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

2025-09-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Perhaps having a section for "Breaking changes" or otherwise "Stuff you need > to take action on" would help. I support this, another solution could be bold text or preamble like "Important ⚠️". But I think dedicated section is the best. https://github.com/llvm/llvm-pr

[clang-tools-extra] [clang-tidy] make `misc-const-correctness` work with `auto` variables and lambdas (PR #157319)

2025-09-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: I don't know how hard it is to achieve, but I'd like to have 2 distinct options: one for "normal" local variables, another for lambdas https://github.com/llvm/llvm-project/pull/157319 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang-tools-extra] [clang-tidy] make `misc-const-correctness` work with `auto` variables and lambdas (PR #157319)

2025-09-07 Thread Baranov Victor via cfe-commits
vbvictor wrote: I think Piotr's comment on the original review is still valid: - Missing configuration option for this change (changing default behavior) - Missing documentation update - Tests for auto&&, auto* etc.. https://github.com/llvm/llvm-project/pull/157319

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-07 Thread Baranov Victor via cfe-commits
@@ -166,6 +166,10 @@ New checks New check aliases ^ +- New alias :doc:`bugprone-unchecked-string-to-number-conversion vbvictor wrote: How about the new wording? I'd like to point out that initial `cert` will not be deleted. https://github.co

[clang-tools-extra] [clang-tidy] Remove global options IgnoreMacros and StrictMode (PR #157049)

2025-09-07 Thread Baranov Victor via cfe-commits
@@ -126,6 +126,11 @@ Improvements to clang-tidy - Improved :program:`clang-tidy` option `-quiet` by suppressing diagnostic count messages. +- Removed :program:`clang-tidy`'s global options `IgnoreMacros` and + `StrictMode`, which were documented as deprecated since + :prog

[clang-tools-extra] [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-09-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154416 >From dab1d21d7561fcaa9cfcbf8b77384e5ad2c11a6d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 29 Aug 2025 17:32:50 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new -hide-progress option to tidy-script

[clang-tools-extra] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-07 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - bugprone-unchecked-string-to-number-conversion vbvictor wrote: This file is copy-paste from previos `err34-c.rst` https://github.com/llvm/llvm-project/pull/157285 ___ cfe-commi

[clang-tools-extra] [clang-tidy] Add new check 'llvm-use-ranges' (PR #152047)

2025-09-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/152047 ___ 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 '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/154416 ___ 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 google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,78 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157285 >From 7e840223731c6750f3d884a63ab7fd67f43494a1 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 19:16:53 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-n

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

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/157306 Closes https://github.com/llvm/llvm-project/issues/146482. >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [cl

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157285 >From d94e0b12914e64a851f5a41cd5bbfb982ed285de Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 19:16:53 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-n

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/157285 ___ 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-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
vbvictor wrote: FYI, I created a tracking-progress issue https://github.com/llvm/llvm-project/issues/157287. https://github.com/llvm/llvm-project/pull/157285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
vbvictor wrote: > The commit message title can be a bit misleading, I read it as "create a new > alias in bugprone, which points to the cert check", but in reality the > intention is the other way around, alias from bugprone to cert. Yeah, it was tricky to write. I hope "rename" would be more

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157285 >From d94e0b12914e64a851f5a41cd5bbfb982ed285de Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 19:16:53 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-n

[clang-tools-extra] [clang-tidy] Rename 'cert-err34-c' to 'bugprone-unchecked-string-to-number-conversion' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/157285 ___ 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 alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/157285 ___ 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 alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,35 @@ +//===--===// vbvictor wrote: This file is mostly copypaste from `StrToNumCheck.h` https://github.com/llvm/llvm-project/pull/157285 _

[clang-tools-extra] [clang-tidy] Add new alias 'bugprone-unchecked-string-to-number-conversion' for 'cert-err34-c' (PR #157285)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/157285 My goal is to place all implementation of `cert` checks into `bugprone` or other modules. It's hard for the user to understand what `cert-err34-c` means, so we should always have human-readable alias for `cert

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,39 @@ +// RUN: %check_clang_tidy %s google-runtime-float %t + +long double foo; +// CHECK-MESSAGES: :[[@LINE-1]]:1: warning: 'long double' type is not portable and should not be used [google-runtime-float] + +typedef long double MyLongDouble; +// CHECK-MESSAGES: :[[@LI

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -11,6 +11,7 @@ add_clang_library(clangTidyGoogleModule STATIC DefaultArgumentsCheck.cpp ExplicitConstructorCheck.cpp ExplicitMakePairCheck.cpp + FloatTypesCheck.cpp vbvictor wrote: Sure, but I don't see any benefits in keeping them consistent. https

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-06 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-09-06 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154416 >From 0f0db33a875736a5a0527695316c6820a65ad529 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 29 Aug 2025 17:32:50 +0300 Subject: [PATCH 1/2] [clang-tidy] Add new -hide-progress option to tidy-script

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

2025-09-05 Thread Baranov Victor via cfe-commits
vbvictor wrote: @flovent, I believe you can file a request to grant commit access for LLVM (and become a member) if you wish. See `label:infra:commit-access-request` in issues. https://github.com/llvm/llvm-project/pull/157123 ___ cfe-commits mailing

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,78 @@ +//===--===// +// +// 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-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, just formatting need to be fixed 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-

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

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: I will land changed at the end of the week https://github.com/llvm/llvm-project/pull/132924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, thank you https://github.com/llvm/llvm-project/pull/157123 ___ 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-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited 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] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/132924 ___ 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-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited 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] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// 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] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// 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] Do not crash when an empty directory is used in the comp… (PR #156873)

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/156873 ___ 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 bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %check_clang_tidy %s bugprone-derived-method-shadowing-base-method %t + +class Base +{ +void method(); +void methodWithArg(int I); + +virtual Base* getThis() = 0; +}; + +class A : public Base +{ +public: +void method(); +// CHECK-MESSAGE

[clang-tools-extra] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %check_clang_tidy %s bugprone-derived-method-shadowing-base-method %t + +class Base +{ +void method(); +void methodWithArg(int I); + +virtual Base* getThis() = 0; +}; + +class A : public Base +{ +public: +void method(); +// CHECK-MESSAGE

[clang-tools-extra] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// 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] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// 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] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,124 @@ +// RUN: %check_clang_tidy %s bugprone-derived-method-shadowing-base-method %t + +class Base +{ +void method(); +void methodWithArg(int I); + +virtual Base* getThis() = 0; +}; + +class A : public Base +{ +public: +void method(); +// CHECK-MESSAGE

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

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited 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] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,53 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +template +const TargetType *getAs(const NodeType *Node) { + if constexpr (std::is_same_v) +return Node->template get(); + else +return llvm::dyn_cast(Node); +}

[clang-tools-extra] [llvm] [clang-tidy] modernize-use-std-format: Correct replacement types when signed stdint types are used, and when enums are printed in hex. #150343 (PR #155200)

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor requested changes to this pull request. Please write tests for your patch. https://github.com/llvm/llvm-project/pull/155200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-09-05 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/132924 ___ 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-05 Thread Baranov Victor via cfe-commits
@@ -245,6 +245,9 @@ Changes in existing checks ` check by adding the option `IgnoreAliasing`, that allows not looking at underlying types of type aliases. +- Improved :doc:`bugprone-unchecked-optional-access + ` check by supporting `NullableValue::makeValue` and `Nullab

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-convert-member-functions-to-static` in the codebase (PR #156265)

2025-09-05 Thread Baranov Victor via cfe-commits
vbvictor wrote: I mostly agree with carlosgalvezp, maybe a put this check into the list prematurely, sorry for that. What I particularly don't like is that it tries to convert `const` members to `static`. I believe if the author intended to use `const`, let him do it. (Maybe we can create an

[clang-tools-extra] [clang-tidy] Remove global options IgnoreMacros and StrictMode (PR #157049)

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

[clang-tools-extra] [clang-tidy] Remove global options IgnoreMacros and StrictMode (PR #157049)

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

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

2025-09-05 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Note that this check currently has false negatives on strings. I guess this doesn't hold us back from enabling this check given it's a false-negative. https://github.com/llvm/llvm-project/pull/157123 ___ cfe-commits mailing list cfe

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,34 @@ +//===--===// +// +// 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-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -11,6 +11,7 @@ add_clang_library(clangTidyGoogleModule STATIC DefaultArgumentsCheck.cpp ExplicitConstructorCheck.cpp ExplicitMakePairCheck.cpp + FloatTypesCheck.cpp vbvictor wrote: We generally name files after check name. I had difficulty of finding

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-05 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,78 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-09-04 Thread Baranov Victor via cfe-commits
@@ -258,6 +258,11 @@ def main(): help="Upgrades clang-tidy warnings to errors. Same format as '-checks'.", default="", ) +parser.add_argument( +"-hide-progress", vbvictor wrote: I initially implemented everything under `-quiet`

[clang-tools-extra] [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-09-03 Thread Baranov Victor via cfe-commits
@@ -258,6 +258,11 @@ def main(): help="Upgrades clang-tidy warnings to errors. Same format as '-checks'.", default="", ) +parser.add_argument( +"-hide-progress", vbvictor wrote: One downside of this could be such command: `run-

[clang-tools-extra] [clang-tidy] Fix `readability-uppercase-literal-suffix` warning with hex literals (PR #156584)

2025-09-02 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/156584 ___ 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 `readability-uppercase-literal-suffix` warning with hex literals (PR #156584)

2025-09-02 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. https://github.com/llvm/llvm-project/pull/156584 ___ 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 'llvm-use-ranges' (PR #152047)

2025-09-01 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/152047 >From bb17fb65d031190efff6a6ec1c0ca6d9c0d35abb Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 5 Aug 2025 01:15:02 +0300 Subject: [PATCH 1/7] [clang-tidy] Add new check 'llvm-use-ranges' --- .../clan

[clang-tools-extra] [clang-tidy] Ignore default ctor with user provided argument in `readability-container-size-empty` (PR #154782)

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

[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-redundant-declaration' check in clang-tidy config (PR #156164)

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

[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-redundant-declaration' check in clang-tidy config (PR #156164)

2025-08-30 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/156164 Closes https://github.com/llvm/llvm-project/issues/156163 >From b3aa1b3c24680dcaff3dee3ec5f82a23b343b018 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 30 Aug 2025 11:13:44 +0300 Subject: [PATCH] [cl

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

2025-08-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. https://github.com/llvm/llvm-project/pull/131804 ___ 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 '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-08-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/154416 ___ 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 '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-08-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping @carlosgalvezp @HerrCai0907 @5chmidti @PiotrZSL for opinions. I believe we should not bloat scripts with many options but separating "quiet" from "progress" seem beneficial, hence new option is introduced. https://github.com/llvm/llvm-project/pull/154416 _

[clang-tools-extra] [clang-tidy] Add new '-hide-progress' option to tidy-scripts for suppressing progress information (PR #154416)

2025-08-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: > I actually like the progress information (the rest not so much) and it might > give an indication if it is stuck or still running. It also contains > information (timing) to compare between runs and indicate which files are hot > spots. I reworked my implementation by adding

[clang-tools-extra] [clang-tidy] Improve "-quiet" option in tidy-scripts by suppressing progress information (PR #154416)

2025-08-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154416 >From dab1d21d7561fcaa9cfcbf8b77384e5ad2c11a6d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 29 Aug 2025 17:32:50 +0300 Subject: [PATCH] [clang-tidy] Add new -hide-progress option to tidy-scripts fo

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-29 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thank you for the improvements of the check! Did you try running on LLVM code to check for any miscodegen/FP? https://clang.llvm.org/extra/clang-tidy/#running-clang-tidy-in-parallel https://github.com/llvm/llvm-project/pull/155982 ___

[clang-tools-extra] [clang-tidy][NFC] Add custom .clang-format with 'QualifierAlignment: Left' (PR #155852)

2025-08-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/155852 ___ 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 bugprone-method-hiding check (PR #154746)

2025-08-28 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,141 @@ +//===--===// +// +// 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] Add custom .clang-format with 'QualifierAlignment: Left' (PR #155852)

2025-08-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/155852 ["QualifierAlignment: Left"](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#qualifieralignment) is an established way of writing code in `clang-tools-extra/clang-tidy`. We should enforce it in CI.

[clang-tools-extra] [clang-tidy] Add detection in container's method except `empty` in `readability-container-size-empty` (PR #154017)

2025-08-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/154017 ___ 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 bugprone-method-hiding check (PR #154746)

2025-08-28 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,35 @@ +//===--===// +// +// 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-tools-extra] Add WarnOnModificationOfCopiedLoopVariable to performance-for-range-c… (PR #155731)

2025-08-27 Thread Baranov Victor via cfe-commits
vbvictor wrote: As an alternative solution, your Idea can be a separate check but you should file an issue first to gather some initial feedback. https://github.com/llvm/llvm-project/pull/155731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2025-08-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From b9e917fb7da29c1dc70e0e89b972fc3e2a631b4f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 21 Aug 2025 21:20:33 +0300 Subject: [PATCH 1/5] Add clang-tidy violations for testing purpose --- .../cl

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

2025-08-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From b9e917fb7da29c1dc70e0e89b972fc3e2a631b4f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 21 Aug 2025 21:20:33 +0300 Subject: [PATCH 1/6] Add clang-tidy violations for testing purpose --- .../cl

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

2025-08-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From b9e917fb7da29c1dc70e0e89b972fc3e2a631b4f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 21 Aug 2025 21:20:33 +0300 Subject: [PATCH 1/5] Add clang-tidy violations for testing purpose --- .../cl

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

2025-08-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From b9e917fb7da29c1dc70e0e89b972fc3e2a631b4f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 21 Aug 2025 21:20:33 +0300 Subject: [PATCH 1/5] Add clang-tidy violations for testing purpose --- .../cl

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-27 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,30 @@ +.. title:: clang-tidy - bugprone-method-hiding + +bugprone-method-hiding += + +Finds derived class methods that hide a (non-virtual) base class method. + +In order to be considered "hiding", methods must have the same signature +(i.e. the

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

2025-08-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From b9e917fb7da29c1dc70e0e89b972fc3e2a631b4f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 21 Aug 2025 21:20:33 +0300 Subject: [PATCH 01/10] Add clang-tidy violations for testing purpose --- .../

  1   2   3   4   5   6   7   8   9   10   >