https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/138282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,40 @@
+//===--- UseEnumClassCheck.h - clang-tidy ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/vbvictor approved this pull request.
LGTM, few nits with docs.
Ping, @HerrCai0907, @carlosgalvezp, @PiotrZSL if you wish to leave a review.
I suppose in 1-2 weeks I'll land the PR.
https://github.com/llvm/llvm-project/pull/138282
__
@@ -0,0 +1,40 @@
+//===--- UseEnumClassCheck.h - clang-tidy ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
vbvictor wrote:
I have a mixed feeling about whether we should always exclude all coroutines by
default or not.
When a coroutine has only one `co-operator` and nothing else should be safe to
use a reference parameter? Am I wrong?
So I think to be "on a safe side" I'd suggest a new option "Ingo
vbvictor wrote:
@stellar-aria, 21th LLVM release will be soon and the PR is 95% ready to land
even if some corner-cases are not matched.
Do you wish to rebase on fresh main and after a quick re-review the check
should be ready to land.
https://github.com/llvm/llvm-project/pull/127430
_
vbvictor wrote:
@DeNiCoN, do you mind if this PR would be closed (or converted to draft at
least)?
I'm in the process of reviewing old PR to lower the number of open ones for
ease of tracking.
This PR could be reopened if needed.
https://github.com/llvm/llvm-project/pull/123734
___
vbvictor wrote:
@thorsten-klein, gentle ping, do you still wish to work on this check?
21th LLVM release will be soon, If you wish to have your changes in the
upcoming release please rebase on main and fix issues suggested by HerrCai0907.
https://github.com/llvm/llvm-project/pull/124265
___
vbvictor wrote:
Gentle ping @PiotrZSL
https://github.com/llvm/llvm-project/pull/126434
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
Closed as further review happens in
https://github.com/llvm/llvm-project/pull/131804
https://github.com/llvm/llvm-project/pull/123734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -0,0 +1,63 @@
+// RUN: %check_clang_tidy %s performance-noexcept-move-constructor %t -- --
-fexceptions
+
+// RUN: %check_clang_tidy -check-suffix=CONFIG %s
performance-noexcept-move-constructor,performance-noexcept-destructor %t -- \
+// RUN: -config="{CheckOptions:
{perfor
@@ -0,0 +1,63 @@
+// RUN: %check_clang_tidy %s performance-noexcept-move-constructor %t -- --
-fexceptions
vbvictor wrote:
Generally with options-test-file we do not need to check basic functionality
since it should be covered in main test file
https://github
https://github.com/vbvictor commented:
@Nechda, gentle ping, do you still wish to work on this PR? 21th LLVM release
will be soon, If you wish to have your changes in the upcoming release please
rebase on main and fix suggestions.
https://github.com/llvm/llvm-project/pull/126897
__
vbvictor wrote:
@khuldraeseth, gentle ping, do you still wish to work on this check? 21th LLVM
release will be soon, If you wish to have your changes in the upcoming release
please rebase on main and fix suggested issues
https://github.com/llvm/llvm-project/pull/129406
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/126897
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,35 @@
+.. title:: clang-tidy - cppcoreguidelines-use-enum-class
+
+cppcoreguidelines-use-enum-class
+
+
+Finds unscoped (non-class) ``enum`` declarations and suggests using
+``enum class`` instead.
+
+This check implements `Enum.3
---
@@ -0,0 +1,35 @@
+.. title:: clang-tidy - cppcoreguidelines-use-enum-class
+
+cppcoreguidelines-use-enum-class
+
+
+Finds unscoped (non-class) ``enum`` declarations and suggests using
+``enum class`` instead.
+
+This check implements `Enum.3
---
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/138282
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/141345
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -157,3 +157,17 @@ namespace PR92516 {
for (j = i + 1, 2; j < 1; ++j) {}
}
}
+
+namespace PR141249 {
+ void AssignAsParentBinOp(int* netChange, int* nums, int k, int i) {
+//CHECK-MESSAGES: :[[@LINE+1]]:30: warning: '-' has higher precedence than
'^'; add parenthe
@@ -157,3 +157,17 @@ namespace PR92516 {
for (j = i + 1, 2; j < 1; ++j) {}
}
}
+
+namespace PR141249 {
+ void AssignAsParentBinOp(int* netChange, int* nums, int k, int i) {
+//CHECK-MESSAGES: :[[@LINE+1]]:30: warning: '-' has higher precedence than
'^'; add parenthe
https://github.com/vbvictor commented:
Sorry for late notice, but I see there is also CHECK-FIXES in this check, could
you please add them and I can merge the PR.
I don't know why tests didn't fail because of it, needs some investigation.
https://github.com/llvm/llvm-project/pull/141345
__
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/142839
Finds function and variable declarations inside anonymous namespace and
suggests replacing them with ``static`` declarations.
The check will enforce that
[restrict-visibility](https://llvm.org/docs/CodingStan
vbvictor wrote:
@AaronBallman, may you give some feedback on how good/bad this check would play
on LLVM project in general.
I feel it may be even "too strict" for whole LLVM, but for clang-tidy project
it may be very helpful in guiding new contributors writing the right way.
https://github.co
@@ -0,0 +1,200 @@
+//===--- BoolBitwiseOperationCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,40 @@
+.. title:: clang-tidy - performance-bool-bitwise-operation
+
+performance-bool-bitwise-operation
+==
+
+Finds potentially inefficient use of bitwise operators such as ``&``,
+``|`` and their compound analogues on boolean values wh
@@ -0,0 +1,200 @@
+//===--- BoolBitwiseOperationCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,40 @@
+.. title:: clang-tidy - performance-bool-bitwise-operation
+
+performance-bool-bitwise-operation
+==
+
+Finds potentially inefficient use of bitwise operators such as ``&``,
+``|`` and their compound analogues on boolean values wh
https://github.com/vbvictor closed
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
vbvictor wrote:
I'm in the process of looking at old/duplicate PRs to lower number of ongoing
open requests (currently 87) so closing would be helpful.
https://github.com/llvm/llvm-project/pull/90043
___
cfe-commits mailing list
cfe-commits@lists.llvm
vbvictor wrote:
@pizzud, you wish to continue work on this PR? 21th release of LLVM would be in
late July, we have time to prepare and merge this check before the release.
Also, It's okay to not cover all cases in the first iteration, some
improvements can be added in later patches.
Windows b
vbvictor wrote:
Closed as now review process is done in
https://github.com/llvm/llvm-project/pull/95220
https://github.com/llvm/llvm-project/pull/90043
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/vbvictor requested changes to this pull request.
Since you de-facto added this option to `performance-noexcept-destructor` check
too, please add it to `performance-noexcept-destructor.rst` docs (just
copypaste), add to ReleaseNotes and add a separate test-file for noexcept
d
@@ -0,0 +1,46 @@
+// RUN: %check_clang_tidy -check-suffix=CONFIG %s
performance-noexcept-move-constructor,performance-noexcept-destructor %t -- \
+// RUN: -config="{CheckOptions:
{performance-noexcept-move-constructor.AllowFalseEvaluated: true}}" \
+// RUN: -- -fexceptions
+
+na
@@ -33,6 +34,10 @@ class NoexceptFunctionBaseCheck : public ClangTidyCheck {
return TK_IgnoreUnlessSpelledInSource;
}
+ void storeOptions(ClangTidyOptions::OptionMap &Opts) override {
vbvictor wrote:
Please place definition in .cpp file
https://github
@@ -22,7 +22,8 @@ namespace clang::tidy::performance {
class NoexceptFunctionBaseCheck : public ClangTidyCheck {
public:
NoexceptFunctionBaseCheck(StringRef Name, ClangTidyContext *Context)
- : ClangTidyCheck(Name, Context) {}
+ : ClangTidyCheck(Name, Context),
@@ -110,6 +110,12 @@ Changes in existing checks
` check by providing additional
examples and fixing some macro related false positives.
+- Improved :doc:`performance-noexcept-move-constructor
+ ` check by adding
+ a new (off-by-default) option `AllowFalseEvaluated`, whic
@@ -253,6 +253,12 @@ Changes in existing checks
` check by fixing
some false positives involving smart pointers to arrays.
+- Improved :doc:`performance-noexcept-move-constructor
vbvictor wrote:
Please place this in alphabetical order (by check name).
Sho
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/126897
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,46 @@
+// RUN: %check_clang_tidy -check-suffix=CONFIG %s
performance-noexcept-move-constructor,performance-noexcept-destructor %t -- \
+// RUN: -config="{CheckOptions:
{performance-noexcept-move-constructor.AllowFalseEvaluated: true}}" \
+// RUN: -- -fexceptions
+
+na
@@ -0,0 +1,46 @@
+// RUN: %check_clang_tidy -check-suffix=CONFIG %s
performance-noexcept-move-constructor,performance-noexcept-destructor %t -- \
+// RUN: -config="{CheckOptions:
{performance-noexcept-move-constructor.AllowFalseEvaluated: true}}" \
+// RUN: -- -fexceptions
+
+na
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/126897
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
Could you please rebase on fresh main, and I will land the changes.
https://github.com/llvm/llvm-project/pull/141391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
I think we generally discussed such changes in
https://github.com/llvm/llvm-project/pull/138283,
CC @nicovank.
Maybe we need to come to consensus in clang-tidy whether we should write
`assert()` after `Result.Nodes.getNodeAs<>`. (There are many-many places that
has `assert` an
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/131669
>From 2b4699fda6854235cf59c69d1bf511bd12799c43 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Fri, 6 Jun 2025 18:46:11 +0300
Subject: [PATCH 1/2] [clang-tidy] count ctor-initializers as statements in
func
@@ -39,21 +39,28 @@ intCastExpression(bool IsSigned,
// std::cmp_{} functions trigger a compile-time error if either LHS or RHS
// is a non-integer type, char, enum or bool
// (unsigned char/ signed char are Ok and can be used).
- auto IntTypeExpr = expr(hasType(hasCanon
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/131669
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/131669
>From 2b4699fda6854235cf59c69d1bf511bd12799c43 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Fri, 6 Jun 2025 18:46:11 +0300
Subject: [PATCH] [clang-tidy] count ctor-initializers as statements in
function
vbvictor wrote:
Please add entry in ReleaseNotes.rst (should be in alphabetical order by check
name) and fix carlosgalvezp's final comment. After that should be ready for
merge
https://github.com/llvm/llvm-project/pull/124265
___
cfe-commits mailing
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/141345
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -187,6 +187,11 @@ Changes in existing checks
` check by fixing a false positive
where ``strerror`` was flagged as MT-unsafe.
+- Improved :doc:`google-readability-namespace-comments
vbvictor wrote:
Could we add also an entry for `llvm-readability-namesp
vbvictor wrote:
I think the default behavior of the option should be to ignore all coroutines -
that will be to make ordinary users safe.
https://github.com/llvm/llvm-project/pull/140912
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
@@ -187,6 +187,11 @@ Changes in existing checks
` check by fixing a false positive
where ``strerror`` was flagged as MT-unsafe.
+- Improved :doc:`google-readability-namespace-comments
vbvictor wrote:
No need for new tests, I can see that previously tests
https://github.com/vbvictor approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/124265
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,86 @@
+.. title:: clang-tidy - bugprone-unsequenced-global-accesses
+
+bugprone-unsequenced-global-accesses
+
+
+Finds unsequenced actions (i.e. unsequenced write and read/write)
+on global variables nested in functions in the same tr
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/130421
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,72 @@
+.. title:: clang-tidy - bugprone-conflicting-global-accesses
+
+bugprone-conflicting-global-accesses
+
+
+Finds conflicting accesses on global variables.
+
+Modifying twice or reading and modifying a memory location without a
+
https://github.com/vbvictor requested changes to this pull request.
Generally good check idea, but needs some polishing.
- Neither `modernize-make-function-to-direct` nor `modernize-make-direct`
sounds clear to me (specifically `direct` part), the main purpose of this
transformation is to use `
@@ -124,6 +124,12 @@ New checks
pointer and store it as class members without handle the copy and move
constructors and the assignments.
+- New :doc:`modernize-make-direct `
check.
+
+ Converts std::make_* function calls to direct constructor calls using CTAD.
--
@@ -0,0 +1,46 @@
+.. title:: clang-tidy - modernize-make-direct
+
+modernize-make-direct
vbvictor wrote:
Sync check name accross all files, somewhere you have "MakeFunctionToDirect".
https://github.com/llvm/llvm-project/pull/118120
__
@@ -0,0 +1,78 @@
+//===--- MakeFunctionToDirectCheck.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: Apach
@@ -0,0 +1,39 @@
+//===--- MakeFunctionToDirectCheck.h - clang-tidy --*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apach
@@ -124,6 +124,12 @@ New checks
pointer and store it as class members without handle the copy and move
constructors and the assignments.
+- New :doc:`modernize-make-direct `
check.
vbvictor wrote:
Please format alphabetically and place doc string same as
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/118120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,78 @@
+//===--- MakeFunctionToDirectCheck.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: Apach
@@ -50,6 +50,7 @@ add_clang_library(clangTidyModernizeModule STATIC
UseTransparentFunctorsCheck.cpp
UseUncaughtExceptionsCheck.cpp
UseUsingCheck.cpp
+ MakeFunctionToDirectCheck.cpp
vbvictor wrote:
Please format alphabetically
https://github.com/llvm/ll
@@ -125,6 +126,8 @@ class ModernizeModule : public ClangTidyModule {
CheckFactories.registerCheck(
"modernize-use-uncaught-exceptions");
CheckFactories.registerCheck("modernize-use-using");
+CheckFactories.registerCheck(
+"modernize-make-direct");
--
@@ -0,0 +1,78 @@
+//===--- MakeFunctionToDirectCheck.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: Apach
@@ -0,0 +1,180 @@
+// RUN: %check_clang_tidy %s misc-const-correctness %t -- \
+// RUN: -config="{CheckOptions: {\
+// RUN: misc-const-correctness.AllowedTypes:
'[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;qualified::Type;::fully::QualifiedType;ConstTemplate',
\
+// RUN: misc
@@ -207,13 +207,9 @@ FormatStringConverter::FormatStringConverter(
ArgsOffset(FormatArgOffset + 1), LangOpts(LO) {
assert(ArgsOffset <= NumArgs);
FormatExpr = llvm::dyn_cast(
- Args[FormatArgOffset]->IgnoreImplicitAsWritten());
+ Args[FormatArgOffset]->Ignor
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/142312
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/143314
For ease of future developing, I make a series of clang-format patches on all
clang-tidy code.
Typically, all new contributors should follow the existing style, so making it
consistent will give a benefit in i
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/143315
None
>From 52b8b3edae64a301646b63f15dfa46cc9af250b3 Mon Sep 17 00:00:00 2001
From: Baranov Victor
Date: Sun, 8 Jun 2025 19:23:38 +0300
Subject: [PATCH] [clang-tidy][NFC] run clang-format over 'android', 'boost
vbvictor wrote:
PRs are already checked by git-clang-format but sometimes it needs manual start
by a member. We shouldn't forget about this behavior.
https://github.com/llvm/llvm-project/pull/143324
___
cfe-commits mailing list
cfe-commits@lists.llvm.
@@ -207,13 +207,9 @@ FormatStringConverter::FormatStringConverter(
ArgsOffset(FormatArgOffset + 1), LangOpts(LO) {
assert(ArgsOffset <= NumArgs);
FormatExpr = llvm::dyn_cast(
- Args[FormatArgOffset]->IgnoreImplicitAsWritten());
+ Args[FormatArgOffset]->Ignor
@@ -0,0 +1,180 @@
+// RUN: %check_clang_tidy %s misc-const-correctness %t -- \
+// RUN: -config="{CheckOptions: {\
+// RUN: misc-const-correctness.AllowedTypes:
'[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;qualified::Type;::fully::QualifiedType;ConstTemplate',
\
+// RUN: misc
https://github.com/vbvictor approved this pull request.
https://github.com/llvm/llvm-project/pull/143944
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -561,6 +561,20 @@ Improvements to Clang's diagnostics
Improvements to Clang's time-trace
--
+Improvements to clang-tidy
+--
+
+New checks
+^^
+
+Changes in existing checks
+^^
+-Improved
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/143482
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,72 @@
+.. title:: clang-tidy - bugprone-conflicting-global-accesses
+
+bugprone-conflicting-global-accesses
+
+
+Finds conflicting accesses on global variables.
+
+Modifying twice or reading and modifying a memory location without a
+
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/143558
Writing `optionally()` instead of `anyOf(..., anything())` lowers code size and
gives the author's intention better.
>From 177faff965a73efdd22d460c38ff61004c065392 Mon Sep 17 00:00:00 2001
From: Victor Baranov
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/143554
None
>From 5c975c6b59c02b0464a9bfc1b424b89b4d7dd662 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 10 Jun 2025 18:27:12 +0300
Subject: [PATCH] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' c
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/143554
>From 5c975c6b59c02b0464a9bfc1b424b89b4d7dd662 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 10 Jun 2025 18:27:12 +0300
Subject: [PATCH 1/2] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto'
ch
@@ -1904,13 +1908,16 @@ AST_MATCHER(FunctionDecl,
isOverloadedUnaryOrBinaryOperator) {
}
}
+} // namespace
+
/// Returns the DefaultMinimumLength if the Value of requested minimum length
/// is less than 2. Minimum lengths of 0 or 1 are not accepted.
static inline unsign
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/143482
>From 3c4c5d5b5fa85c4aa76b5ee6d654a4556c2d1e0b Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 10 Jun 2025 09:39:49 +0300
Subject: [PATCH 1/3] [clang-tidy] fix 'misc-internal-linkage' check warnings
-
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/143550
None
>From 229141e0e7c8b81f3522cea0e559660822265745 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 10 Jun 2025 18:12:35 +0300
Subject: [PATCH 1/3] [clang-tidy] add 'IgnoreMarcos' option to
'special-
vbvictor wrote:
If you are finished with the work on the check, please convert PR to "ready for
review".
I feel that this check should be `readability` section.
https://github.com/llvm/llvm-project/pull/146830
___
cfe-commits mailing list
cfe-commits
@@ -0,0 +1,105 @@
+//===--- UseConcisePreprocessorDirectivesCheck.cpp - clang-tidy
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,127 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
-DTEST_CORRECT
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
-DTEST_GETLINE_1
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
-DTEST_GETLINE_2
+// RUN: %
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/139430
>From 9737402a9cef1ce5bb1fc35898441eb3d14da6bb Mon Sep 17 00:00:00 2001
From: Baranov Victor
Date: Sun, 11 May 2025 05:22:55 +0300
Subject: [PATCH] [clang-tidy] fix false positives with type aliases in
pro-bou
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/145229
>From ba9f1edfc2ea1fb1e41366721ccbf795ec998707 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Mon, 23 Jun 2025 23:55:57 +0300
Subject: [PATCH 1/2] [clang][analyzer] fix crash when modelling 'getline'
func
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() {
isOptionalMemberCallWithNameMatcher(hasName("isNull")),
transferOptionalIsNullCall)
+ // NullableValue::makeValue, NullableValue::makeValueInplace
+ // Only NullableValue has these methods, bu
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/145229
>From ba9f1edfc2ea1fb1e41366721ccbf795ec998707 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Mon, 23 Jun 2025 23:55:57 +0300
Subject: [PATCH 1/6] [clang][analyzer] fix crash when modelling 'getline'
func
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/145719
Mostly `else-after-return` and `else-after-continue` warnings
>From a4563c7adccfc8b9820413a7e0c5d86503b50add Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Wed, 25 Jun 2025 18:12:29 +0300
Subject: [PATCH]
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/146418
>From 3611049b862e1738237c0092f1e13c08f409663f Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Mon, 30 Jun 2025 23:34:33 +0300
Subject: [PATCH 1/2] [analyzer] Fix crash on compound literals with bitfields
@@ -2187,7 +2187,10 @@ std::optional
RegionStoreManager::getBindingForDerivedDefaultValue(
// Lazy bindings are usually handled through getExistingLazyBinding().
// We should unify these two code paths at some point.
-if (isa(val))
+// 'nonloc::ConcreteInt' va
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/147012
None
>From 5d172003421b0f45f2aeabb50f3890a3d98c8aa1 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Fri, 4 Jul 2025 10:36:38 +0300
Subject: [PATCH] [ASTMatchers][NFC] improve docs of 'isInteger' to show
m
vbvictor wrote:
> Decide whether to provide an autofix. I have chosen not to, because it will
> depend on the context one is using a type in.
I don't think we need any fixes for this check - it's a tricky field, and we
should let the user decide how to resolve these warnings.
> Decide whether
@@ -163,3 +163,16 @@ struct TemplateTypeAlias {
Alias3 &operator=(double) { return *this; }
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: operator=() should return
'TemplateTypeAlias&' [misc-unconventional-assign-operator]
};
+
+namespace issue143237 {
+template
+struct B {
@@ -163,3 +163,16 @@ struct TemplateTypeAlias {
Alias3 &operator=(double) { return *this; }
// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: operator=() should return
'TemplateTypeAlias&' [misc-unconventional-assign-operator]
};
+
+namespace issue143237 {
vbvic
901 - 1000 of 1282 matches
Mail list logo