hjanuschka wrote:
@PiotrZSL feedback addressed
@5chmidti - thank you for your feedback, i have now invested multiple days over
a few weeks to somehow make this work.
started multiple attempts from scratch, at this point i don't even know what i
have tried and what not, the last commit.
https
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 01/12] [clang-tidy] Add readability-string-view-substr chec
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 01/11] [clang-tidy] Add readability-string-view-substr chec
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/9] [clang-tidy] Add readability-string-view-substr check
@@ -0,0 +1,201 @@
+//===--- StringViewSubstrCheck.cpp - 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: Ap
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/8] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/7] [clang-tidy] Add readability-string-view-substr check
hjanuschka wrote:
feedback addressed, you were right about the template case, it is really
broken, adding:
```
std::optional getCheckTraversalKind() const override {
return TK_IgnoreUnlessSpelledInSource;
}
```
fixes it, but now templates seem to be skipped completely. and existing
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/5] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/5] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka ready_for_review
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/4] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/3] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/2] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/2] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH] [clang-tidy] Add readability-string-view-substr check
Add
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From bcee24de45d955760257bb0b1825e3e59bf7a28c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/2] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From bcee24de45d955760257bb0b1825e3e59bf7a28c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH 1/2] [clang-tidy] Add readability-string-view-substr check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From bcee24de45d955760257bb0b1825e3e59bf7a28c Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH] [clang-tidy] Add readability-string-view-substr check
Add
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/120055
>From 16a98e0d99ccee0c2bb6bad51c27c67c5c43d747 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 16 Dec 2024 08:24:14 +0100
Subject: [PATCH] [clang-tidy] Add readability-string-view-substr check
Add
https://github.com/hjanuschka created
https://github.com/llvm/llvm-project/pull/120055
Add a new check that suggests using `string_view::remove_prefix()` and
`remove_suffix()` instead of `substr()` when the intent is to remove characters
from either end of a string_view.
>From 16a98e0d99cc
https://github.com/hjanuschka commented:
ready for re-review
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/31] [clang-tidy] Add modernize-use-span-first-last check
@@ -0,0 +1,104 @@
+//===--- UseSpanFirstLastCheck.cpp - 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: Ap
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/29] [clang-tidy] Add modernize-use-span-first-last check
@@ -0,0 +1,96 @@
+//===--- UseSpanFirstLastCheck.cpp - 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,96 @@
+//===--- UseSpanFirstLastCheck.cpp - 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,24 @@
+.. title:: clang-tidy - readability-use-span-first-last
+
+readability-use-span-first-last
+===
+
+Suggests using ``std::span::first()`` and ``std::span::last()`` member
functions
+instead of equivalent ``subspan()``. These dedicated
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/26] [clang-tidy] Add modernize-use-span-first-last check
hjanuschka wrote:
feedback addressed.
@5chmidti - added range support
@HerrCai0907 tried using `TK_IgnoreUnlessSpelledInSource` but this breaks the
template based cases.
i am afraid having `TK_IgnoreUnlessSpelledInSource` would require way more
complex matchers? how big of a deal is to not us
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/25] [clang-tidy] Add modernize-use-span-first-last check
@@ -18,108 +18,77 @@ using namespace clang::ast_matchers;
namespace clang::tidy::readability {
void UseSpanFirstLastCheck::registerMatchers(MatchFinder *Finder) {
- // Match span::subspan calls
const auto HasSpanType =
hasType(hasUnqualifiedDesugaredType(recordType(
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/23] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka commented:
@5chmidti removed the recursive visitor and refactored it, hope this is correct
now, added the test cases, you mentioned, and you where right in the complex
version they failed, work now!
https://github.com/llvm/llvm-project/pull/118074
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/22] [clang-tidy] Add modernize-use-span-first-last check
@@ -0,0 +1,24 @@
+.. title:: clang-tidy - readability-use-span-first-last
+
+readability-use-span-first-last
+===
+
+Checks for uses of ``std::span::subspan()`` that can be replaced with clearer
+``first()`` or ``last()`` member functions. These dedicat
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/20] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/19] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka commented:
MANY thanks, yet again, feedback addressed.
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/18] [clang-tidy] Add modernize-use-span-first-last check
hjanuschka wrote:
🙈
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/15] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/14] [clang-tidy] Add modernize-use-span-first-last check
@@ -58,6 +58,7 @@ add_clang_library(clangTidyReadabilityModule STATIC
UppercaseLiteralSuffixCheck.cpp
UseAnyOfAllOfCheck.cpp
UseStdMinMaxCheck.cpp
+ UseSpanFirstLastCheck.cpp
hjanuschka wrote:
fixed, with the 2 "Use"
(https://github.com/llvm/llvm-proje
https://github.com/hjanuschka commented:
feedback addressed
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/16] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka created
https://github.com/llvm/llvm-project/pull/118120
Adds a new check that converts std::make_* function calls to direct constructor
calls using CTAD. Transforms make_optional, make_unique, make_shared and
make_pair into their equivalent direct constructor cal
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/13] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/12] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/11] [clang-tidy] Add modernize-use-span-first-last check
hjanuschka wrote:
@carlosgalvezp thanks for the feedback. I've removed the transformation:
```c++
auto sub2 = s.subspan(n);// transforms to: auto sub2 = s.last(s.size()
- n);
```
While I agree that the transformed expression is more complex (due to size() -
x), I initially included it
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 01/10] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 1/8] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 1/7] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 1/6] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 1/4] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/118074
>From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Fri, 29 Nov 2024 10:17:49 +0100
Subject: [PATCH 1/3] [clang-tidy] Add modernize-use-span-first-last check
https://github.com/hjanuschka created
https://github.com/llvm/llvm-project/pull/118074
Add new clang-tidy check that suggests using std::span's more expressive
first() and last() member functions instead of equivalent subspan() calls.
The check modernizes code by replacing:
- subspan(0, n) ->
https://github.com/hjanuschka closed
https://github.com/llvm/llvm-project/pull/118033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hjanuschka wrote:
ohhh TIL! lets close this PR
`readability-redundant-casting` with: `IgnoreTypeAliases` does what i was
chasing!
/close
https://github.com/llvm/llvm-project/pull/118033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/hjanuschka created
https://github.com/llvm/llvm-project/pull/118033
> Add a new check that detects and removes redundant static_cast operations
> where the source and target types are identical. This helps clean up code
> after type system changes, improving readability and
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/15] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/14] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/13] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/12] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/10] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 01/11] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/9] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/8] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/6] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/7] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
hjanuschka wrote:
awesome! thanks to everyone involved for the patience with me and the great
guidance!
https://github.com/llvm/llvm-project/pull/116033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka commented:
@PiotrZSL
- [x] Add MakeSmartPtrType in MakeSmartPtrCheck as protected (do not
initialize in constructor)
- [x] Add MakeSmartPtrType to storeOptions
- [x] Read MakeSmartPtrType in MakeSharedPtrCheck & MakeUniquePtrCheck
constructors (set differ
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/5] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/4] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
hjanuschka wrote:
@nicovank all good now?
https://github.com/llvm/llvm-project/pull/116033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka ready_for_review
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka edited
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/117529
>From 9466fb73adfb050e9eac426459c18a7a5bca1982 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Mon, 25 Nov 2024 09:59:21 +0100
Subject: [PATCH 1/2] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec
https://github.com/hjanuschka converted_to_draft
https://github.com/llvm/llvm-project/pull/117529
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka created
https://github.com/llvm/llvm-project/pull/117529
Introduced a `SmartPtrName` field in `MakeSmartPtrCheck` to allow matching on
other smart pointer types, such as `base::scoped_refptr`, in addition to
`std::shared_ptr`. This enables more versatile usage of
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/116033
>From 23b4bcdf52041aad1c5581e0f7dc01028770a154 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Wed, 13 Nov 2024 12:52:36 +0100
Subject: [PATCH 01/12] [clang-tidy] Enhance modernize-use-starts-ends-with
https://github.com/hjanuschka commented:
feedback addressed
https://github.com/llvm/llvm-project/pull/116033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/116033
>From 23b4bcdf52041aad1c5581e0f7dc01028770a154 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Wed, 13 Nov 2024 12:52:36 +0100
Subject: [PATCH 01/11] [clang-tidy] Enhance modernize-use-starts-ends-with
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/116033
>From 23b4bcdf52041aad1c5581e0f7dc01028770a154 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Wed, 13 Nov 2024 12:52:36 +0100
Subject: [PATCH 01/10] [clang-tidy] Enhance modernize-use-starts-ends-with
https://github.com/hjanuschka commented:
feedback addressed, not sure how to proceed with output format changes
https://github.com/llvm/llvm-project/pull/116033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/hjanuschka updated
https://github.com/llvm/llvm-project/pull/116033
>From 23b4bcdf52041aad1c5581e0f7dc01028770a154 Mon Sep 17 00:00:00 2001
From: Helmut Januschka
Date: Wed, 13 Nov 2024 12:52:36 +0100
Subject: [PATCH 1/9] [clang-tidy] Enhance modernize-use-starts-ends-with wi
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const
MatchFinder::MatchResult &Result) {
const auto *EndsWithFunction =
Result.Nodes.getNodeAs("ends_with_fun");
assert(bool(StartsWithFunction) != bool(EndsWithFunction));
+
const CXXMethodDecl *Replacemen
@@ -240,6 +240,9 @@ void UseStartsEndsWithCheck::check(const
MatchFinder::MatchResult &Result) {
ReplacementFunction->getName());
// Replace arguments and everything after the function call.
+ if (FindExpr->getNumArgs() == 0) {
+r
1 - 100 of 156 matches
Mail list logo