https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/3] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,33 @@
+.. title:: clang-tidy - bugprone-reset-call
+
+bugprone-reset-call
+===
+
+Finds calls to ``reset()`` method on smart pointers where the pointee type
vbvictor wrote:
Done, also removed parentheses in ``reset`` to follow general s
vbvictor wrote:
> 1. Consider TK_IgnoreUnlessSpelledInSource, may simplify matchers
> 2. Name is too generic, consider:
>
> * bugprone-smartptr-reset-pointee-reset
> * bugprone-smartptr-reset-call
> * bugprone-smartptr-pointee-reset
> * bugprone-smartptr-reset-ambiguous-call (my prefered)
>
> O
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/121291
___
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/121291
Add new clang-tidy check that finds potentially erroneous calls to ``reset()``
method on smart pointers when
the pointee type also has a ``reset()`` method.
It's easy to make typo and delete object because the
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
> I think that this check is one that we don't want to emit fixes for, at least
> not in the main diagnostic, but maybe as a fixit attached to a note
> What do others think?
https://github.com/llvm/llvm-project/pull/121291
___
cfe-c
https://github.com/vbvictor reopened
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,34 @@
+//===--- SmartptrResetAmbiguousCallCheck.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 edited
https://github.com/llvm/llvm-project/pull/121291
___
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/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
Ping
https://github.com/llvm/llvm-project/pull/123413
___
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/122951
>From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/7] [clang-tidy] add AllowedTypes to misc-const-correctness
-
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/123413
>From 26c73cba1157bc538eb69c4ce11bba79c21ec3c6 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sat, 18 Jan 2025 00:49:29 +0300
Subject: [PATCH 1/4] [clang-tidy] Added support for 3-argument string ctor
---
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Fri, 31 Jan 2025 19:29:05 +0300
Subject: [PATCH] [clang-tidy] add new check bugprone-reset-ambiguous-call
---
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Fri, 31 Jan 2025 19:29:05 +0300
Subject: [PATCH 1/2] [clang-tidy] add new check bugprone-reset-ambiguous-call
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/126434
Add new clang-tidy that finds uses of `std::lock_guard` and suggests replacing
them with C++17's more flexible and safer alternative `std::scoped_lock`.
Here is a small description of how it works for better u
https://github.com/vbvictor edited
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
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/126434
>From 92588a7eb3f87e74887e94f88d3402ec25c6ee53 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 9 Feb 2025 22:34:26 +0300
Subject: [PATCH 1/2] [clang-tidy] add modernize-use-scoped-lock check
---
.../
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/126434
>From 92588a7eb3f87e74887e94f88d3402ec25c6ee53 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 9 Feb 2025 22:34:26 +0300
Subject: [PATCH 1/3] [clang-tidy] add modernize-use-scoped-lock check
---
.../
vbvictor wrote:
Ping
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
Ping
https://github.com/llvm/llvm-project/pull/122951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
There are some general improvements can be made:
- Create a separate test file `use-cpp-style-comments-doxygen.cpp` and leave
`use-cpp-style-comments.cpp` as it was before. With this, we can make sure that
check runs good both with and without option.
- Add documentation about
vbvictor wrote:
Ping, @HerrCai0907, Could you please address
https://github.com/llvm/llvm-project/pull/123413#issuecomment-2622200842.
Thank you in advance.
https://github.com/llvm/llvm-project/pull/123413
___
cfe-commits mailing list
cfe-commits@lis
vbvictor wrote:
Ping
https://github.com/llvm/llvm-project/pull/121291
___
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/122951
>From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/9] [clang-tidy] add AllowedTypes to misc-const-correctness
-
@@ -196,3 +199,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes
+
+ A semicolon-separated list of names of types that will be excluded from
+ const-correct
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/122951
>From 618f4a1707c1b62693c0e878040997154e7e35d6 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/8] [clang-tidy] add AllowedTypes to misc-const-correctness
-
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/123413
>From f5f0ba142a2eb71ce781faf4e15fcd225bec9ca8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sat, 18 Jan 2025 00:49:29 +0300
Subject: [PATCH 1/2] [clang-tidy] Added support for 3-argument string ctor
---
vbvictor wrote:
> please update documents in
> clang-tools-extra/docs/clang-tidy/checks/bugprone/string-constructor.rst also
Added new error description for "invalid character position argument" and
provided more examples to existing cases.
https://github.com/llvm/llvm-project/pull/123413
___
@@ -0,0 +1,127 @@
+//===--- UseCppStyleCommentsCheck.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:
vbvictor wrote:
Ping @PiotrZSL @5chmidti
https://github.com/llvm/llvm-project/pull/123413
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -39,3 +39,10 @@ Options
An unsigned integer specifying the number of spaces before the comment
closing a namespace definition. Default is `1U`.
+
+
+.. option:: AllowNoNamespaceComments
+
+ When true, the check will allow that no namespace comment is present.
+ If
@@ -39,3 +39,10 @@ Options
An unsigned integer specifying the number of spaces before the comment
closing a namespace definition. Default is `1U`.
+
+
+.. option:: AllowNoNamespaceComments
+
+ When true, the check will allow that no namespace comment is present.
+ If
https://github.com/vbvictor edited
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,40 @@
+//===--- UseCppStyleCommentsCheck.h -
clang-tidy---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,127 @@
+//===--- UseCppStyleCommentsCheck.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:
@@ -0,0 +1,127 @@
+//===--- UseCppStyleCommentsCheck.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:
vbvictor wrote:
Thank you for working on this check!
Please, read comments on previous pull request
https://github.com/llvm/llvm-project/pull/99713.
I think there could be some improvements done based on comments in that PR.
For moving this check to `readability` section script
`clang-tools-ext
@@ -39,3 +39,10 @@ Options
An unsigned integer specifying the number of spaces before the comment
closing a namespace definition. Default is `1U`.
+
+
+.. option:: AllowNoNamespaceComments
+
+ When true, the check will allow that no namespace comment is present.
+ If
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/7] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
@@ -0,0 +1,150 @@
+//===--- SmartptrResetAmbiguousCallCheck.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,150 @@
+//===--- SmartptrResetAmbiguousCallCheck.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
https://github.com/vbvictor deleted
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
vbvictor wrote:
Please, update Release Notes in clang-tools-extra/docs/ReleaseNotes.rst
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
vbvictor wrote:
> What do you think about the option's name? Is `AllowNoNamespaceComments`
> fine for you or shall I rename to `AllowOmittingNamespaceComments` (or any
> other suggestion)?
As for now I can not think of a better name, maybe others will suggest.
https://github.com/llvm/llvm-
@@ -39,3 +39,11 @@ Options
An unsigned integer specifying the number of spaces before the comment
closing a namespace definition. Default is `1U`.
+
+
+.. option:: AllowNoNamespaceComments
+
+ When true, the check will allow that namespace comments are ommitted
+ ent
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/5] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/6] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
@@ -0,0 +1,47 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
vbvictor wrote:
Thank you everyone for the feedback!
@PiotrZSL I tried using TK_IgnoreUnlessSpelledInSource with
`cxxDependentScopeMemberExpr` ast-matcher but failed to write a working matcher
case with nested template parameters:
```cpp
template
void TemplatePositiveTest() {
std::unique_p
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/123413
This PR add diagnostics for 3-parameter `std::basic_string(const char* t,
size_type pos, size_type count)` constructor in bugprone-string-constructor
check:
```cpp
std::string r1("test", 1, 0); // construct
vbvictor wrote:
Ping
https://github.com/llvm/llvm-project/pull/122951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
@EugeneZelenko Ping
I would also need assistance in merging this PR since I don't have write
permissions.
https://github.com/llvm/llvm-project/pull/122957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/122951
>From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/5] [clang-tidy] add AllowedTypes to misc-const-correctness
-
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/8] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
@@ -0,0 +1,48 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
vbvictor wrote:
Done
https://github.com
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/122951
>From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/6] [clang-tidy] add AllowedTypes to misc-const-correctness
-
@@ -196,3 +196,12 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
vbvictor wrote:
Placed default in last sentence.
https://gi
vbvictor wrote:
> Please also fix preceding option defaults.
Fixed preceding option defaults
https://github.com/llvm/llvm-project/pull/122951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
vbvictor wrote:
> Can anyone please help me? Why is Test Documentation build is failing? I am
> in no clue.
Restore clang-tools-extra/clang-tidy/modernize/CMakeLists.txt and
clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp as they were
before (with no changes to them).
https:/
@@ -0,0 +1,40 @@
+//===--- UseCppStyleCommentsCheck.h -
clang-tidy---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -196,3 +196,12 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
vbvictor wrote:
In this file all the options has default in
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/122951
>From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/7] [clang-tidy] add AllowedTypes to misc-const-correctness
-
vbvictor wrote:
As @PiotrZSL mentioned in the issue, adding an option called
`ExcludeDoxygenStyleComments` would be very helpful (or even necessary) before
releasing this check. Otherwise, it could create a lot of trouble for projects
that use doxygen for their documentation (including LLVM it
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/122957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -31,6 +31,6 @@ Options
A semicolon-separated list of names of types allowed to be copied in each
iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The
default
-
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/122957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -146,6 +147,8 @@ class ReadabilityModule : public ClangTidyModule {
"readability-static-definition-in-anonymous-namespace");
CheckFactories.registerCheck(
"readability-string-compare");
+CheckFactories.registerCheck(
vbvictor wrote:
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/124319
___
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/122957
>From 9c49e1e558c43d13872afe0a10345e3510afebdf Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:30:03 +0300
Subject: [PATCH 1/3] [clang-tidy] Fix: typos in 'AllowedTypes' option in
vario
@@ -31,6 +31,6 @@ Options
A semicolon-separated list of names of types allowed to be copied in each
iteration. Regular expressions are accepted, e.g. `[Rr]ef(erence)?$` matches
every type with suffix `Ref`, `ref`, `Reference` and `reference`. The
default
-
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/123413
>From f5f0ba142a2eb71ce781faf4e15fcd225bec9ca8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sat, 18 Jan 2025 00:49:29 +0300
Subject: [PATCH 1/3] [clang-tidy] Added support for 3-argument string ctor
---
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/123413
>From bc85c10a7d316630843266779cb1465b02d3dbf6 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sat, 18 Jan 2025 00:49:29 +0300
Subject: [PATCH 1/4] [clang-tidy] Added support for 3-argument string ctor
---
vbvictor wrote:
@HerrCai0907, sorry to bother you, but can you help merge this pr if it is okay
to have only one review (from you).
I can keep pinging others but don't understand how many people need to watch it.
Some other pull requests were merged with some reviewers still being in
"awaiting"
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/123413
>From bc85c10a7d316630843266779cb1465b02d3dbf6 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sat, 18 Jan 2025 00:49:29 +0300
Subject: [PATCH 1/5] [clang-tidy] Added support for 3-argument string ctor
---
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/122957
Added right parenthesis to match left one.
>From 9c49e1e558c43d13872afe0a10345e3510afebdf Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:30:03 +0300
Subject: [PATCH] [clang-tidy] Fix:
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/122951
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
@HerrCai0907, Could you look at this PR, please.
I have seen you doing some refactor/cleanups lately.
https://github.com/llvm/llvm-project/pull/122957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/122957
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -196,3 +196,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
+
+ A semicolon-separated list of names of types that
+ will be excluded fro
@@ -196,3 +196,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
+
+ A semicolon-separated list of names of types that
+ will be excluded fro
@@ -196,3 +196,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
+
+ A semicolon-separated list of names of types that
+ will be excluded fro
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/122951
>From 841cfec5a0ab4ce5ce64e71facfb7becaf4340e8 Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Tue, 14 Jan 2025 22:05:43 +0300
Subject: [PATCH 1/2] [clang-tidy] add AllowedTypes to misc-const-correctness
-
@@ -45,6 +45,8 @@ class ConstCorrectnessCheck : public ClangTidyCheck {
const bool TransformValues;
const bool TransformReferences;
const bool TransformPointersAsValues;
+
vbvictor wrote:
Done
https://github.com/llvm/llvm-project/pull/122951
___
@@ -57,6 +61,9 @@ void
ConstCorrectnessCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
Options.store(Opts, "TransformValues", TransformValues);
Options.store(Opts, "TransformReferences", TransformReferences);
Options.store(Opts, "TransformPointersAsValues", Tran
@@ -196,3 +196,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
+
+ A semicolon-separated list of names of types that
+ will be excluded fro
@@ -0,0 +1,134 @@
+//===--- SmartptrResetAmbiguousCallCheck.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,34 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
@@ -0,0 +1,34 @@
+//===--- SmartptrResetAmbiguousCallCheck.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
@@ -0,0 +1,134 @@
+//===--- SmartptrResetAmbiguousCallCheck.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,34 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
@@ -144,6 +145,8 @@ class BugproneModule : public ClangTidyModule {
"bugprone-inaccurate-erase");
CheckFactories.registerCheck(
"bugprone-incorrect-enable-if");
+CheckFactories.registerCheck(
+"bugprone-smartptr-reset-ambiguous-call");
--
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/121291
>From 37dce6a7ed0cca2e9819c24f4d176c43e3c9f2ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 29 Dec 2024 15:32:22 +0300
Subject: [PATCH 1/4] [clang-tidy] Add bugprone-reset-call check
---
.../bugpr
@@ -0,0 +1,134 @@
+//===--- SmartptrResetAmbiguousCallCheck.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
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/122951
This PR add option `AllowedTypes` which allow users to specify types they want
to exclude from const-correctness check.
Small real-world example:
```cpp
#include
int main() {
std::mutex m;
std::lock_guar
@@ -196,3 +196,13 @@ Options
// The following pointer may not become a 'int *const'.
int *changing_pointee = &value;
changing_pointee = &result;
+
+.. option:: AllowedTypes (default = '')
+
+ A semicolon-separated list of names of types that
+ will be excluded fro
1 - 100 of 446 matches
Mail list logo