[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][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][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] 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] [clang-tools-extra] [llvm] Fix some typos (PR #123506)

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

[clang] [analysis][NFC] clean unittest log (PR #123758)

2025-01-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/123758 1. clean llvm::errs ouput 2. add -Wno-everything option to suppress clang warning during test >From e98964cb134d16f26dc2156b28997b0e80a2fb62 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 21 Jan 20

[clang-tools-extra] [clang-tidy] Add ClangQueryChecks config option (PR #123734)

2025-01-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: Could it be a normal check under misc and pass the query in config instead of create a new pattern? https://github.com/llvm/llvm-project/pull/123734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

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

2025-01-21 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > The deduplication here is negligible, but it allows the compiler to > skip emission of many templated base class destructors. Shrinks > clang-query by 53k. No functionality change intended. I test the binary size of clang-query before an after this change, there are no chan

[clang] [mutation analyzer] support mutation analysis for pointee (PR #118593)

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

[clang] [mutation analyzer] support mutation analysis for pointee (PR #118593)

2025-01-21 Thread Congcong Cai via cfe-commits
@@ -112,6 +115,57 @@ AST_MATCHER_P(Stmt, canResolveToExpr, const Stmt *, Inner) { return canExprResolveTo(Exp, Target); } +// use class member to store data can reduce stack usage to avoid stack overflow +// when recursive call. +class ExprPointeeResolve { + const Expr *T

[clang] [analysis][NFC] clean unittest log (PR #123758)

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

[clang] [mutation analyzer] support mutation analysis for pointee (PR #118593)

2025-01-21 Thread Congcong Cai via cfe-commits
@@ -654,6 +716,83 @@ ExprMutationAnalyzer::Analyzer::findFunctionArgMutation(const Expr *Exp) { return nullptr; } +const Stmt * +ExprMutationAnalyzer::Analyzer::findPointeeValueMutation(const Expr *Exp) { + const auto Matches = match( + stmt(forEachDescendant( +

[clang] [mutation analyzer] support mutation analysis for pointee (PR #118593)

2025-01-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118593 >From 01657045893c3fca226f0682523f999cabffc1ca Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 4 Dec 2024 15:38:06 +0800 Subject: [PATCH 1/7] [analysis] support mutation analysis for pointee wip ---

[clang-tools-extra] [clang-tidy][NFC] simplify `TimerGroup` in `ClangTidyProfiling` (PR #123958)

2025-01-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/123958 `TimerGroup` don't need to use as field of `ClangTidyProfiling`. We can construct it local during destructing. >From 7f6fccebdc73f06d920eae75132238c5a884bbea Mon Sep 17 00:00:00 2001 From: Congcong Cai Dat

[clang-tools-extra] [clang-tidy] Add EnableQtSupport option to modernize-use-integer-sign-comprison (PR #122127)

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

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/123413 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,150 @@ +//===--- SmartptrResetAmbiguousCallCheck.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

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-24 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,150 @@ +//===--- SmartptrResetAmbiguousCallCheck.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

[clang-tools-extra] [clang-tidy][NFC] simplify `TimerGroup` in `ClangTidyProfiling` (PR #123958)

2025-01-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/123958 ___ 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] improve performance misc-unused-using-decls (PR #123454)

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

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-25 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.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:

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-25 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseCppStyleCommentsCheck.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:

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-01-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/121291 ___ 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-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-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] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: please update documents https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-01-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/123413 ___ 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 QtEnabled option to modernize-use-integer-sign-comprison (PR #122127)

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

[clang] [mutation analyzer] support mutation analysis for pointee (PR #118593)

2025-01-21 Thread Congcong Cai via cfe-commits
@@ -112,6 +115,57 @@ AST_MATCHER_P(Stmt, canResolveToExpr, const Stmt *, Inner) { return canExprResolveTo(Exp, Target); } +// use class member to store data can reduce stack usage to avoid stack overflow +// when recursive call. +class ExprPointeeResolve { + const Expr *T

[clang] [mutation analyzer] support mutation analysis for pointee (PR #118593)

2025-01-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118593 ___ 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 QtEnabled option to modernize-use-integer-sign-comprison (PR #122127)

2025-01-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: lgtm. please update the pr title and description before merging. because the option name is changed. https://github.com/llvm/llvm-project/pull/122127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[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]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] [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][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]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]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][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]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 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 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] 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-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] 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]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][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][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] 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]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][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] [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] [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 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-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] 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
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] 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] 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] 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] 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 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][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] Add support for `-ignore-insert-conflict` in `run-clang-tidy.py` (PR #127066)

2025-02-14 Thread Congcong Cai via cfe-commits
Vicente Mataix =?utf-8?q?Ferr=C3=A1ndiz?= , Vicente Mataix =?utf-8?q?Ferr=C3=A1ndiz?= , Vicente Mataix =?utf-8?q?Ferr=C3=A1ndiz?= Message-ID: In-Reply-To: https://github.com/HerrCai0907 approved this pull request. LGTM. Please update release note also. After that, feel free to ping me to merge

[clang-tools-extra] [tool] Remove legacy argument `-ignore-insert-conflict` from `run-clang-tidy.py` (PR #127066)

2025-02-13 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Remove legacy argument `-ignore-insert-conflict` flag from `run-clang-tidy.py` Could you explain more about `legacy` argument `-ignore-insert-conflict`. It still in `clang-apply-replacements` tool. ``` USAGE: clang-apply-replacements [options] OPTIONS: Formatting Option

[clang-tools-extra] [clang-tidy] Add support for `-ignore-insert-conflict` in `run-clang-tidy.py` (PR #127066)

2025-02-15 Thread Congcong Cai via cfe-commits
Vicente Mataix =?utf-8?q?Ferrándiz?= , Vicente Mataix =?utf-8?q?Ferrándiz?= , Vicente Mataix =?utf-8?q?Ferrándiz?= Message-ID: In-Reply-To: HerrCai0907 wrote: > Can you help me?, I have no experience in this repository release-note is placed `clang-tools-extra/docs/ReleaseNotes.rst`. You can

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-02-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/122951 ___ 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-02-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/122951 ___ 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 treat warnings as errors (PR #128221)

2025-02-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. Please note this in release note https://github.com/llvm/llvm-project/pull/128221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/128383 Tolerate fix-it breaking compilation when functions is used as pointers. `isReferencedOutsideOfCallExpr` will visit the whole translate unit for each matched function decls. It will waste lots of cpu time in

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM as temporary solution But clang-tidy actually do not want to reply on `Sema`. I take a look briefly about `HeuristicResolver`, it looks like not related to other Sema parts. Is it possible to move the whole `HeuristicResolver` out

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

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

[clang] [clang-tools-extra] [clang-tidy] fix fp when modifying variant by ``operator[]`` with template in parameters (PR #128407)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/128407 `ArraySubscriptExpr` can switch base and idx. For dependent array subscript access, we should check both base and idx conservatively. >From ff265c9f01d68b8657d217ba4ea62b77a5775bb5 Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-02-22 Thread Congcong Cai via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-23 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,69 @@ +//===--- UnintendedCharOstreamOutputCheck.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

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 1/9] [clang-tidy]add new check bugprone-unintended-char-ostre

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 1/9] [clang-tidy]add new check bugprone-unintended-char-ostre

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-02-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/128383 >From 721393e8f1a464931884be95fef48518f8c351f1 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 23 Feb 2025 08:36:53 +0800 Subject: [PATCH 1/2] [clang-tidy]improve performance-unnecessary-value-param

[clang-tools-extra] [clang-tidy] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-02-23 Thread Congcong Cai via cfe-commits
@@ -22,7 +22,8 @@ namespace clang::tidy::performance { class NoexceptFunctionBaseCheck : public ClangTidyCheck { public: NoexceptFunctionBaseCheck(StringRef Name, ClangTidyContext *Context) - : ClangTidyCheck(Name, Context) {} + : ClangTidyCheck(Name, Context) +

[clang-tools-extra] [clang-tidy] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-02-23 Thread Congcong Cai via cfe-commits
@@ -110,6 +110,12 @@ Changes in existing checks ` check by providing additional examples and fixing some macro related false positives. +- Improved :doc:`performance-noexcept-move-constructor + ` check by adding + a new (off-by-default) option `AllowFalseEvaluated`, whic

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-02-24 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I am not a native English speaker, just a personal feeling. I prefer `AllowOmittingNamespaceComments` since it is clearer then `AllowNoNamespaceComments`. https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing lis

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

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

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-02-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: Could you organize test. It looks like copy from other tests and have some noise which has nothing to do with the function of the current PR. Also, please rebase to main since release note is cleared https://github.com/llvm/llvm-project/pull/124265 ___

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 01/10] [clang-tidy]add new check bugprone-unintended-char-ost

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-02-24 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Feb 24, 9:58 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/128383). https://github.com/llvm/llvm-project/pull/128383

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-02-22 Thread Congcong Cai via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: @@ -449,6 +479,10 @@ ClangTidyASTConsumerFactory::createASTConsumer( } std::vector> Consumers; + + if (!Context.getOptions().SystemHeaders.value_or(false)) +Consumers.push_back(std::make

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-02-22 Thread Congcong Cai via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/HerrCai0907 commented: Will be better to use decorator pattern instead of ad preprocess consumer. Most of clang-tidy check does not reply on ast matcher result in system header. but it is maybe n

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

2025-02-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. lgtm. please run git-clang-format also. i think there are format issue in the new code. https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2025-02-23 Thread Congcong Cai 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-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 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][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/128362 ___ 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 invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: LGTM. since it is just a patch instead of ideal solution for `std::equality_comparable_with` stuff, could you add some FIXME in code? https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing li

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 1/7] [clang-tidy]add new check bugprone-unintended-char-ostre

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-20 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,69 @@ +//===--- UnintendedCharOstreamOutputCheck.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

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 1/8] [clang-tidy]add new check bugprone-unintended-char-ostre

<    6   7   8   9   10   11   12   13   >