RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/129408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From c81ff04def9d2198c84b96fb5cfa1de90ca57a11 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 4e5e44c721e1867b9263d0a0ea4669d0bd3bdd4a Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
@@ -159,8 +159,8 @@ Changes in existing checks
- Improved :doc:`modernize-use-default-member-init
` check by matching
- ``constexpr`` and ``static``` values on member initialization and by
detecting
- explicit casting of built-in types within member list initialization.
+
RiverDave wrote:
@HerrCai0907 could we merge this?
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,4 +1,4 @@
-// RUN: %check_clang_tidy %s modernize-use-emplace %t -- \
+// RUN: %check_clang_tidy %s -std=c++17 modernize-use-emplace %t -- \
RiverDave wrote:
On second thought would this be sufficient for the cases shown above?:
I've noticed that `use-range
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave created
https://github.com/llvm/llvm-project/pull/131969
Aims to address: #115841
C++20 introduced in-place initialization for aggregate types within
`emplace_back` calls. I ensured to match any braced init expressions with
temporals (and applied similar rules as
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping @HerrCai0907
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134188
>From b37d2b18e12cce53137eb78af5507ebf13ee45a1 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Wed, 2 Apr 2025 21:02:00 -0400
Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid
expre
@@ -177,6 +177,10 @@ Changes in existing checks
matched scenarios of ``find`` and ``rfind`` methods and fixing false
positives when those methods were called with 3 arguments.
+- Improved :doc:`modernize-use-integer-sign-comparison
RiverDave wrote:
Thanks
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134188
>From 3a2d0c5cc8de153e6d0139154c2c6cd674936a40 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Wed, 2 Apr 2025 21:02:00 -0400
Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid
expre
@@ -166,6 +166,10 @@ Changes in existing checks
excluding variables with ``thread_local`` storage class specifier from being
matched.
+- Improved :doc:`modernize-use-integer-sign-comparison
RiverDave wrote:
Figured it out the instant I pushed my changes 😂
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134188
>From 357f8d3b2fc424968a9e17c3dd2a13fe046f6cf9 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Wed, 2 Apr 2025 21:02:00 -0400
Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid
expre
RiverDave wrote:
Ping @5chmidti @PiotrZSL @carlosgalvezp
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/131969
>From 760916be170bc3a3e4188f9b399050cc92ab334f Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sun, 16 Mar 2025 16:20:16 -0400
Subject: [PATCH] [clang-tidy] Add support for Initialization Forwarding in
Nest
@@ -332,19 +380,44 @@ void UseEmplaceCheck::check(const
MatchFinder::MatchResult &Result) {
}();
assert(Call && "No call matched");
- assert((CtorCall || MakeCall) && "No push_back parameter matched");
+ assert((CtorCall || MakeCall || AggInitCall) &&
+ "No push
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
> We should fix `IgnoreSingleElementAggregates` instead.
great observation, will fix
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
@@ -1285,11 +1289,9 @@ void testBracedInitTemporaries() {
// These should not be noticed or fixed; after the correction, the code won't
- // compile.
+ // compile in version previous to C++20.
RiverDave wrote:
Indeed, forgot to delete that, thx
https://
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/131969
>From 89412d91ff6cd38a8060c84f66bbab3caead2478 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sun, 16 Mar 2025 16:20:16 -0400
Subject: [PATCH] [clang-tidy] Add support for Initialization Forwarding in
Nest
@@ -1285,11 +1289,9 @@ void testBracedInitTemporaries() {
// These should not be noticed or fixed; after the correction, the code won't
- // compile.
+ // compile in version previous to C++20.
RiverDave wrote:
All should be addressed now
https://github.
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/131969
>From 27f7da4bee6ea2f5c1c5dcd899bfe980df30f0ce Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sun, 16 Mar 2025 16:20:16 -0400
Subject: [PATCH] [clang-tidy] Add support for Initialization Forwarding in
Nest
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 85796af53e845110824b11b0f35c7ab24827c7d5 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
> We should fix `IgnoreSingleElementAggregates` instead.
Very good observation I didn't get this detail when investigating this bug.
indeed, we shouldn't warn when the 3 conditions you previously mentioned:
> 1) the class is an aggregate and 2) it contains only one member and
RiverDave wrote:
> We should fix `IgnoreSingleElementAggregates` instead.
Just to be clear, I suppose we're looking to fix `std::array` +
`IgnoreSingleElementAggregates = false` as It's the only problematic
combination I could analyze. The fixit this check provides on aggregate types
with a
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping @5chmidti @PiotrZSL @carlosgalvezp
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping @piotrdz @5chmidti @HerrCai0907 :)
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping :)
https://github.com/llvm/llvm-project/pull/134188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -122,7 +122,10 @@ void
UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(
initListExpr(
hasType(cxxRecordDecl(RestrictToPODTypes ? isPOD() : isAggregate(),
-unless(HasBaseWithFields))
@@ -182,6 +182,11 @@ Changes in existing checks
``constexpr`` and ``static``` values on member initialization and by
detecting
explicit casting of built-in types within member list initialization.
+- Improved :doc:`modernize-use-designated-initializers
+ ` check by avoid
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134774
>From 5dc7aa51c52b2fd31c182af964152765bed72ec7 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Mon, 7 Apr 2025 23:21:50 -0400
Subject: [PATCH] [clang-tidy] Avoid diagnosing std::array initializations for
mo
RiverDave wrote:
> Please add a unit test demonstrating that the related issue is fixed.
Added 👍
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
> @RiverDave Do you have permissions to land the PR, or shall I do it for you?
Don't have permissions
[yet](https://github.com/issues/created?issue=llvm%7Cllvm-project%7C131971)...
You can merge it for me!
https://github.com/llvm/llvm-project/pull/134774
_
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134774
>From bf1294a2be9da63717087f8940a7bad5b3c522f6 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Mon, 7 Apr 2025 23:21:50 -0400
Subject: [PATCH 1/2] [clang-tidy] Avoid diagnosing std::array initializations
fo
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134774
>From bf1294a2be9da63717087f8940a7bad5b3c522f6 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Mon, 7 Apr 2025 23:21:50 -0400
Subject: [PATCH 1/2] [clang-tidy] Avoid diagnosing std::array initializations
fo
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134188
>From 56fc987f62fcc0ad74924bea0351efaebee23547 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Wed, 2 Apr 2025 21:02:00 -0400
Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid
expre
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/134188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -119,13 +119,18 @@
UseDesignatedInitializersCheck::UseDesignatedInitializersCheck(
void UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) {
const auto HasBaseWithFields =
hasAnyBase(hasType(cxxRecordDecl(has(fieldDecl();
+
+ // see #133715
+
RiverDave wrote:
> Ok, I see, let's disable for ::std::array then, generalize in the future if
> we come across a similar use case.
Thanks, your feedback has been addressed.
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing lis
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From cae6e099a40086bba0790783f4088058f5aead20 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134774
>From ee7ba0b76586c73aa83f156982953482345f9b92 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Mon, 7 Apr 2025 23:21:50 -0400
Subject: [PATCH 1/2] [clang-tidy] Avoid diagnosing std::array initializations
fo
RiverDave wrote:
Ping @5chmidti @PiotrZSL @carlosgalvezp
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 29fab49d83f244c95d76bf04ba38dcf394ad41cb Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/131969
>From efde1cf6f7d50b6c1e79bc5ae2c43b8b50b022d4 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sun, 16 Mar 2025 16:20:16 -0400
Subject: [PATCH] [clang-tidy] Add support for Initialization Forwarding in
Nest
RiverDave wrote:
Ping @piotrdz @5chmidti @HerrCai0907 :)
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping @carlosgalvezp :)
https://github.com/llvm/llvm-project/pull/134774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/134188
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 8c35d9c91ba59de8ba188774385741e5f893ad55 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
RiverDave wrote:
Ping :)
Is there anything else I should add in here?
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -52,8 +54,17 @@ intCastExpression(bool IsSigned,
const auto StaticCastExpr = cxxStaticCastExpr(has(ImplicitCastExpr));
const auto FunctionalCastExpr = cxxFunctionalCastExpr(has(ImplicitCastExpr));
+ // Match function calls or variable references not directly wrapped by
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/134188
>From f5f0b14c9f49b2b956e6f1c63f24e203d6f4beef Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Wed, 2 Apr 2025 21:02:00 -0400
Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid
expre
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/131969
>From ed0c4bd4c5200819b82e97dc8032b7defdfd88da Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sun, 16 Mar 2025 16:20:16 -0400
Subject: [PATCH] [clang-tidy] Add support for Initialization Forwarding in
Nest
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/131969
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 39900908f047c2c067eea93855a5e6f644d13830 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave deleted
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -202,7 +208,13 @@ void
UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) {
unaryOperator(hasAnyOperatorName("+", "-"),
hasUnaryOperand(floatLiteral())),
cxxBoolLiteral(), cxxNullPtrLiteralExpr(), implicitValue
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From e3c5641ee3a398d8fe12c0dcd030ee84667cc86e Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
@@ -159,6 +159,12 @@ static bool sameValue(const Expr *E1, const Expr *E2) {
case Stmt::UnaryOperatorClass:
return sameValue(cast(E1)->getSubExpr(),
cast(E2)->getSubExpr());
+ case Stmt::BinaryOperatorClass: {
RiverDave wrote:
That'
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 236cd9f21bd71b118a79356eb859dda31031bf80 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 64cec5f09ff2a9b2cb3811d52c66fabae90887be Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/129425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129425
>From 4f25319a076bddd11de886dbb35693cbfd2a3a73 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sun, 2 Mar 2025 01:12:05 -0500
Subject: [PATCH] [clang-tidy] Add check on constexpr & static values on member
i
RiverDave wrote:
Ping
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
ping
https://github.com/llvm/llvm-project/pull/129408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -132,11 +132,15 @@ Changes in existing checks
` check by providing additional
examples and fixing some macro related false positives.
+- Improved :doc:`modernize-use-default-member-init
RiverDave wrote:
Done
https://github.com/llvm/llvm-project/pull/1
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 08049760b837d026fe9a69b8b6019c6d2bed06b1 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
RiverDave wrote:
> LGTM, but please address a nit
Should be done now, thanks!
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
> @RiverDave Unless you want this to be merged using github generated private
> email, change your email privacy settings.
My email should be public now
https://github.com/llvm/llvm-project/pull/129425
___
cfe-commits mailing list
cf
RiverDave wrote:
> Change looks correct, but looks like this check got one more limitation in
> case of code like this:
>
> ```
> class CastInit {
> CastInit() : m(static_cast(9)) {}
> int m = 9;
> };
> ```
>
> And this:
>
> ```
> class CastInit {
> CastInit() : m(static_cast(0)) {}
>
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RiverDave wrote:
> ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️
>
> You can test this locally with the following command:
> ```shell
> git-clang-format --diff 5d501c6137976ff1f14f3b0e2e593fb9740d0146
> 848be2ccd25fd68b6a2d2037198184b08ff5d6e2 --extensions cpp --
> clang-
https://github.com/RiverDave created
https://github.com/llvm/llvm-project/pull/129370
This aims to address a portion of #122480 by adding matchers on binary
operators. **This allows explicit arithmetic operations within initializers.**
### Note
I'm aware of the other false-negatives presented
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 68c371939323c9be13dba2e8e80ac4138859d845 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From 6dff411516cb4c0e807307fd36d15955e805d5c4 Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
@@ -137,6 +137,10 @@ Changes in existing checks
` check by fixing false
negatives
on ternary operators calling ``std::move``.
+- Improved :doc:`modernize-use-default-member-init
RiverDave wrote:
Thx for pointing out, It's fixed now.
https://github.com/l
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From be9f035f738c8ea2771c9e79d4c22ff0fa82542e Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
@@ -202,7 +208,13 @@ void
UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) {
unaryOperator(hasAnyOperatorName("+", "-"),
hasUnaryOperand(floatLiteral())),
cxxBoolLiteral(), cxxNullPtrLiteralExpr(), implicitValue
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129370
>From b46375a39104f967bdb3b6a9bd3214545a5965cf Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 02:09:02 -0500
Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list
in
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RiverDave edited
https://github.com/llvm/llvm-project/pull/129370
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -194,15 +199,21 @@ void UseDefaultMemberInitCheck::storeOptions(
}
void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) {
- auto InitBase =
- anyOf(stringLiteral(), characterLiteral(), integerLiteral(),
-unaryOperator(hasAnyOperatorName("+
https://github.com/RiverDave updated
https://github.com/llvm/llvm-project/pull/129408
>From 8995f2517be1235e01cd68d0d68199505b8ffaad Mon Sep 17 00:00:00 2001
From: David Rivera
Date: Sat, 1 Mar 2025 19:22:25 -0500
Subject: [PATCH] [clang-tidy] detect explicit casting within
modernize-use-defau
@@ -158,6 +158,10 @@ Changes in existing checks
` check by matching
``constexpr`` and ``static`` values on member initialization.
+- Improved :doc:`modernize-use-default-member-init
+ ` check by detecting
+ explicit casting of built-in types within member list initializa
1 - 100 of 143 matches
Mail list logo