[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
@@ -126,6 +126,11 @@ New checks reference. This may cause use-after-free errors if the caller uses xvalues as arguments. +- New :doc:`bugprone-pointer-arithmetic-on-polymorphic-object + ` check. + + Finds pointer arithmetic performed on classes that declare a virtual

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- PointerArithmeticOnPolymorphicObjectCheck.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:

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- PointerArithmeticOnPolymorphicObjectCheck.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:

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,61 @@ +.. title:: clang-tidy - bugprone-pointer-arithmetic-on-polymorphic-object + +bugprone-pointer-arithmetic-on-polymorphic-object += + +Finds pointer arithmetic performed on classes that declare a virtual function. +

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,61 @@ +.. title:: clang-tidy - bugprone-pointer-arithmetic-on-polymorphic-object + +bugprone-pointer-arithmetic-on-polymorphic-object += + +Finds pointer arithmetic performed on classes that declare a virtual function. +

[clang-tools-extra] [clang-tidy] Add `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/91951 ___ 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 `bugprone-pointer-arithmetic-on-polymorphic-object` check (PR #91951)

2024-06-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Few nits: - storeOptions needs fix - Consider excluding implicit code with TK_IgnoreUnlessSpelledInSource (not this may exclude also template instances, so I leave it up to you) - Documentation require small work - Make check

[clang-tools-extra] bc70c29 - [clang-tidy][DOC] Update doc for Clang Static Analyzer checks

2024-06-10 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-06-10T19:07:49Z New Revision: bc70c29558c6ecb53e61cc8d668768e919e81bde URL: https://github.com/llvm/llvm-project/commit/bc70c29558c6ecb53e61cc8d668768e919e81bde DIFF: https://github.com/llvm/llvm-project/commit/bc70c29558c6ecb53e61cc8d668768e919e81bde.diff LOG:

[clang-tools-extra] fix(clang-tools-extra/**.py): fix invalid escape sequences (PR #94028)

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

[clang-tools-extra] fix(clang-tools-extra/**.py): fix invalid escape sequences (PR #94028)

2024-06-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, I will merge this once I confirm that it still works. https://github.com/llvm/llvm-project/pull/94028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] fix(clang-tools-extra/**.py): fix comparison to None (PR #94013)

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

[clang-tools-extra] fix(clang-tools-extra/**.py): fix comparison to None (PR #94013)

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

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-06-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/93827 ___ 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 WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-10 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -292,11 +318,17 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult ) { diag(E->getBeginLoc(),

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-10 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. Overall LGTM. It doesn't look to break (by default) previous

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-10 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/94356 ___ cfe-commits

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

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

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-06-10 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Yes, you can just submit new PR, reference this one. https://github.com/llvm/llvm-project/pull/90043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,83 @@ +.. title:: clang-tidy - bugprone-exception-rethrow + +bugprone-exception-rethrow +== + +Identifies problematic exception rethrowing, especially with caught exception +variables or empty throw statements outside catch blocks. + +In C++

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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:

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 8ed57a657d9b87bfaaa5c4394fc3fcaf670ba94c Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/7] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

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

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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:

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-06-09 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- ExceptionRethrowCheck.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:

[clang-tools-extra] [clang-tidy] Improve bugprone-multi-level-implicit-pointer-conversion (PR #94524)

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

[clang-tools-extra] [clang-tidy] Extend modernize-use-designated-initializers with new options (PR #94651)

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

[clang-tools-extra] [clang-tidy] Ignore implicit functions in readability-implicit-bool-conversion (PR #94512)

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

[clang-tools-extra] [clang-tidy] Ignore non-math operators in readability-math-missing-parentheses (PR #94654)

2024-06-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/94654 ___ 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 smart pointers handling in bugprone-use-after-move (PR #94869)

2024-06-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/94869 - Removed custom smart pointers handling (were hiding issues) - Changed 'move occurred here' note location to always point to 'std::move' Closes #90174 >From 1179f63d792da2462e1490c1b0a59cf1e6e47349 Mon Sep

[clang-tools-extra] [clang-tidy] Ignore non-math operators in readability-math-missing-parentheses (PR #94654)

2024-06-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/94654 >From 5d37ba1925696582d752a45ceec605c8b6277543 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Thu, 6 Jun 2024 18:17:55 + Subject: [PATCH] [clang-tidy] Ignore non-math operators in

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-06-07 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Check if you can commit to sebwolf-de:avoid-bounds-error-check https://github.com/llvm/llvm-project/pull/90043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] refactor misc-header-include-cycle (PR #94697)

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

[clang-tools-extra] [clang-tidy] Ignore non-math operators in readability-math-missing-parentheses (PR #94654)

2024-06-06 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @11happy You may want to take a look. https://github.com/llvm/llvm-project/pull/94654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore non-math operators in readability-math-missing-parentheses (PR #94654)

2024-06-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/94654 Do not emit warnings for non-math operators. Closes #92516 >From 034026add71cc0ec09e7cb715bffef38c5533233 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Thu, 6 Jun 2024 18:17:55 + Subject: [PATCH]

[clang-tools-extra] [clang-tidy] Extend modernize-use-designated-initializers with new options (PR #94651)

2024-06-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/94651 Add StrictCStandardCompliance and StrictCppStandardCompliance options that default to true. Closes #83732 >From 1f166251b629c1fd9dd2e5b8ac64ee5976ee0724 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Thu,

[clang-tools-extra] [clang-tidy] Fix crash in readability-container-size-empty (PR #94527)

2024-06-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/94527 ___ 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 crashing when self include cycles for misc-header-include-cycle (PR #94636)

2024-06-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/94636 ___ 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 check misc-use-internal-linkage (PR #90830)

2024-06-06 Thread Piotr Zegar via cfe-commits
@@ -24,12 +24,28 @@ namespace { AST_MATCHER(Decl, isFirstDecl) { return Node.isFirstDecl(); } -AST_MATCHER_P(Decl, isInMainFile, FileExtensionsSet, HeaderFileExtensions) { +static bool isInMainFile(SourceLocation L, SourceManager , + const

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-06 Thread Piotr Zegar via cfe-commits
@@ -24,12 +24,28 @@ namespace { AST_MATCHER(Decl, isFirstDecl) { return Node.isFirstDecl(); } -AST_MATCHER_P(Decl, isInMainFile, FileExtensionsSet, HeaderFileExtensions) { +static bool isInMainFile(SourceLocation L, SourceManager , + const

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-06 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL deleted https://github.com/llvm/llvm-project/pull/90830 ___ 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 check misc-use-internal-linkage (PR #90830)

2024-06-06 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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:

[clang-tools-extra] [clang-tidy] Fix crash in readability-container-size-empty (PR #94527)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/94527 Fixed crash caused by call to getCookedLiteral on template user defined literal. Fix base on assert in getCookedLiteral method. Closes #94454 >From a19a71fdf5e421c6b79fc3d6ecf7212b090b13a1 Mon Sep 17 00:00:00

[clang-tools-extra] [clang-tidy] Improve bugprone-multi-level-implicit-pointer-conversion (PR #94524)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/94524 Ignore implicit pointer conversions that are part of a cast expression Closes #93959 >From bdff94eb18212005d059a5cbb8d649a356fdd301 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 5 Jun 2024 19:19:38

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

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

[clang-tools-extra] [clang-tidy] Ignore implicit functions in readability-implicit-bool-conversion (PR #94512)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/94512 Ignore implicit declarations and defaulted functions. Helps with issues in generated code like, C++ spaceship operator. Closes #93409 >From 22cd99f5288f53eb561a3040ce78c5143a9a7dad Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -193,3 +193,8 @@ Options When `true`, the check will warn on an expression like ``sizeof(expr)`` where the expression is a pointer to aggregate. Default is `true`. + +.. option:: WarnOnSizeOfPointer + + When `true`, the check will warn on an expression like

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -292,11 +318,17 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult ) { diag(E->getBeginLoc(), "suspicious usage of 'sizeof(char*)'; do you mean 'strlen'?") << E->getSourceRange(); - } else if (const auto *E = -

[clang-tools-extra] [clang-tidy] Add WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. +- LGTM, except nits. https://github.com/llvm/llvm-project/pull/94356 ___ 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 WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/94356 ___ 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 WarnOnSizeOfPointer mode to bugprone-sizeof-expression (PR #94356)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -193,3 +193,8 @@ Options When `true`, the check will warn on an expression like ``sizeof(expr)`` where the expression is a pointer to aggregate. Default is `true`. + +.. option:: WarnOnSizeOfPointer + + When `true`, the check will warn on an expression like

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. I accept this change as it's fine for 1.0 version Any fixed can be always done in this or new change. https://github.com/llvm/llvm-project/pull/90830 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-05 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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:

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-06-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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:

[clang-tools-extra] [clang-tidy] Fix assert in modernize-use-std-format/print (PR #94104)

2024-06-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/94104 ___ 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 assert in modernize-use-std-format/print (PR #94104)

2024-06-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94104 ___ 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 assert in modernize-use-std-format/print (PR #94104)

2024-06-03 Thread Piotr Zegar via cfe-commits
@@ -351,6 +351,10 @@ Changes in existing checks ` check to also handle calls to ``compare`` method. +- Improved :doc:`modernize-use-std-format` and PiotrZSL wrote: remove modernize-use-std-format from here, as it's new check, only leave std-print

[clang-tools-extra] [clang-tidy] Fix assert in modernize-use-std-format/print (PR #94104)

2024-06-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall LGTM, consider adding release note entry for modernize-use-std-print (as it were added in previous release) https://github.com/llvm/llvm-project/pull/94104 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] Fix assert in modernize-use-std-format/print (PR #94104)

2024-06-01 Thread Piotr Zegar via cfe-commits
@@ -20,6 +20,11 @@ namespace clang::tidy::modernize { namespace { AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); } +AST_MATCHER(QualType, isSimpleChar) { + const auto ActualType = Node.getTypePtr(); + return

[clang-tools-extra] [clang-tidy] Fix assert in modernize-use-std-format/print (PR #94104)

2024-06-01 Thread Piotr Zegar via cfe-commits
@@ -20,6 +20,11 @@ namespace clang::tidy::modernize { namespace { AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); } +AST_MATCHER(QualType, isSimpleChar) { + const auto ActualType = Node.getTypePtr(); + return

[clang-tools-extra] [clang-tidy] Fix assert in modernize-use-std-format/print (PR #94104)

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

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -41,3 +41,25 @@ The variables ``a``, ``c``, ``c_ptr1``, ``c_const_ptr`` and ``c_reference`` will all generate warnings since they are either a non-const globally accessible variable, a pointer or a reference providing global access to non-const data or both. + +Options

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -41,3 +41,25 @@ The variables ``a``, ``c``, ``c_ptr1``, ``c_const_ptr`` and ``c_reference`` will all generate warnings since they are either a non-const globally accessible variable, a pointer or a reference providing global access to non-const data or both. + +Options

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -1,29 +1,39 @@ -// RUN: %check_clang_tidy %s cppcoreguidelines-avoid-non-const-global-variables %t +// RUN: %check_clang_tidy %s -check-suffix=DEFAULT cppcoreguidelines-avoid-non-const-global-variables %t +// RUN: %check_clang_tidy %s -check-suffix=NAMESPACE

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
@@ -16,9 +15,12 @@ using namespace clang::ast_matchers; namespace clang::tidy::cppcoreguidelines { void AvoidNonConstGlobalVariablesCheck::registerMatchers(MatchFinder *Finder) { + auto NamespaceMatcher = Options.get("AllowAnonymousNamespace", false)

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

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

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-05-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. - storeOptions is missing - release notes need to be updated about added new option - tests need some love (reduce amount of changes) - what about "static" non const global variables I'm fine for having an options that control

[clang-tools-extra] [clang-tidy] Check number of arguments to size/length in readability-container-size-empty (PR #93724)

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

[clang-tools-extra] [clang-tidy] Check number of arguments to size/length in readability-container-size-empty (PR #93724)

2024-05-29 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: I'm not 100% sure about release-notes entry. If it shouldn't say that check is restricted now to zero-argument size/length. https://github.com/llvm/llvm-project/pull/93724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Check number of arguments to size/length in readability-container-size-empty (PR #93724)

2024-05-29 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/93724 Verify that size/length methods are called with no arguments. Closes #88203 >From 0e8c1ceb616d797298db720069e2eea937a9078e Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 29 May 2024 19:39:22 +

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/93217 >From 14e3f91ba749eec5be94a9cad370f794ad836fc8 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 22 May 2024 20:56:00 + Subject: [PATCH 1/2] [clang-tidy] Fix handling of members in

[clang-tools-extra] Update identifier-length.rst (PR #93467)

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

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/92659 ___ 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 check misc-use-internal-linkage (PR #90830)

2024-05-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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:

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-28 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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:

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-28 Thread Piotr Zegar via cfe-commits
@@ -387,6 +387,11 @@ Changes in existing checks ` check to properly emit warnings for static data member with an in-class initializer. +- Improved :doc:`readability-redundant-member-init + ` check to avoid + false-positives when type of the member does not match type of

[clang-tools-extra] Update identifier-length.rst (PR #93467)

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

[clang-tools-extra] [llvm] [clang-tools-extra] Revise IDE folder structure (PR #89744)

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

[clang-tools-extra] [llvm] [clang-tools-extra] Revise IDE folder structure (PR #89744)

2024-05-25 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > > For me this entire change doesn't make sense. > > Could you elaborate on why? This is basically names passed as FOLDER property are very generic. My main confusion where with clangTidyMiscModule library, but as this is semi-redundant. Then this change is +- fine.

[clang-tools-extra] [run-clang-tidy.py] Refactor, add progress indicator, add type hints (PR #89490)

2024-05-23 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @nicovank Overall looks fine from functionality point of view. Problem A) Getting bunch of ``` task: wait_for= cb=[as_completed.._on_completion() at /usr/lib/python3.12/asyncio/tasks.py:618]> Task was destroyed but it is pending! ``` When CTR+C a script. More graceful

[clang-tools-extra] [clang-tidy] Optimize realpath in readability-identifier-naming (PR #92659)

2024-05-23 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: No need for release notes as this realpath stuff were added in this release anyway. So this is just a fix for degradation. https://github.com/llvm/llvm-project/pull/92659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (PR #92241)

2024-05-23 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/92241 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy] Fix handling of members in readability-redundant-member-init (PR #93217)

2024-05-23 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/93217 Compare class type instead of just assuming that called constructor belong to same class. Fixes #91605 >From 6402bdd7555b8804ca4a2c392695fa81e8a87c4e Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 22

[clang-tools-extra] [clang-tidy][NFCI] Simplify bugprone-sizeof-expression (PR #93024)

2024-05-22 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. LGTM (if tests pass) https://github.com/llvm/llvm-project/pull/93024 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 8ed57a657d9b87bfaaa5c4394fc3fcaf670ba94c Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/6] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,103 @@ +// RUN: %check_clang_tidy %s bugprone-exception-rethrow %t -- -- -fexceptions + +struct exception {}; + +namespace std { PiotrZSL wrote: that's a job for separate change, as std::move is duplicated in multiple test files.

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From c99ba980b0b242fced57fb323c5069d856c68810 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 31 Mar 2024 12:16:53 + Subject: [PATCH 1/6] fix --- clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 01/10] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/9] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/8] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/7] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/5] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] Added bugprone-exception-rethrow check (PR #86448)

2024-05-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/86448 >From 1b5c351acca7375c577111a4c55506146ef108ef Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sun, 24 Mar 2024 18:39:54 + Subject: [PATCH 1/6] [clang-tidy] Added bugprone-exception-rethrow check

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-21 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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:

[clang-tools-extra] [clang-tidy] Rename out-of-line function definitions (PR #91954)

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

[clang-tools-extra] [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (PR #92241)

2024-05-21 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: @@ -267,6 +275,10 @@ void ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) { auto BoolXor = binaryOperator(hasOperatorName("^"),

[clang-tools-extra] [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (PR #92241)

2024-05-21 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Bj=C3=B6rn?= Svensson , =?utf-8?q?Bj=C3=B6rn?= Svensson , =?utf-8?q?Bj=C3=B6rn?= Svensson Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. LGTM, just nits https://github.com/llvm/llvm-project/pull/92241 ___

[clang-tools-extra] [clang-tidy] Correcting issues in `readability-implicit-bool-conversion` on C23 (PR #92241)

2024-05-21 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson , =?utf-8?q?Björn?= Svensson Message-ID: In-Reply-To: https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/92241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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