[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 closed https://github.com/llvm/llvm-project/pull/119371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-10 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Can the logic for implementing this also be used to address > https://github.com/llvm/llvm-project/issues/86447#issuecomment-2016943524? I think this kind model of stl can be reused in other check. but i have no idea to make it more generic. https://github.com/llvm/llvm-p

[clang-tools-extra] [clang-tidy][NFC] simplify matchers in bugprone-optional-value-conversion (PR #119346)

2024-12-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119346 ___ 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] simplify matchers in bugprone-optional-value-conversion (PR #119346)

2024-12-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119346 combine type matcher and optional type check. >From e463ebdd1c859192aabb3fce91d3a0c465756fed Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Dec 2024 17:00:17 +0800 Subject: [PATCH] [clang-tidy][

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

2024-12-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119371 Inspired by #110964 >From 526e79fc6e15c7a72ed3867afbee3cbc747c7945 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Dec 2024 20:44:12 +0800 Subject: [PATCH] [clang-tidy]detecting conversion direct

[clang-tools-extra] [clang-tidy][NFC] reorder cmake source file (PR #119374)

2024-12-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119374 None >From c6fb993085832b7957854136241ea7e17960894c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Dec 2024 21:03:23 +0800 Subject: [PATCH] [clang-tidy][NFC] reorder cmake source file --- clang

[clang-tools-extra] [clang-tidy][NFC] reorder cmake source file (PR #119374)

2024-12-10 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Did you look on `CMakeLists.txt` files in other directories? Just in case :-) i don't check them one by one detailly since there are no automatical check. https://github.com/llvm/llvm-project/pull/119374 ___ cfe-commits mailing li

[clang-tools-extra] [clang-tidy][NFC] reorder cmake source file (PR #119374)

2024-12-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119374 ___ 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] clean out-dated clang-static-analyzer checks (PR #119580)

2024-12-12 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/3] [clang-tidy][NFC][doc] clean out-dated clang-static-anal

[clang-tools-extra] [clang-tidy][NFC] use local config in test cases (PR #120004)

2024-12-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120004 follow up patch for #119948. >From b3b848df1a985754580ebbaa5f8136cb2c6bf3d6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Dec 2024 12:19:55 +0800 Subject: [PATCH] [clang-tidy][NFC] use local co

[clang-tools-extra] [clang-tidy][NFC] use local config in test cases (PR #120004)

2024-12-15 Thread Congcong Cai via cfe-commits
@@ -26,7 +26,7 @@ class InconsistentDeclarationParameterNameCheck : public ClangTidyCheck { ClangTidyContext *Context) : ClangTidyCheck(Name, Context), IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)), -

[clang-tools-extra] [clang-tidy][NFC] use local config in test cases (PR #120004)

2024-12-15 Thread Congcong Cai via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -check-suffix=STRICT %s cppcoreguidelines-pro-type-const-cast %t -- -config="{CheckOptions: {StrictMode: true}}" +// RUN: %check_clang_tidy -check-suffix=STRICT %s cppcoreguidelines-pro-type-const-cast %t -- -config="{CheckOptions:

[clang-tools-extra] [clang-tidy][NFC] use local config in test cases (PR #120004)

2024-12-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120004 >From b3b848df1a985754580ebbaa5f8136cb2c6bf3d6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Dec 2024 12:19:55 +0800 Subject: [PATCH 1/2] [clang-tidy][NFC] use local config in test cases follow

[clang-tools-extra] [clang-tidy][NFC] use local config in test cases (PR #120004)

2024-12-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/120004 >From b3b848df1a985754580ebbaa5f8136cb2c6bf3d6 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Dec 2024 12:19:55 +0800 Subject: [PATCH 1/2] [clang-tidy][NFC] use local config in test cases follow

[clang] [ASTMatchers] fix `isStaticStorageClass` not matching definitions of forward declared functions (PR #120027)

2024-12-16 Thread Congcong Cai via cfe-commits
@@ -1826,6 +1826,14 @@ TEST_P(ASTMatchersTest, IsStaticStorageClass) { EXPECT_TRUE(notMatches("int i = 1;", varDecl(isStaticStorageClass(; EXPECT_TRUE(notMatches("extern int i;", varDecl(isStaticStorageClass(; EXPECT_TRUE(notMatches("void f() {}", functionDecl(isS

[clang-tools-extra] [clang-tidy] use specified type verbatim in modernize-use-using fix (PR #113837)

2024-12-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113837 ___ 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-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120245 According to #116591. > Coding guidelines should "cherry-pick" (and posddsibly configure/harden/make > more strict) base checks. We should move narrowing conversion to bugprone and keep alias in cppcoreguid

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

2024-12-17 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] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conversio

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Consider static functions (PR #119974)

2024-12-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/119974 ___ 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-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: update release note and doc also 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] use local config in test cases (PR #120004)

2024-12-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/120004 ___ 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 local config (PR #120004)

2024-12-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/120004 ___ 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-18 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > most of them probably disable aliases can clangtidy disable aliases? 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-comm

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

2024-12-18 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/2] [clang-tidy][NFC] swap cppcoreguidelines-narrowing-conve

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

2024-12-18 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: If we don't have disable alias, then it will not change anything in user side. 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/c

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: clang-tidy part is fine for me. If it's only a refactor for clang-tidy, you could remove the `[clang-tidy]` in title. https://github.com/llvm/llvm-project/pull/118569 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119842 None >From efe9cd9e78988a531dfbb6387691819ec5c18ac3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Dec 2024 00:30:25 +0800 Subject: [PATCH] [clang-tidy][doc][NFC] extract common global options in

[clang-tools-extra] [clang-tidy][doc][NFC] format doc for misc-unused-parameters (PR #119839)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119839 ___ 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][NFC] format doc for misc-unused-parameters (PR #119839)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119839 None >From ad6d38fd22d65f06d4a807e39da25352d9c42f23 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 13 Dec 2024 16:52:54 +0800 Subject: [PATCH] [clang-tidy][doc][NFC] format doc for misc-unused-param

[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: then I think the only option worth to promote is include style. https://github.com/llvm/llvm-project/pull/119842 ___ 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] clean out-dated clang-static-analyzer checks (PR #119580)

2024-12-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119580 ___ 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 C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-12-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: My first impression is this PR mixes two things. Besides supporting member function, it also add some new flag for it. Could you split it? For supporting member function, the concept is fine for me. https://github.com/llvm/llvm-project/pull/117165

[clang-tools-extra] [clang-tidy][doc] align the title style in clang-tidy/index.rst (PR #119938)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/119938 >From 16ad345cbb84f4d58a0d2c64734d92de9e4efb56 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 14 Dec 2024 08:09:40 +0800 Subject: [PATCH 1/2] [clang-tidy][doc] align the title style in clang-tidy/in

[clang-tools-extra] [clang-tidy][doc] align the title style in clang-tidy/index.rst (PR #119938)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119938 ___ 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 misuse of `getLocalOrGlobal` for non common used options (PR #119948)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119948 [RFC](https://discourse.llvm.org/t/rfc-global-option-rules-for-clang-tidy/83647) >From ee7b013a736d775ee1ea12eccce3224e23b743af Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 14 Dec 2024 14:19:04 +

[clang-tools-extra] [clang-tidy][NFC][doc] clean out-dated clang-static-analyzer checks documents and update check list (PR #119887)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119887 ___ 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][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/119842 ___ 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][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,21 @@ +== +Global Options +== + +Some options apply to multiple checks. This page lists all the available +globally options. + +.. option:: IncludeStyle + + A string specifying which include-style is used, `llvm` or `google`. Default + is `ll

[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: but in code level, we already use the getLocalOrGlobal. but unfortunately, i don't find any description about it. we should have the relative clean map between what we did in code and what we write in doc. Those three options is not from my personal preferences. they are from

[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/119842 >From efe9cd9e78988a531dfbb6387691819ec5c18ac3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Dec 2024 00:30:25 +0800 Subject: [PATCH 1/2] [clang-tidy][doc][NFC] extract common global options in

[clang-tools-extra] [llvm] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/119842 >From efe9cd9e78988a531dfbb6387691819ec5c18ac3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Dec 2024 00:30:25 +0800 Subject: [PATCH 1/2] [clang-tidy][doc][NFC] extract common global options in

[clang-tools-extra] [clang-tidy][NFC][doc] clean out-dated clang-static-analyzer checks documents and update check list (PR #119887)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119887 The missing part of #119580 >From f50c1e075e129dd7a78f539476a2183e730a4608 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 13 Dec 2024 22:37:28 +0800 Subject: [PATCH] [clang-tidy][NFC][doc] clean ou

[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119842 ___ 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][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
@@ -10,6 +10,7 @@ See also: :maxdepth: 1 The list of clang-tidy checks + The list of clang-tidy global options Clang-tidy IDE/Editor Integrations Getting Involved External Clang-Tidy Examples HerrCai0907 wrote: I think the root cause

[clang-tools-extra] [clang-tidy][doc][NFC] extract common global options in doc (PR #119842)

2024-12-13 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: This PR is not in the correct way. see https://discourse.llvm.org/t/rfc-global-option-rules-for-clang-tidy/83647 https://github.com/llvm/llvm-project/pull/119842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] [clang-tidy][doc] align the title style in clang-tidy/index.rst (PR #119938)

2024-12-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/119938 Uppercase each word in title and toctree _Originally posted by @nicovank in https://github.com/llvm/llvm-project/pull/119842#discussion_r1884559775_. >From 16ad345cbb84f4d58a0d2c64734d92de9e4efb56 Mon Sep

[clang-tools-extra] [clang-tidy] remove misuse of `getLocalOrGlobal` for non common used options (PR #119948)

2024-12-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/119948 ___ 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-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120547 Fixes: #103499 >From 2927ef2ccd286e1efeb12ef12eb5f0fd2dcf2454 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Dec 2024 15:23:02 +0800 Subject: [PATCH] [clang-tidy] support parameters file in comm

[clang] [clang analyzer]consume `llvm::Error` (PR #120597)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120597 `llvm::Error` must be consumed, otherwise it will cause trap during destructor >From de02085e535f21c74e8a7efb26272590398b Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 20 Dec 2024 00:10:03 +08

[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/2] [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 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/2] [clang-tidy] support parameters file in command line Fix

[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][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][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] 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][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] [clang analyzer]consume `llvm::Error` (PR #120597)

2024-12-19 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I want to use error in other place and follow this style to print error, but get a trap since Error isn't consumed. unfortunately I don't know how to make it happen in this cases. https://github.com/llvm/llvm-project/pull/120597 ___

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

2024-12-19 Thread Congcong Cai via cfe-commits
@@ -553,6 +555,20 @@ static llvm::IntrusiveRefCntPtr createBaseFS() { int clangTidyMain(int argc, const char **argv) { llvm::InitLLVM X(argc, argv); + SmallVector Args{argv, argv + argc}; + + llvm::BumpPtrAllocator Alloc; HerrCai0907 wrote: extract to an

[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

[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 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] 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] 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][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] 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] Create a check for signed and unsigned integers comparison (PR #113144)

2024-11-21 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,33 @@ +.. title:: clang-tidy - modernize-use-integer-sign-comparison + +modernize-use-integer-sign-comparison += + +Replace comparisons between signed and unsigned integers with their safe +C++20 ``std::cmp_*`` alternative, if availab

[clang-tools-extra] [clang-tidy] ignore consteval function in `ExceptionAnalyzer` (PR #116643)

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

[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)

2024-11-22 Thread Congcong Cai via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: HerrCai0907 wrote: > I too have the feeling that this feature is a responsibility of the build > system, not of clang-tidy I think clang-tidy should provide a easy-use environment. some project may don't support clang compiler due

[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-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/115180 >From 428283c7b61ca50d40ffd3ddc5c08aca39f39533 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 7 Nov 2024 00:35:47 +0800 Subject: [PATCH 1/4] [clang-tidy] fix false positive when detecting templated

[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-17 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) {

[clang] [clang][NFC] simplify the check for `ParseLabeledStatement` (PR #117430)

2024-11-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117430 `!isInvalid && !isUsable -> !isInvalid && !(!isInvalid && !isUnset) -> isUnset` It is more simple to understand. >From 61d17293801b552b40e78bc1277cea1c83741e56 Mon Sep 17 00:00:00 2001 From: Congcong Cai D

[clang] [clang][NFC] simplify the unset check in `ParseLabeledStatement` (PR #117430)

2024-11-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/117430 ___ 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 lambda expr for return-const-ref-from-parameter (PR #118990)

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

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: I am still confused why your team did not just disable this rule for test folder? It is normal cases that source code and test code have different quality metrics. https://github.com/llvm/llvm-project/pull/115051 ___

[clang-tools-extra] [clang-tidy] fix false positive in lambda expr for return-const-ref-from-parameter (PR #118990)

2024-12-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118990 >From d9f50466850ee966829ce80f273ad9a10aa24489 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 6 Dec 2024 23:45:56 +0800 Subject: [PATCH] [clang-tidy] fix false positive in lambda expr for return-con

[clang-tools-extra] [clang-tidy] fix false positive in lambda expr for return-const-ref-from-parameter (PR #118990)

2024-12-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/118990 ___ 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] merge same part matchers in return-const-ref-from-parameter (PR #118985)

2024-12-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118985 ___ 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] merge same part matchers in return-const-ref-from-parameter (PR #118985)

2024-12-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118985 None >From 7da6b1cef450ab31164bd2f79d7372ffdd66cdd5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 6 Dec 2024 23:15:36 +0800 Subject: [PATCH] [clang-tidy][NFC] merge same part matchers in return-co

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

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

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

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed 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] [analysis] support mutation analysis for pointee wip (PR #118593)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/118593 None >From 04e220ec2c16c65a3c785a586653ea4bc47337f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 3 Dec 2024 23:31:32 +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-05 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > tried using `TK_IgnoreUnlessSpelledInSource` but this breaks the template > based cases. Thanks! If it will waste you more effort, it's good to keep it like this. https://github.com/llvm/llvm-project/pull/118074 ___ cfe-commits

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2024-12-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. It would be better to use `GtestCmp` if you really want clang-tidy support gtest in this check. Here is an unfinished example which can match ```int v = 10; TEST(a, b) { std::optional a; if (v) { a = 1; } ASSERT_N

[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] 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] 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] 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 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] 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] 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][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] 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] 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][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] [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] 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 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][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

<    5   6   7   8   9   10   11   12   13   >