[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka created https://github.com/llvm/llvm-project/pull/116033 Adds a new check that finds calls to substr when its first argument is a zero-equivalent expression and can be replaced with starts_with() (introduced in C++20). This modernization improves code readability

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 3e3db0d8ee6bf2f87b1c5f51cb02fe9a3ef50ff5 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 2e4fb01caa92c06b17bf93c08c4262a349b74379 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 19059d8671d01ae67e2777aadfb1d8addc6bd8eb Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: ok will refactor the PR --  Helmut Januschka Am 13. November 2024 um 16:28:52, Carlos Galvez ***@***.*** ***@***.***> ) schrieb: I think modernize-use-starts-ends-with should be extended instead. Agreed! — Reply to this email directly, view it on GitHub

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 9df25dbf0d66792d7b53ef484cec5a474ea5904d Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From adafcceb45853c3e8f797eba51d90e64654dafe6 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCheck for flexible … (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] WIP: [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] WIP: [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-25 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Add modernize-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via cfe-commits
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) ->

[clang-tools-extra] [clang-tidy] Add modernize-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/3] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add modernize-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/4] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add modernize-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/6] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add modernize-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/10] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/11] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/12] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-11-29 Thread Helmut Januschka via 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/13] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add modernize-make-direct check (PR #118120)

2024-11-29 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-28 Thread Helmut Januschka via 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/15] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-28 Thread Helmut Januschka via 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/14] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh

[clang-tools-extra] [clang-tidy] Add modernize-cleanup-static-cast check (PR #118033)

2024-11-28 Thread Helmut Januschka via 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:/

[clang-tools-extra] [clang-tidy] Add modernize-cleanup-static-cast check (PR #118033)

2024-11-28 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/7] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/6] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/9] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/8] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/10] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/13] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/12] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-27 Thread Helmut Januschka via 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/11] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrCh

[clang-tools-extra] [clang-tidy] Add modernize-cleanup-static-cast check (PR #118033)

2024-11-28 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
@@ -183,40 +209,44 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via 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 1/6] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
@@ -71,6 +71,17 @@ struct NotLengthExprForStringNode { ASTContext *Context; }; +static bool isNegativeComparison(const Expr *ComparisonExpr) { + if (const auto *BO = llvm::dyn_cast(ComparisonExpr)) { +return BO->getOpcode() == BO_NE; + } hjanuschka wro

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via 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 1/5] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
@@ -183,40 +209,44 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: @nicovank feedback addressed, except macro exclusion, not sure about it, it breaks alot of pre-existing tests https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via 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 1/7] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via 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 1/3] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-19 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: @EugeneZelenko your comments have been resolved, but i am unable to mark them due to force push https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via 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 1/4] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From caddb82d73d49b59dff71547d8ab986039895696 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From e549c1a93f242608af2c51a8777b4bb8ab60c228 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited 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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
@@ -7,26 +7,39 @@ Checks for common roundabout ways to express ``starts_with`` and ``ends_with`` and suggests replacing with the simpler method when it is available. Notably, this will work with ``std::string`` and ``std::string_view``. -.. code-block:: c++ +The check handle

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited 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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited 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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From f79bd08bf910512c6c3b9d8ab2cd5162f9c0e5f8 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/2] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 4fe224a3d16cff6532674516138fc6ff04678188 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka edited 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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
@@ -147,6 +147,13 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:`modernize-use-starts-ends-with hjanuschka wrote: not really sure if i understand that, see latest upload https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 8a48d6be0b0cf28ab8e98b3a5e7f45628ceadb52 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From bff5fd8031bbee5f81c17642256215d685965855 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka commented: @nicovank reading release notes! what a great community you folks have 😄 tried to use your matcher, still required a bit of plumbing in the check() but overall WAY better, LMKWYT, happy to address any further feedback. https://github.com/llvm/llvm-pr

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
@@ -173,7 +222,80 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { this); } +void UseStartsEndsWithCheck::handleSubstrMatch(const MatchFinder::MatchResult &Result) { + const auto *SubstrCall = Result.Nodes.getNodeAs("substr_fun"); + const auto

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 27d43534fd54fecc421a048638140fb4a7004b67 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka commented: @EugeneZelenko @nicovank thank you for your feedback, addressed what's possible. * added tests * release notes * various const's @nicovank about your suggestion, played around few hours with it, but could make a sense out of it, that was initially the

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: @HerrCai0907 about the fixit. its strange, using the llvm-lit test case it emits a warning, and even shows where the substr() comes from: ``` 738: /home/chrome/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/modernize/Output/use-starts-ends-with.cp

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via 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 1/2] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
@@ -171,10 +182,64 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( + cxxOperatorCallExpr( + hasAnyOper

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
@@ -36,221 +36,224 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, string_like sl, string_like_camel slc, prefer_underscore_version puv, prefer_underscore_version_flip puvf) { s.find("a") == 0; - // CHECK-MESSAGES: :[[

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: @nicovank hows the protocol to get the other reviewers in?, should i ping them - or should i just practice patience? https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via 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/4] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via 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/5] WIP: [clang-tidy] Add SmartPtrName to MakeSmartPtrChec

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-11-26 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-26 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-26 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-12-02 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] modernize-make-shared: Add MakeSmartPtrType option (PR #117529)

2024-12-02 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
@@ -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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via 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/14] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via 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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via cfe-commits
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

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via 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/19] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-02 Thread Helmut Januschka via 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/20] [clang-tidy] Add modernize-use-span-first-last check

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 8a48d6be0b0cf28ab8e98b3a5e7f45628ceadb52 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/4] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 8a48d6be0b0cf28ab8e98b3a5e7f45628ceadb52 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/6] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 8a48d6be0b0cf28ab8e98b3a5e7f45628ceadb52 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/5] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 8a48d6be0b0cf28ab8e98b3a5e7f45628ceadb52 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/2] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-15 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 8a48d6be0b0cf28ab8e98b3a5e7f45628ceadb52 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/3] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-16 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 5b937c431486d23a696b536aa9dde560447b5756 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-16 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From b149670c72ce08ace1f36c44d794f422f70708ed Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Enhance modernize-use-starts-ends-with with

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-16 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka commented: @nicovank feedback addressed * added support for .size() * more tests - incl. macros https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From adafcceb45853c3e8f797eba51d90e64654dafe6 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/6] [clang-tidy] Add modernize-substr-to-starts-with check

  1   2   >