[clang] [clang][NFC]add static for internal linkage function (PR #117482)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117482 Detected by misc-use-internal-linkage >From b552207f51997ac31dd90fd6a9fb5de5ad1fd9bb Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 24 Nov 2024 20:27:07 +0800 Subject: [PATCH] [clang][NFC]add stati

[clang] [clang][analysis][NFC]add static for internal linkage function (PR #117481)

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

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative (PR #117837)

2024-11-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/117837 ___ 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 cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-11-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Maybe we should move this check to bugprone and use some configuration to enforce guideline in cppcoreguidelines parts. WDYT? @carlosgalvezp @PiotrZSL https://github.com/llvm/llvm-project/pull/116591 ___ cfe-commits mailing list cfe

[clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for global overloaded operator new and operator delete (PR #117945)

2024-11-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/117945 ___ 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][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-11-30 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Please add the matcher to > https://github.com/llvm/llvm-project/blob/main/clang/lib/ASTMatchers/Dynamic/Registry.cpp > as well (clang-query). i will do it separately to avoid this pr become bigger. https://github.com/llvm/llvm-project/pull/117901

[clang] [ast-matcher] Fixed a crash when traverse lambda expr with invalid captures (PR #108689)

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

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108555 >From 35742b5f2f085b8f6626456cd0d21ebecbe8f831 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Sep 2024 23:11:51 +0800 Subject: [PATCH 1/4] [clang-tidy]suggest use `std::span` as replacement of c

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108555 >From 35742b5f2f085b8f6626456cd0d21ebecbe8f831 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Sep 2024 23:11:51 +0800 Subject: [PATCH 1/4] [clang-tidy]suggest use `std::span` as replacement of c

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/108555 ___ 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] add qutation mark for C++ classes in warning message (PR #109068)

2024-09-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/109068 None >From 66be189c281db7a49c5238c2fe09df64842c1e25 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 17 Sep 2024 23:01:17 +0800 Subject: [PATCH] add quotation --- .../modernize/AvoidCArraysCheck.cpp

[clang-tools-extra] [clang-tidy][NFC] add qutation mark for C++ classes in warning message (PR #109068)

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

[clang-tools-extra] [clang-tidy][readability-container-contains] Extend to any class with contains (PR #107521)

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

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118315 None >From 8a9fc5dfc40ecc46a21ce7c537e2ffe0dbbac8b0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH] [clang-tidy] ignore `[[clang::lifetimebound]]` param in

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

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

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/118315 ___ 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 cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: It is difference level of issue. if it is an implement defined thing, it should be disabled unrelated to which coding guideline. But if it is well defined behavior, then coding guideline just a coding guideline. It even does not allow this kind of code. ```c++ short v(short

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. Thank you for your patience. LGTM with some small nits. https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#118315** https://app.graphite.dev/github/pr/llvm/llvm-project/118315?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] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Could clang/lib/ASTMatchers/GtestMatchers.cpp help you to have a better solution? https://github.com/llvm/llvm-project/pull/115051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

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

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: IMO, we should move this check to bugprone and provide 3 level's error. 1. really implement defined behavior -> The above example about float to unsigned 2. standard implement defined behavior but at least gcc and clang in each target has same behavior 3. most strictly check

[clang-tools-extra] [clang-tidy] Adjust size-empty doc because C++11 size() is constant-time (PR #117629)

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

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-02 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,151 @@ +//===--- UseIntegerSignComparisonCheck.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] Improved readability redundant casting with enums (PR #111424)

2024-11-13 Thread Congcong Cai via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/HerrCai0907 commented: Is it really a false negative? In another word, does `enum E1 : char {};` mean `E1` is the type alias of `char`? I

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/114255 ___ 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 positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-15 Thread Congcong Cai via cfe-commits
@@ -13,79 +13,92 @@ using namespace clang::ast_matchers; namespace clang::tidy::cppcoreguidelines { -namespace { -AST_MATCHER(FieldDecl, isMemberOfLambda) { - return Node.getParent()->isLambda(); +static bool hasCopyConstructor(CXXRecordDecl const &Node) { + if (Node.needs

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-15 Thread Congcong Cai via cfe-commits
@@ -102,6 +102,210 @@ void BranchCloneCheck::registerMatchers(MatchFinder *Finder) { this); Finder->addMatcher(switchStmt().bind("switch"), this); Finder->addMatcher(conditionalOperator().bind("condOp"), this); + Finder->addMatcher(ifStmt(hasDescendant(ifStmt())).b

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

2024-11-25 Thread Congcong Cai via cfe-commits
@@ -393,8 +393,14 @@ void NarrowingConversionsCheck::handleIntegralCast(const ASTContext &Context, const Expr &Lhs, const Expr &Rhs) { if (WarnOnIntegerNarrowingConversion)

[clang-tools-extra] Rename CODE_OWNERS -> Maintainers (PR #114544)

2024-11-25 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > At the end, being or not being a maintainer has no impact on me. I think it will help the first time contributor in this sub project to find correct one who can review their pr. But it is definitely not a mandatory thing. https://github.com/llvm/llvm-project/pull/114544

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

2024-11-25 Thread Congcong Cai via cfe-commits
@@ -393,8 +393,14 @@ void NarrowingConversionsCheck::handleIntegralCast(const ASTContext &Context, const Expr &Lhs, const Expr &Rhs) { if (WarnOnIntegerNarrowingConversion)

[clang-tools-extra] [clang-tidy] fix false positive use-internal-linkage for func decl without body (PR #117490)

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

[clang] [clang-tools-extra] Move isLocal AST matcher to ASTMatchers (PR #117521)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: - Try to search usage of `isLocalVarDecl` in other checks and replace them with this one. - Add some test cases of this matcher. https://github.com/llvm/llvm-project/pull/117521 ___ cfe-commits mailing list cf

[clang-tools-extra] [clang-tidy] Adjust size-empty doc because C++11 size() is constant-time (PR #117629)

2024-11-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: Please update `clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst` also. https://github.com/llvm/llvm-project/pull/117629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang-tools-extra] [clang-tidy] Adjust size-empty doc because C++11 size() is constant-time (PR #117629)

2024-11-25 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > In such case claim is still valid I think we should remove the discussion about efficient in claim since it is misleading after C++11. For self-defined container, because implement of empty and size can be totally different, this claim is still misleading. https://github

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

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

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

2024-12-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118258 None >From f9fbb478194a429f1879c176504b8596312b9baf Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 14:08:47 +0800 Subject: [PATCH] [ast matcher] add `ExportDecl` in dynamically matchers

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-12-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/117901 >From d1d0722e833a9b66206c008a4cd3f6c5b4548b5c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 27 Nov 2024 23:08:55 +0800 Subject: [PATCH 1/6] [ast-matcher] add `exportDecl` matcher --- clang/docs/R

[clang] [clang-tools-extra] [clang-tidy][use-internal-linkage]fix false positives for ExportDecl (PR #117901)

2024-12-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/117901 >From d1d0722e833a9b66206c008a4cd3f6c5b4548b5c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 27 Nov 2024 23:08:55 +0800 Subject: [PATCH 1/5] [ast-matcher] add `exportDecl` matcher --- clang/docs/R

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

2024-12-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Actually cppcodingguideline require `gsl` support, which mean the most of fixture in this check is still wrong. I see lots of people in project just use explicit cast instead of implicit cast to avoid this check. But it is totally wrong and mean nothing. Because in c++ stand

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-03 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: char, unsigned char, signed char are very special case, please add some test case for them. https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

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

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118315 >From 82f24c9930097a1e2d2b5cb068cc5fe58cbd5cd6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH] [clang-tidy] ignore `[[clang::lifetimebound]]` param in retur

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118315 >From 82f24c9930097a1e2d2b5cb068cc5fe58cbd5cd6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH 1/2] [clang-tidy] ignore `[[clang::lifetimebound]]` param in r

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

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

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118315 >From 82f24c9930097a1e2d2b5cb068cc5fe58cbd5cd6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 2 Dec 2024 23:50:12 +0800 Subject: [PATCH 1/2] [clang-tidy] ignore `[[clang::lifetimebound]]` param in r

[clang] [ast matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

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

[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

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

[clang] [ast matcher] add `ExportDecl` in dynamically matchers (PR #118258)

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

[clang] [mutation analyzer][NFC] combine `ConditionalOperator` `BinaryConditionalOperator` (PR #118602)

2024-12-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118602 ___ 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] move AST_MATCHER to namespace in InfiniteLoopCheck (PR #118820)

2024-12-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118820 None >From 0a263b84b7af55db3619bcf4b5fcb07d5cbb5084 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 5 Dec 2024 23:04:13 +0800 Subject: [PATCH] [clang-tidy][NFC] move AST_MATCHER to namespace in Infi

[clang-tools-extra] [clang-tidy][NFC] move AST_MATCHER to anonymous namespace in InfiniteLoopCheck (PR #118820)

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

[clang-tools-extra] [NFC] Complete proper copying and resource cleanup in classes. (PR #118655)

2024-12-05 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Agree, mark delete definitely make sense. Thanks! https://github.com/llvm/llvm-project/pull/118655 ___ 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)

2024-12-04 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/2] [analysis] support mutation analysis for pointee wip ---

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

2024-12-04 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-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-04 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,94 @@ +//===--- UseSpanFirstLastCheck.cpp - clang-tidy -*- C++ -*-===// +// +// 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] [mutation analyzer] support mutation analysis for pointee wip (PR #118593)

2024-12-03 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/2] [analysis] support mutation analysis for pointee wip ---

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review 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] [ast matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

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

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118593 >From 019ee3d59bedac7090798d3acd22b1767900b529 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 4 Dec 2024 15:30:41 +0800 Subject: [PATCH] [analysis] support mutation analysis for pointee wip --- ...

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/118074 ___ 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 readability-use-span-first-last check (PR #118074)

2024-12-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: In general LGTM after considering more size cases. It may still work on `TraversalKind::TK_IgnoreUnlessSpelledInSource`. Could you try to set traversal mode in `getCheckTraversalKind`. It can avoid noise of something like implicit cast. https://github

[clang-tools-extra] [clang-tidy][NFC] move AST_MATCHER to anonymous namespace in InfiniteLoopCheck (PR #118820)

2024-12-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118820 ___ 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
@@ -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] 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] 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] 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] 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] 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] 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 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] 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] 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] [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][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] 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] 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] 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][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] 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] [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] 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] 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] 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][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] 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] 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] 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] 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 modernize-nlohmann-json-explicit-conversions check (PR #126425)

2025-02-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I am not sure whether we should accept this kind of "common" used library's custom check in clang-tidy. - powerful and easy used tools which can help lots of C++ dev - longer CI time - larger binary size I think we should a guideline this kind of cases to avoid to waste cont

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

2025-02-09 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] Address false positives in misc-redundant-expression checker (PR #122841)

2025-02-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. lgtm. could you test the case #define MACRO "bbb" "aaa" MACRO == "aaabbb" https://github.com/llvm/llvm-project/pull/122841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] [clang-tidy]detecting conversion directly by `make_unique` and `make_shared` in bugprone-optional-value-conversion (PR #119371)

2024-12-11 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Note: Probably also std::make_optional could be supported. I will do it in separated PR since std::make_optional is more complex stuff. see #119554 https://github.com/llvm/llvm-project/pull/119371 ___ cfe-commits mailing list cfe

[clang-tools-extra] [clang-tidy]detecting conversion directly by `make_unique` and `make_shared` in bugprone-optional-value-conversion (PR #119371)

2024-12-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/119371 >From 526e79fc6e15c7a72ed3867afbee3cbc747c7945 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Dec 2024 20:44:12 +0800 Subject: [PATCH 1/2] [clang-tidy]detecting conversion directly by `make_uniqu

[clang-tools-extra] [clang-tidy][NFC][doc] clean out-dated clang-static-analyzer checks (PR #119580)

2024-12-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119580 None >From df8b95c76ef3b5be61b5cea6476eba80bcd16792 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Dec 2024 00:20:01 +0800 Subject: [PATCH] [clang-tidy][NFC][doc] clean out-dated clang-static-ana

[clang-tools-extra] [clang-tidy][NFC][doc] clean out-dated clang-static-analyzer checks (PR #119580)

2024-12-11 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,13 @@ +.. title:: clang-tidy - clang-analyzer-cplusplus.SelfAssignment +.. meta:: + :http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-selfassignment + +clang-analyzer-cplusplus.SelfAssignment +

[clang-tools-extra] [clang-tidy][NFC][doc] clean out-dated clang-static-analyzer checks (PR #119580)

2024-12-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/119580 >From df8b95c76ef3b5be61b5cea6476eba80bcd16792 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Dec 2024 00:20:01 +0800 Subject: [PATCH 1/2] [clang-tidy][NFC][doc] clean out-dated clang-static-anal

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-12-11 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I squashed all fixups into the main change (used this instruction actually github will do squash. please do not squash it manually in further pr. https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-co

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

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

<    4   5   6   7   8   9   10   11   12   13   >