[clang-tools-extra] [clang-tidy][NFC] improve performance misc-unused-using-decls (PR #123454)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/123454 skip header file before register AST Matchers it can avoid to matcher lots of ast node when lint header file >From 3d4b7e8776af4a51618febb45ba55e3f3428ca64 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date:

[clang-tools-extra] [clang-tidy][NFC] remove unused field in UnusedUsingDeclsCheck (PR #123451)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/123451 None >From ebeac6c8a91fea794e25540d40356be313a82799 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 18 Jan 2025 14:13:05 +0800 Subject: [PATCH] [clang-tidy][NFC] remove unused field in UnusedUsingDe

[clang-tools-extra] [clang-tidy][NFC] remove unused field in UnusedUsingDeclsCheck (PR #123451)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/123451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [ASTMatchers][NFC] use `Matcher` instead of `DynTypedMatcher` in `TypeLocTypeMatcher` (PR #123450)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/123450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [ast matcher] use `Matcher` instead of `DynTypedMatcher` in `TypeLocTypeMatcher` (PR #123450)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/123450 There are no template in `TypeLocTypeMatcher`. So we do not need to use `DynTypedMatcher` which can improve performance >From 959949cd5170a538e1c93d00366014f6aaf3a232 Mon Sep 17 00:00:00 2001 From: Congcon

[clang] [mutation analyzer] enhance stability for `hasAnyInit` matcher (PR #122915)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] refactor modernize-raw-string-literal fix hint (PR #122909)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] refactor modernize-raw-string-literal fix hint (PR #122909)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/122909 >From 9d80866b56ad57b3ba012c81e73788e737d8237a Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 14 Jan 2025 22:24:46 +0800 Subject: [PATCH] [clang-tidy][NFC] refactor modernize-raw-string-literal fix

[clang] [mutation analyzer] enhance stability for `hasAnyInit` matcher (PR #122915)

2025-01-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Jan 17, 8:44 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/122915). https://github.com/llvm/llvm-project/pull/122915

[clang-tools-extra] [clang-tidy][NFC] refactor modernize-raw-string-literal fix hint (PR #122909)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/122909 ___ 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 incorrect fix-it for the string contains a user-defined suffix (PR #122901)

2025-01-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122901 ___ 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 incorrect fix-it for the string contains a user-defined suffix (PR #122901)

2025-01-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Jan 17, 8:39 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/122901). https://github.com/llvm/llvm-project/pull/122901

[clang-tools-extra] [clang-tidy]fix incorrect fix-it for the string contains a user-defined suffix (PR #122901)

2025-01-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/122901 ___ 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 AllowedTypes option to misc-const-correctness (PR #122951)

2025-01-15 Thread Congcong Cai via cfe-commits
@@ -196,3 +196,13 @@ Options // The following pointer may not become a 'int *const'. int *changing_pointee = &value; changing_pointee = &result; + +.. option:: AllowedTypes (default = '') + + A semicolon-separated list of names of types that + will be excluded fro

[clang-tools-extra] [clang-tidy] Add an option to exclude files not present in the compile database (PR #120348)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Refactor: removed typos in 'AllowedTypes' option in various checks (PR #122957)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/122957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mutation analyzer] enhance stability for `hasAnyInit` matcher (PR #122915)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122915 I cannot minial produce it, but when I run clangd with `misc-const-correctness` check in a big project clangd crashed due to deref nullptr here. There are suspicious code in clang which may pass a nullptr to

[clang-tools-extra] [clang-tidy]fix incorrect auto-fix for the string contains a user-defined suffix (PR #122901)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/122901 >From 6cec0ebf3b028bdef5c381b0bea1985139d0c916 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 14 Jan 2025 21:10:57 +0800 Subject: [PATCH] [clang-tidy]fix incorrect auto-fix for the string contains a

[clang-tools-extra] [clang-tidy][doc] fix incorrectly performance-unnecessary-copy-initialization link in release note (PR #122910)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][doc] fix incorrectly performance-unnecessary-copy-initialization link in release note (PR #122910)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122910 None >From bf628c7949451533a9455d7f7cb8938d8f547dc3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 14 Jan 2025 22:43:31 +0800 Subject: [PATCH] [clang-tidy][doc] fix incorrectly performance-unnecess

[clang-tools-extra] [clang-tidy]fix incorrect auto-fix for the string contains a user-defined suffix (PR #122901)

2025-01-14 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#122909** https://app.graphite.dev/github/pr/llvm/llvm-project/122909?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#122901** https://app.graphite.dev/github/pr/llvm/l

[clang-tools-extra] [clang-tidy]fix incorrect auto-fix for the string contains a user-defined suffix (PR #122901)

2025-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122901 Fixed: #97243 >From 6cabc9df5c94226530f6631ce7ee07026a367889 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 14 Jan 2025 21:10:57 +0800 Subject: [PATCH] [clang-tidy]fix incorrect auto-fix for the st

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2025-01-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM, please update release note https://github.com/llvm/llvm-project/pull/120055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] [clang-tidy] Add `performance-explicit-move-constructor` check (PR #122599)

2025-01-12 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > > This check sounds a bit strange. Is this issue common in real-world > > projects, do we have some data? It's the first time I've heard of it. Why > > would people deviate from the standard signature for move constructors? > > It's anecdotal, but I've encountered it in a

[clang-tools-extra] [clang-tidy] Add `performance-explicit-move-constructor` check (PR #122599)

2025-01-12 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I prefer to make it in bugprone and warn for all kinds of incorrect signatures for these special functions. what do you think.@5chmidti @carlosgalvezp @PiotrZSL https://github.com/llvm/llvm-project/pull/122599 ___ cfe-commits mail

[clang-tools-extra] [clang-tidy][doc] combine the clang-tidy itself's change together in release note (PR #122594)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122594 ___ 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 an option to exclude files not present in the compile database (PR #120348)

2025-01-11 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: feel free to ping me when you want to merge it. https://github.com/llvm/llvm-project/pull/120348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][doc] fix incorrectly code snippet in release note (PR #122595)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][doc] fix incorrectly code snippet in release note (PR #122595)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122595 None >From 37b633e8eb393fac5d02e3dd551e2801d5b8d337 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 11 Jan 2025 23:25:47 +0800 Subject: [PATCH] [clang-tidy][doc] fix incorrectly code snippet in relea

[clang-tools-extra] [clang-tidy] fix incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-11 Thread Congcong Cai via cfe-commits
@@ -117,6 +117,9 @@ Improvements to clang-tidy - Improved :program:`clang-tidy` by accepting parameters file in command line. +- Improved :program:`clang-tidy` by fixing incorrect configuration file path HerrCai0907 wrote: #122594 https://github.com/llvm/ll

[clang-tools-extra] [clang-tidy][doc] combine the clang-tidy itself's change together in release note (PR #122594)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122594 https://github.com/user-attachments/assets/25433743-2c19-422a-93c5-3edfc1bb7a3f"; /> >From 3f9b3ccf94deb98cdedc9928d409a102f5b0e435 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 11 Jan 2025 23:21

[clang-tools-extra] [clang-tidy] fix incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121323 ___ 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 incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121323 >From 896db4495ff2c29c2e623d92e004ef64f49c8dd0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 30 Dec 2024 16:38:29 +0800 Subject: [PATCH 1/2] [clang-tidy] fix incorrect configuration file path resol

[clang-tools-extra] [clang-tidy] fix incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-11 Thread Congcong Cai via cfe-commits
@@ -117,6 +117,11 @@ Improvements to clang-tidy - Improved :program:`run-clang-tidy.py` script. Fixed minor shutdown noise happening on certain platforms when interrupting the script. +- Improved :program:`clang-tidy` by accepting parameters file in command line. + -

[clang-tools-extra] [clang-tidy] fix incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121323 >From 896db4495ff2c29c2e623d92e004ef64f49c8dd0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 30 Dec 2024 16:38:29 +0800 Subject: [PATCH] [clang-tidy] fix incorrect configuration file path resolving

[clang-tools-extra] [clang-tidy] remove never used IgnoreCase in option (PR #122573)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] use correct template type in ``std::min`` and ``std::max`` when operand is integer literal for readability-use-std-min-max (PR #122296)

2025-01-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] remove never used IgnoreCase in option (PR #122573)

2025-01-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122573 None >From d11ec4f698952dffba13856939774ec3fef6a137 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 11 Jan 2025 09:10:43 +0800 Subject: [PATCH] [clang-tidy] remove never used IgnoreCase in option --

[clang-tools-extra] [clang-tidy][NFC] optimize cache for config option (PR #121406)

2025-01-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] optimize cache for config option (PR #121406)

2025-01-10 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Jan 10, 10:12 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/121406). https://github.com/llvm/llvm-project/pull/121406 ___

[clang-tools-extra] [clang-tidy][NFC] clean readability-use-std-min-max (PR #122288)

2025-01-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Jan 9, 6:34 PM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/122288). https://github.com/llvm/llvm-project/pull/122288 _

[clang-tools-extra] [clang-tidy] Add an option to exclude files not present in the compile database (PR #120348)

2025-01-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/120348 ___ 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 an option to exclude files not present in the compile database (PR #120348)

2025-01-09 Thread Congcong Cai via cfe-commits
@@ -115,6 +115,9 @@ Improvements to clang-tidy - Improved :program:`run-clang-tidy.py` script. Fixed minor shutdown noise happening on certain platforms when interrupting the script. +- Improved :program:`clang-tidy-diff.py` script. Add an option to exclude files ---

[clang-tools-extra] [clang-tidy] Add an option to exclude files not present in the compile database (PR #120348)

2025-01-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/120348 ___ 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 a release note about unchecked-optional-access smart pointer caching (PR #122290)

2025-01-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. does check doc need to be changed also? https://github.com/llvm/llvm-project/pull/122290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang-tools-extra] [clang-tidy][use-internal-linkage] fix false positive for consteval function (PR #122141)

2025-01-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. lgtm. https://github.com/llvm/llvm-project/pull/122141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c01ffab - [clang-tidy][doc] reorder release note

2025-01-09 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2025-01-09T23:25:33+08:00 New Revision: c01ffab6e1dac13a344a06677f413e55073d0580 URL: https://github.com/llvm/llvm-project/commit/c01ffab6e1dac13a344a06677f413e55073d0580 DIFF: https://github.com/llvm/llvm-project/commit/c01ffab6e1dac13a344a06677f413e55073d0580.diff

[clang-tools-extra] [clang-tidy][NFC] clean readability-use-std-min-max (PR #122288)

2025-01-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review https://github.com/llvm/llvm-project/pull/122288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] clean readability-use-std-min-max (PR #122288)

2025-01-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#122288** https://app.graphite.dev/github/pr/llvm/llvm-project/122288?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/

[clang-tools-extra] [clang-tidy][NFC] clean readability-use-std-min-max (PR #122288)

2025-01-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122288 1. add `static` for internal linkage functions 2. remove `clang` prefix for `QualType` >From e12379058b4d4b22f46d7727f4ad28ecc2468f7a Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 Jan 2025 22:42:

[clang-tools-extra] [clang-tidy][NFC] optimize cache for config option (PR #121406)

2025-01-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping https://github.com/llvm/llvm-project/pull/121406 ___ 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 incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping https://github.com/llvm/llvm-project/pull/121323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] clean `LangOpts` parameter in `explicitMarkUnused` matcher (PR #122170)

2025-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/122170 https://github.com/llvm/llvm-project/pull/121783#discussion_r1907847579 >From 4793cd64f92c6e154fb9dec6d037b33a3b5b2ad8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 Jan 2025 05:18:35 +0800 Subjec

[clang-tools-extra] [clang-tidy] fix false positives when using name-independent variables after C++26 for bugprone-unused-local-non-trivial-variable (PR #121783)

2025-01-08 Thread Congcong Cai via cfe-commits
@@ -29,6 +29,12 @@ static constexpr StringRef DefaultIncludeTypeRegex = AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); } AST_MATCHER(VarDecl, isReferenced) { return Node.isReferenced(); } +AST_MATCHER_P(VarDecl, explicitMarkUnused, LangOptions, LangOpts)

[clang-tools-extra] [clang-tidy] fix false positives when using name-independent variables after C++26 for bugprone-unused-local-non-trivial-variable (PR #121783)

2025-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-unhandled-self-assignment: fix smart pointer check against std::unique_ptr type (PR #121266)

2025-01-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121266 ___ 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 false positives when using name-independent variables after C++26 for bugprone-unused-local-non-trivial-variable (PR #121783)

2025-01-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/121783 Fixed: #121731 According to https://eel.is/c++draft/basic.scope.scope#5, name independent declaration should not be warned as unused >From b8cd88ce9174476da90cbf1a2407976b99114a9f Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clang-tidy] Fix modernize-use-integer-sign-comparison comparison (PR #121506)

2025-01-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: Please update release note. I agree to enable this feature by default if adding an option. https://github.com/llvm/llvm-project/pull/121506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] [clang-tidy] fix incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2025-01-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121323 >From 896db4495ff2c29c2e623d92e004ef64f49c8dd0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 30 Dec 2024 16:38:29 +0800 Subject: [PATCH] [clang-tidy] fix incorrect configuration file path resolving

[clang-tools-extra] [clang-tidy][NFC] optimize cache for config option (PR #121406)

2025-01-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121406 >From 8f8e8c5141fcb6b6d468c80cf3ceb4fdd88eecca Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 1 Jan 2025 01:11:36 +0800 Subject: [PATCH] [clang-tidy][NFC] optimize cache for config option Current im

[clang-tools-extra] [clang-tidy][NFC] optimize cache for config option (PR #121406)

2024-12-31 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/121406 Current implement will cache `OptionsSource` for each path, it will create lots of copy of `OptionsSource` when project has deep nested folder structure. New implement use vector to store `OptionsSource` and

[clang-tools-extra] [clang-tidy][doc] mention smart ptr in bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField option (PR #121316)

2024-12-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121316 ___ 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 depercation warning for non-whitelisted global options (PR #121057)

2024-12-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121057 ___ 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 incorrect configuration file path resolving when file paths contain `..` (PR #121323)

2024-12-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/121323 `makeAbsolute` will not normalize path. When getting parent folder, `..` will go into the subfolder instead of the parent folder. >From 896db4495ff2c29c2e623d92e004ef64f49c8dd0 Mon Sep 17 00:00:00 2001 Fro

[clang-tools-extra] [clang-tidy] Mention std::forward_list in container-size-empty doc (PR #120701)

2024-12-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/120701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][doc] mention smart ptr in bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField option (PR #121316)

2024-12-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/121316 None >From 4cbe19c9acedd68dccc4f7211b1d2f8e93e1492c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 30 Dec 2024 11:06:59 +0800 Subject: [PATCH] [clang-tidy][doc] mention smart ptr in bugprone-unhand

[clang-tools-extra] [clang-tidy] bugprone-unhandled-self-assignment: fix smart pointer check against std::unique_ptr type (PR #121266)

2024-12-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/121266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-unhandled-self-assignment: fix smart pointer check against std::unique_ptr type (PR #121266)

2024-12-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/121266 ___ 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 depercation warning for non-whitelisted global options (PR #121057)

2024-12-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121057 >From 98d65a0b9a1189ce73d97d76527b458f93f17b43 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 24 Dec 2024 23:32:02 +0800 Subject: [PATCH 1/4] [clang-tidy] add depercation warning for non-whitelisted

[clang-tools-extra] b34ed25 - [clang-tidy][NFC] add link libs for bugprone module

2024-12-29 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2024-12-29T19:51:55+08:00 New Revision: b34ed25dd5c74abcb46872cbaab34b91e27a0bda URL: https://github.com/llvm/llvm-project/commit/b34ed25dd5c74abcb46872cbaab34b91e27a0bda DIFF: https://github.com/llvm/llvm-project/commit/b34ed25dd5c74abcb46872cbaab34b91e27a0bda.diff

[clang-tools-extra] [clang-tidy] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-29 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120087 ___ 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 depercation warning for non-whitelisted global options (PR #121057)

2024-12-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121057 >From 98d65a0b9a1189ce73d97d76527b458f93f17b43 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 24 Dec 2024 23:32:02 +0800 Subject: [PATCH 1/3] [clang-tidy] add depercation warning for non-whitelisted

[clang-tools-extra] [clang-tidy] add depercation warning for non-whitelisted global options (PR #121057)

2024-12-27 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,3 @@ +// RUN: clang-tidy %s --config="{CheckOptions:{StrictMode: true}}" -checks="-*,modernize-use-std-format" | FileCheck %s + +// CHECK: warning: deprecation global option 'StrictMode', please use 'modernize-use-std-format.StrictMode'. [clang-tidy-config] -

[clang-tools-extra] [clang-tidy] add depercation warning for non-whitelisted global options (PR #121057)

2024-12-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I wonder however how it will work for people who are stuck in old clang-tidy > files for whatever reason Good point, maybe we can use more smart way to do warning: only warn the global option is set but local option is not. Have some redundant options is not the aim for t

[clang-tools-extra] [clang-tidy] add depercation warning for non-whitelisted global options (PR #121057)

2024-12-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121057 >From 98d65a0b9a1189ce73d97d76527b458f93f17b43 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 24 Dec 2024 23:32:02 +0800 Subject: [PATCH 1/2] [clang-tidy] add depercation warning for non-whitelisted

[clang-tools-extra] [clang-tidy] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: sorry for forgetting it https://github.com/llvm/llvm-project/pull/120245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120245 >From 9e47698969dc59df1abaa8abd243b97e8fa038c3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Dec 2024 23:31:52 +0800 Subject: [PATCH 1/5] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conve

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. If you do not have write access, please ping me. we can help you to do merge. https://github.com/llvm/llvm-project/pull/120087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-27 Thread Congcong Cai via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-27 Thread Congcong Cai via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang-tools-extra] [clang-tidy]link LLVMTargetParser (PR #121072)

2024-12-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/121072 ___ 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 depercation warning for non-whitelisted global options (PR #121057)

2024-12-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/121057 >From 98d65a0b9a1189ce73d97d76527b458f93f17b43 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 24 Dec 2024 23:32:02 +0800 Subject: [PATCH] [clang-tidy] add depercation warning for non-whitelisted glo

[clang-tools-extra] [clang-tidy]link LLVMTargetParser (PR #121072)

2024-12-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/121072 Fix build issue introduced in #120547 >From 747b60109d9b4f05aa695898591c68845809c7a0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 25 Dec 2024 07:31:48 +0800 Subject: [PATCH] [clang-tidy]link LLVM

[clang-tools-extra] [clang-tidy] add depercation warning for non-whitelisted global options (PR #121057)

2024-12-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/121057 We plan to depercate `StrictMode` and `IgnoreMacros` global options after 2 major versions and support local options only for them. This patch introduces the depercation warning. >From 5d1269d61450ee641838

[clang-tools-extra] [clang-tidy] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-24 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping https://github.com/llvm/llvm-project/pull/120245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] mention some range algorithms do not work for `vector` in C++20 (PR #120774)

2024-12-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] extract options verify to separately function (PR #120768)

2024-12-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/120768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC][doc] mention some range algorithms do not work for `vector` in C++20 (PR #120774)

2024-12-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120774 None >From b8f686aa8fa45ab50c45c16d6b4eeea99de64bcb Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 21 Dec 2024 01:01:14 +0800 Subject: [PATCH] [clang-tidy][NFC][doc] mention some range algorithms do

[clang-tools-extra] [clang-tidy][NFC] extract options verify to separately function (PR #120768)

2024-12-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/120768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] extract options verify to sperately function (PR #120768)

2024-12-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120768 None >From 0543d52cd0af5ff645bfef0f41d4c1ffcd4b4962 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 21 Dec 2024 00:25:00 +0800 Subject: [PATCH] [clang-tidy][NFC] extract options verify to sperately

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-12-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/116591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-20 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I had the realization now that as a user I would like this to be supported: > > ``` > clang-tidy @params > ``` > > Where `params` can contain: > > ``` > foo.cpp -- > ``` > > This would make it also consistent with clang, where you can do `clang > @params`. > > Would t

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120547 >From 2927ef2ccd286e1efeb12ef12eb5f0fd2dcf2454 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Dec 2024 15:23:02 +0800 Subject: [PATCH 1/5] [clang-tidy] support parameters file in command line Fix

[clang-tools-extra] [clang-tidy] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120245 >From 9e47698969dc59df1abaa8abd243b97e8fa038c3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Dec 2024 23:31:52 +0800 Subject: [PATCH 1/4] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conve

[clang-tools-extra] [clang-tidy] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/120245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversions and bugprone-narrowing-conversions (PR #120245)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120245 >From 9e47698969dc59df1abaa8abd243b97e8fa038c3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Dec 2024 23:31:52 +0800 Subject: [PATCH 1/3] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conve

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120547 >From 2927ef2ccd286e1efeb12ef12eb5f0fd2dcf2454 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Dec 2024 15:23:02 +0800 Subject: [PATCH 1/4] [clang-tidy] support parameters file in command line Fix

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/120547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >