mikecrowe wrote:
I [tried
asking](https://lists.openembedded.org/g/openembedded-core/topic/gcc_library_directory_and/111849200)
about this on the OpenEmbedded mailing list. The response was that it has been
this way for so long that it's going to be a major undertaking to change it
even thoug
mikecrowe wrote:
Thank you for investigating this. Your change in
https://github.com/llvm/llvm-project/pull/128428 certainly makes things look a
lot neater to me. I believe that OpenEmbedded multilib is relying on the same
`llvm::Triple::OpenEmbedded` workaround added in
https://reviews.llvm
https://github.com/mikecrowe closed
https://github.com/llvm/llvm-project/pull/126425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mikecrowe wrote:
Thanks for the reviews. I have been able to turn this check into a plugin
successfully and I will propose that it is included with the nlohmann/json
library.
https://github.com/llvm/llvm-project/pull/126425
___
cfe-commits mailing li
@@ -0,0 +1,72 @@
+//===--- NlohmannJsonExplicitConversionsCheck.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: Apa
@@ -0,0 +1,72 @@
+//===--- NlohmannJsonExplicitConversionsCheck.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: Apa
mikecrowe wrote:
@nikic @MaskRay Ping
https://github.com/llvm/llvm-project/pull/121302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mikecrowe wrote:
I had anticipated some pushback for this check.
The capabilities that clang-tidy provides give library writers the ability to
make breaking changes whilst keeping their users happy because avoiding the
breakage can be (at least mostly) automated. I think that such changes are
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/126425
Add check to convert nlohmann/json implicit conversions to explicit calls to
the templated get() method with an explicit type.
>From fe370ac53ccf8c59ebda21a89a4e60e1441b7916 Mon Sep 17 00:00:00 2001
From: Mik
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/121302
>From e376b821928b6de9f9ba45efad159341e2e242e6 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 29 Dec 2024 17:25:20 +
Subject: [PATCH] [OpenEmbedded] Fix include and lib paths for multilib targets
Th
mikecrowe wrote:
This works, but I'm not sure that it's the best solution. I could teach
`parseVendor` to match a prefix of `oeml` rather than hard-coding the two
specific multilib types.
https://github.com/llvm/llvm-project/pull/121302
___
cfe-commi
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/121302
The fix in e9ddc44a604318739a27249d267aa7267d13d93b wasn't enough for multilib
targets since they use a custom vendor that contains the multilib variant.
There are two common multilib variants: lib32 and lib
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From 2dd0902d5f79a2b18f53649169bd011ccfbfb46b Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH 1/2] [clang-tidy] Only expand macros in
modernize-use-std-format/
mikecrowe wrote:
I've fixed the release notes conflicts and slightly tweaked the documentation a
little. @5chmidti or @PiotrZSL, please land this if you are happy that it's a
net improvement on the existing code. I can then try to work out how to improve
it further. Thanks.
https://github.com
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From 2dd0902d5f79a2b18f53649169bd011ccfbfb46b Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH] [clang-tidy] Only expand macros in
modernize-use-std-format/prin
mikecrowe wrote:
@PiotrZSL, it doesn't look like this change has automatically been assigned
reviewers. Since you've reviewed my PRs in the past would you mind looking at
and landing this one if it's appropriate? Thanks.
https://github.com/llvm/llvm-project/pull/110428
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/110428
None
>From b1a53281aeed1163233cf4839036bb708d4060c2 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 29 Sep 2024 16:53:27 +0100
Subject: [PATCH] [clang-tidy] Fix check alphabetical ordering in release not
https://github.com/mikecrowe commented:
LGTM. Thanks for fixing this.
https://github.com/llvm/llvm-project/pull/108805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mikecrowe wrote:
Thanks for fixing this @MainakSil. I wasn't aware of the bug report until now.
@nicovank is correct that only the format string needs to change as I got the
format specifiers the wrong way round originally. Thanks for adding me to this
change.
I copied the same mistake to `us
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/104675
>From afdd6c2a12735e1da69a46c6ff78b5d4e0dcdb6e Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 21 Jul 2024 20:37:02 +0100
Subject: [PATCH 1/2] [clang-tidy] Support member functions with
modernize-use-std
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/104675
These checks can be made to work on member functions quite easily and it's not
unknown to have at least printf-style functions as members. Let's remove the
restriction.
>From afdd6c2a12735e1da69a46c6ff78b5d4
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/104674
None
>From b96dfbca33c5beb5ca3c984bc9388d11f0d7f707 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sat, 17 Aug 2024 17:04:06 +0100
Subject: [PATCH] [clang-tidy] Correct typo in ReleaseNotes.rst
---
clang-t
mikecrowe wrote:
Thanks for the reviews. Please can someone land this for me when convenient?
https://github.com/llvm/llvm-project/pull/102759
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/102759
My fix for my original fix of issue #92896 in
666d224248707f373577b5b049b5b022916c modified the function signature for
fmt::sprintf to more accurately match the real implementation in libfmt but
failed to
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From 71dedefaf4dd8725b9a94e50c8f4d43b0e8bc4b2 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH] [clang-tidy] Only expand macros in
modernize-use-std-format/prin
mikecrowe wrote:
@5chmidti wrote:
> Looks good from my side
Thanks. I've squashed and rebased. Since 19 has been branched now and it
includes *modernize-use-std-format* I've mentioned the improvement as being for
both *modernize-use-std-print* and *modernize-use-std-format* in the release
not
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From f7be65b1581e49bb18b3ab613686daedcd71b4d9 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH] [clang-tidy] Only expand macros in
modernize-use-std-format/prin
mikecrowe wrote:
@5chmidti wrote:
> It'll be 1 week+ before I am back at my main machine to take a better look at
> the macro question. Maybe this can just be landed, without that distinction.
Thanks for letting me know and thanks for the review.
I've pushed a new version to this PR with the t
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH 1/6] [clang-tidy] Only expand macros in
modernize-use-std-format/
mikecrowe wrote:
@5chmidti wrote:
> It should be possible to detect this case comparing the FileID of the call's
> location and the format expression's location. If they differ, then they are
> different arguments -> different macros. Although, I haven't checked that yet.
I had thought so too
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH 1/6] [clang-tidy] Only expand macros in
modernize-use-std-format/
mikecrowe wrote:
The previous fix hadn't made it into a release yet, so I don't think that this
newly-discovered problem requires mentioning in the release notes. I'm happy to
create a separate issue for it if you'd like me to though.
https://github.com/llvm/llvm-project/pull/99021
___
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/99021
When fixing #92896 in 0e62d5cf55479981da5e05e406bbca4afb3cdc4f (#94104) I
failed to spot that I'd broken converting from fmt::printf, fmt::fprintf and
fmt::sprintf in these checks since the format parameter of
mikecrowe wrote:
> Unfortunately, walking the format string looking for macros also seems to
> match a macro that encloses the whole function invocation. This results in
> the check failing to work on expressions inside Catch2 `REQUIRE` macros for
> example.
>
> My new test case (that current
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH 1/4] [clang-tidy] Only expand macros in
modernize-use-std-format/
mikecrowe wrote:
Unfortunately, walking the format string looking for macros also seems to match
a macro that encloses the whole function invocation. This results in the check
failing to work on expressions inside Catch2 `REQUIRE` macros for example.
My new test case (that currently fails) is:
@@ -230,6 +241,37 @@ FormatStringConverter::FormatStringConverter(ASTContext
*ContextIn,
finalizeFormatText();
}
+std::optional
+FormatStringConverter::formatStringContainsUnreplaceableMacro(
+const StringLiteral *FormatExpr, SourceManager &SM, Preprocessor &PP) {
+ fo
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/97911
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH 1/3] [clang-tidy] Only expand macros in
modernize-use-std-format/
mikecrowe wrote:
It looks like the tests are failing on Windows because the `%s` in the command
line
```
// RUN: %check_clang_tidy \
// RUN: -std=c++20 %s modernize-use-std-format %t -- \
// RUN: -config="{CheckOptions: {StrictMode: true}}" \
// RUN: -- -isystem %clang_tidy_headers \
// RU
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/97911
>From f6c1a231681092189a621e2bc6af97300b2a7bfa Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Wed, 12 Jun 2024 21:06:26 +0100
Subject: [PATCH 1/2] [clang-tidy] Only expand macros in
modernize-use-std-format/
mikecrowe wrote:
I'm not particularly happy with the `FormatStringConverter` constructor now
taking seven parameters. The risk of them getting muddled isn't huge though
because they are all of different types. Should I perhaps put them all into the
`FormatStringConverter::Configuration` struct
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/97911
Expanding all macros in the printf/absl::StrFormat format string before
conversion could easily break code if those macros are expended to change their
definition between builds. It's important for this check
mikecrowe wrote:
Thank you @PiotrZSL!
https://github.com/llvm/llvm-project/pull/94104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mikecrowe wrote:
> LGTM
Thanks for the review. Please can you squash and land it for me? I don't have
permission to do so.
https://github.com/llvm/llvm-project/pull/94104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
@@ -351,6 +351,10 @@ Changes in existing checks
` check to also handle
calls to ``compare`` method.
+- Improved :doc:`modernize-use-std-format` and
mikecrowe wrote:
I spotted that just too late...
https://github.com/llvm/llvm-project/pull/94104
_
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/94104
>From 2972062997ca582100b5797cd548c4dc2f80c69a Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Fri, 31 May 2024 21:27:03 +0100
Subject: [PATCH 1/3] [clang-tidy] Fix assert in modernize-use-std-format/print
Ens
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/94104
>From 2972062997ca582100b5797cd548c4dc2f80c69a Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Fri, 31 May 2024 21:27:03 +0100
Subject: [PATCH 1/3] [clang-tidy] Fix assert in modernize-use-std-format/print
Ens
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/94104
>From 2972062997ca582100b5797cd548c4dc2f80c69a Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Fri, 31 May 2024 21:27:03 +0100
Subject: [PATCH 1/3] [clang-tidy] Fix assert in modernize-use-std-format/print
Ens
@@ -20,6 +20,11 @@ namespace clang::tidy::modernize {
namespace {
AST_MATCHER(StringLiteral, isOrdinary) { return Node.isOrdinary(); }
+AST_MATCHER(QualType, isSimpleChar) {
+ const auto ActualType = Node.getTypePtr();
+ return ActualType->isSpecificBuiltinType(BuiltinType::
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/94104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/94104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/94104
>From 2972062997ca582100b5797cd548c4dc2f80c69a Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Fri, 31 May 2024 21:27:03 +0100
Subject: [PATCH] [clang-tidy] Fix assert in modernize-use-std-format/print
Ensure
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/94104
>From 54135a6f8fd9491e6b94e4d96e46f2909e344307 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Fri, 31 May 2024 21:27:03 +0100
Subject: [PATCH] [clang-tidy] Fix assert in modernize-use-std-format/print
(#92896
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/94104
Ensure that FormatStringConverter's constructor fails with a sensible error
message rather than asserting if the format string is not a narrow string
literal.
Also, ensure that we don't even get that far in m
mikecrowe wrote:
@PiotrZSL wrote:
> Once build will pass, I will land this change, and fixes could be done in
> separate PR for both checks.
The build seems to be passing. Please can you land this if you are happy?
Thanks.
https://github.com/llvm/llvm-project/pull/90397
__
mikecrowe wrote:
@5chmidti wrote:
> LGTM, thanks
Please can you land this for me since I don't have permission to do so myself?
(Assuming you do have permission.)
Thanks.
https://github.com/llvm/llvm-project/pull/91069
___
cfe-commits mailing list
c
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/91069
>From 442cc7464ea4972d25e6fe518ac466b540a399eb Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sat, 4 May 2024 17:21:02 +0100
Subject: [PATCH] [clang-tidy][docs] Fix modernize-use-std-print docs
The set of fun
mikecrowe wrote:
@5chmidti wrote:
> LGTM, thanks
Please can you land this for me since I don't have permission to do so myself?
(Assuming you do have permission.)
Thanks.
https://github.com/llvm/llvm-project/pull/91071
___
cfe-commits mailing list
c
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/91071
>From d25fa679a70947d42fe3125858741508475d67c0 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sat, 4 May 2024 17:41:37 +0100
Subject: [PATCH] [clang-tidy] Improve modernize-use-std-print diagnostic
Include th
mikecrowe wrote:
As suggested by @5chmidti in
https://github.com/llvm/llvm-project/pull/90397/files/54c325d7a5e24441adbe8036800a2f50e2ff5fa0#r1589445886
.
https://github.com/llvm/llvm-project/pull/91071
___
cfe-commits mailing list
cfe-commits@lists.
@@ -0,0 +1,107 @@
+//===--- UseStdFormatCheck.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/mikecrowe created
https://github.com/llvm/llvm-project/pull/91071
Include the source range of the printf function in the diagnostic so it gets
underlined in the output.
>From d0ccc6ade357155161977446b64c50cafa100edb Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sat, 4 May
mikecrowe wrote:
The equivalent mistake was spotted by @5chmidti in
https://github.com/llvm/llvm-project/pull/90397/files/54c325d7a5e24441adbe8036800a2f50e2ff5fa0#r1589697782
in the new use-std-format check.
https://github.com/llvm/llvm-project/pull/91069
__
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/91069
The set of functions for the PrintfLikeFunctions and FprintfLikeFunctions
options replaces the default, so remove the word "extra" from the description
which implies that they are in addition to the default.
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 01/16] [clang-tidy] Add modernize-use-std-format check
Add a new c
mikecrowe wrote:
Thanks! I wasn't aware that was possible since I started with all these checks
before fbf611ed2a768999202e2c5e1e1a6c3c6bb94725 and had been battling with the
JSON syntax.
https://github.com/llvm/llvm-project/pull/90397
___
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
@@ -0,0 +1,107 @@
+//===--- UseStdFormatCheck.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,107 @@
+//===--- UseStdFormatCheck.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/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 01/12] [clang-tidy] Add modernize-use-std-format check
Add a new c
@@ -0,0 +1,120 @@
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s modernize-use-std-format %t -- \
+// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \
+// RUN: -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s moderni
@@ -0,0 +1,120 @@
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s modernize-use-std-format %t -- \
+// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \
+// RUN: -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s moderni
@@ -0,0 +1,84 @@
+.. title:: clang-tidy - modernize-use-std-format
+
+modernize-use-std-format
+
+
+Converts calls to ``absl::StrFormat``, or other functions via
+configuration options, to C++20's ``std::format``, or another function
+via a configuration op
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mikecrowe edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,97 @@
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s modernize-use-std-format %t -- \
+// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \
+// RUN: -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s moderniz
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 01/11] [clang-tidy] Add modernize-use-std-format check
Add a new c
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 01/10] [clang-tidy] Add modernize-use-std-format check
Add a new c
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 1/9] [clang-tidy] Add modernize-use-std-format check
Add a new cla
@@ -0,0 +1,107 @@
+//===--- UseStdFormatCheck.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/mikecrowe edited
https://github.com/llvm/llvm-project/pull/90397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,107 @@
+//===--- UseStdFormatCheck.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,108 @@
+//===--- UseStdFormatCheck.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,97 @@
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s modernize-use-std-format %t -- \
+// RUN: -config="{CheckOptions: [{key: StrictMode, value: true}]}" \
+// RUN: -- -isystem %clang_tidy_headers
+// RUN: %check_clang_tidy \
+// RUN: -std=c++20 %s moderniz
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 1/8] [clang-tidy] Add modernize-use-std-format check
Add a new cla
https://github.com/mikecrowe updated
https://github.com/llvm/llvm-project/pull/90397
>From 0d6ede5d59cc70d803bfe2c7997737c1be358c75 Mon Sep 17 00:00:00 2001
From: Mike Crowe
Date: Sun, 28 Apr 2024 12:41:46 +0100
Subject: [PATCH 1/2] [clang-tidy] Add modernize-use-std-format check
Add a new cla
mikecrowe wrote:
This check was originally proposed and reviewed at
https://reviews.llvm.org/D154287 last year but never landed since I did not
(and still do not) have commit access. Near the end of that review, @PiotrZSL
wrote:
> To be honest, I do not see to much use case for this check. But
https://github.com/mikecrowe created
https://github.com/llvm/llvm-project/pull/90397
Add a new clang-tidy check that converts absl::StrFormat (and similar
functions) to std::format (and similar functions.)
Split the configuration of FormatStringConverter out to a separate
Configuration class
92 matches
Mail list logo