[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-12 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129408 >From a06de0100d34d3f18b8eca690161b3720620f4af 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

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave created https://github.com/llvm/llvm-project/pull/128402 This PR aims to fix `performance-move-const-arg` #126515 ## Changes Enhanced the `performance-move-arg` check in Clang-Tidy to detect cases where std::move is used in **ternary expressions which was not bein

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-23 Thread David Rivera via cfe-commits
RiverDave wrote: Thx @HerrCai0907, your feedback has been addresed. https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-23 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-23 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/128402 >From 5eef2a52de7de53b0fb24781f40a7b02b55025b9 Mon Sep 17 00:00:00 2001 From: Riverdave Date: Sat, 22 Feb 2025 03:57:35 -0500 Subject: [PATCH] [clang-tidy] Fix performance-move-const-arg false negative in ter

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-23 Thread David Rivera via cfe-commits
@@ -44,6 +44,12 @@ void MoveConstArgCheck::registerMatchers(MatchFinder *Finder) { unless(isInTemplateInstantiation())) .bind("call-move"); + // Match ternary expressions where either branch contains std::move + auto TernaryWithMoveMatcher = +

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-23 Thread David Rivera via cfe-commits
RiverDave wrote: > lgtm. please run git-clang-format also. i think there are format issue in the > new code. Thx @HerrCai0907, your feedback has been addresed. https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commi

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-26 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/128402 >From 5eef2a52de7de53b0fb24781f40a7b02b55025b9 Mon Sep 17 00:00:00 2001 From: Riverdave Date: Sat, 22 Feb 2025 03:57:35 -0500 Subject: [PATCH] [clang-tidy] Fix performance-move-const-arg false negative in ter

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-26 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/128402 >From 848be2ccd25fd68b6a2d2037198184b08ff5d6e2 Mon Sep 17 00:00:00 2001 From: Riverdave Date: Sat, 22 Feb 2025 03:57:35 -0500 Subject: [PATCH] [clang-tidy] Fix performance-move-const-arg false negative in ter

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-26 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/128402 >From 5eef2a52de7de53b0fb24781f40a7b02b55025b9 Mon Sep 17 00:00:00 2001 From: Riverdave Date: Sat, 22 Feb 2025 03:57:35 -0500 Subject: [PATCH] [clang-tidy] Fix performance-move-const-arg false negative in ter

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-26 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/128402 >From f5e26951fb93db68ee51d79d6c84eb2194e3bf74 Mon Sep 17 00:00:00 2001 From: Riverdave Date: Sat, 22 Feb 2025 03:57:35 -0500 Subject: [PATCH] [clang-tidy] Fix performance-move-const-arg false negative in ter

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-25 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave created https://github.com/llvm/llvm-project/pull/134188 Covered the edge case where an int expression is not necessarily directly wrapped around an ImplicitCastExpr which seemed to be a requirement in this check to trigger. **For instance**: ```cpp #include bo

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From ac9833cd5abdaf4a91c785d5fa9d51190219851a 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Objects (PR #131969)

2025-03-23 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/131969 >From c966cef850ed1350264110e622866dae66f99a07 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

[clang-tools-extra] [clang-tidy][C++20] Add support for aggregate types within modernize-use-emplace (PR #131969)

2025-03-20 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/131969 >From fa0f1079587e6e26279c293fe4467ff0388f6a43 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/131969 >From 30678d79b5f7cd91da8eef5251eabe96875c0397 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

[clang-tools-extra] [clang-tidy][C++20] Add support for aggregate types within modernize-use-emplace (PR #131969)

2025-03-23 Thread David Rivera via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %check_clang_tidy %s -std=c++20 modernize-use-emplace %t -- \ +// RUN: -config="{CheckOptions: \ +// RUN: {modernize-use-emplace.ContainersWithPushBack: \ +// RUN:'::std::vector; ::std::list; ::std::deque; llvm::LikeASmallVe

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via 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: Thx for your suggestions, this is really great, this should be addressed now. https://github.com/l

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via cfe-commits
RiverDave wrote: Removed **Aggregates** from both title and release notes considering my changes can potentially affect non aggregate structs types as well. https://github.com/llvm/llvm-project/pull/131969 ___ cfe-commits mailing list cfe-commits@list

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Object Construction (PR #131969)

2025-03-23 Thread David Rivera via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %check_clang_tidy %s -std=c++20 modernize-use-emplace %t -- \ RiverDave wrote: File was removed as suggested, will create a new file for future work on designated inits https://github.com/llvm/llvm-project/pull/131969 _

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-29 Thread David Rivera via cfe-commits
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

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-29 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 82951dab6d1b834a5b296faddcf23603f3f05e84 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-29 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-29 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/131969 >From 9972aa8e1720f7e6378c63551c853ee504193000 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-29 Thread David Rivera via cfe-commits
@@ -1289,7 +1305,11 @@ void testBracedInitTemporaries() { v2.push_back(NonTrivialWithVector{{0}}); v2.push_back({{0}}); v2.push_back(NonTrivialWithVector{std::vector{0}}); + // CHECK-MESSAGES-CPP20: :[[@LINE-1]]:6: warning: use emplace_back instead of push_back

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-03-29 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/131969 >From f0b31f80f452c80926822ea279e5aff37b84b840 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

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-03 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited 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

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in Nested Objects (PR #131969)

2025-03-27 Thread David Rivera via cfe-commits
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

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-05-14 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-05-14 Thread David Rivera via cfe-commits
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

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-05-24 Thread David Rivera via 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

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-06-07 Thread David Rivera via cfe-commits
https://github.com/RiverDave deleted 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

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-06-05 Thread David Rivera via cfe-commits
@@ -39,21 +39,28 @@ intCastExpression(bool IsSigned, // std::cmp_{} functions trigger a compile-time error if either LHS or RHS // is a non-integer type, char, enum or bool // (unsigned char/ signed char are Ok and can be used). - auto IntTypeExpr = expr(hasType(hasCanon

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-06-05 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From daab8b4ccbce1f15758378c8229207a871b40683 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Wed, 2 Apr 2025 21:02:00 -0400 Subject: [PATCH 1/2] [clang-tidy] Improve integer comparison by matching valid e

<    1   2