[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-26 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/7] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-23 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread Congcong Cai via cfe-commits
@@ -306,6 +306,10 @@ Changes in existing checks don't remove parentheses used in ``sizeof`` calls when they have array index accesses as arguments. +- Improved :doc:`modernize-use-constraints + ` check by fixing a crash that + occurred in some scenarios and excluded

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-constraints (PR #92019)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/92019 ___ 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 implicit casts with errors in bugprone-implicit-widening-of-multiplication-result (PR #92025)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/92025 ___ 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 check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,78 @@ +//===--- UseInternalLinkageCheck.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] new check misc-use-internal-linkage (PR #90830)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/7] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/91293 ___ 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 `if consteval` in else-after-return (PR #91588)

2024-05-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/91588 ___ 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-simplify-boolean-expr` avoid to warn expression expand from macro when ``IgnoreMacro`` option is enabled. (PR #91757)

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

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/91400 ___ 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-simplify-boolean-expr` avoid to warn expression expand from macro when ``IgnoreMacro`` option is enabled. (PR #91757)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91757 >From e23675eae31ed9c3cc4bbf31d3bc43b492ef5eac Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 May 2024 00:51:58 +0800 Subject: [PATCH 1/2] [clang-tidy] avoid false postive when ignore macro Fixes:

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Congcong Cai via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +

[clang-tools-extra] [clang-tidy] `readability-simplify-boolean-expr` avoid to warn expression expand from macro when ``IgnoreMacro`` option is enabled. (PR #91757)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91757 >From e23675eae31ed9c3cc4bbf31d3bc43b492ef5eac Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 May 2024 00:51:58 +0800 Subject: [PATCH] [clang-tidy] avoid false postive when ignore macro Fixes:

[clang-tools-extra] [clang-tidy] `readability-simplify-boolean-expr` avoid to warn expression expand from macro when ``IgnoreMacro`` option is enabled. (PR #91757)

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

[clang-tools-extra] [clang-tidy] avoid false postive when ignore macro (PR #91757)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91757 Fixes: #91487 >From d340a04ffa50e03eb5267e267a27dcae5fefa223 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 9 May 2024 00:51:58 +0800 Subject: [PATCH] [clang-tidy] avoid false postive when ignore

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-10 Thread Congcong Cai via cfe-commits
@@ -226,6 +236,10 @@ def run_clang_tidy(self): print("--") return clang_tidy_output +def check_no_diagnosis(self, clang_tidy_output): +if clang_tidy_output != "": +

[clang-tools-extra] [clang-tidy] use llvm::any_of refactor getAnalyzerCheckersAndPackages [NFC] (PR #91713)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/91713 ___ 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 llvm::any_of refactor getAnalyzerCheckersAndPackages [NFC] (PR #91713)

2024-05-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91713 None >From 035363d336a9b115d5584efe01733cb1b76792c4 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 10 May 2024 16:28:06 +0800 Subject: [PATCH] [clang-tidy] use llvm::any_of refactor

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/5] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/4] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [NFC][clang-tidy] remove magic-numbers-todo.cpp (PR #91577)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/91577 ___ 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 expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/3] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > And why is this not a valid test? No `CHECK-*` comments in the reference > file, so no violations from `clang-tidy` are expected? Because the FileCheck don't support empty input. https://github.com/llvm/llvm-project/pull/91293

[clang-tools-extra] [NFC][clang-tidy] remove magic-numbers-todo.cpp (PR #91577)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91577 This XFAIL test is written in 4 years ago and still todo. 4 is already in DefaultIgnoredIntegerValues so I do not think this XFAIL case can be passed. >From dbe6590cc841305da753100586054d5c3cccbe6c Mon Sep

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/3] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ 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 expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I remove the command line option. Instead, when input don't have any check, check-clang-tidy will assume it should not diagnose anything. https://github.com/llvm/llvm-project/pull/91293 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/3] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ 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 expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ 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 expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/91293 ___ 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 expect no diagnosis test (PR #91293)

2024-05-08 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Why can the tests not just accept reference files that do not contain any > CHECK-* comments? run-clang-tidy do assert for this, since FileCheck need to use this information to check the result. If nothing is provided, then nothing can be detected. > Also, isn't there

[clang-tools-extra] Add option to exclude headers from clang-tidy analysis (PR #91400)

2024-05-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: I wonder what is the target scenario for this feature. I remember regex can excluding some pattern, the we can exclude header file in `HeaderFilterRegex`. https://github.com/llvm/llvm-project/pull/91400 ___

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/91293 >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH 1/2] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] support expect no diagnosis test (PR #91293)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91293 None >From 55aecbedf3e10207eaef1d4c7913086a32e16b1e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 7 May 2024 10:55:45 +0800 Subject: [PATCH] [clang-tidy] support expect no diagnosis test ---

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/7] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/6] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-06 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,79 @@ +//===--- UseInternalLinkageCheck.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] [NFC][clang-tidy]increase stability for bugprone-return-const-ref-from-parameter (PR #91160)

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

[clang-tools-extra] [NFC][clang-tidy]increase stability for bugprone-return-const-ref-from-parameter (PR #91160)

2024-05-06 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Is there something specific you hit (test-case)? Either way, it's good to > check No, but I found run clang-tidy in clangd, there are lots of weird case (to process half-written code) https://github.com/llvm/llvm-project/pull/91160

[clang-tools-extra] [NFC][clang-tidy]increase stability for bugprone-return-const-ref-from-parameter (PR #91160)

2024-05-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/91160 None >From 8ba443f10a0fa65c319e5149a289d65f89a94d26 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 6 May 2024 10:58:23 +0800 Subject: [PATCH] [NFC][clang-tidy]increase stability for

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/5] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/4] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check misc-use-internal-linkage (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/90830 ___ 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 check misc-use-internal-linkage (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/90830 ___ 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 check readability-mark-static (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/3] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/3] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/2] reformat --- .../clang-tidy/readability/CMakeLists.txt

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From 24cbbd0c87ab2a06381d210da1dff5f966b72773 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH] reformat --- .../clang-tidy/readability/CMakeLists.txt |

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-04 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > * The auto-fix should be configurable to choose `static` or anonymous > namespace. Should I implement auto-fix for this check? Maybe some functions / variables will be marked incorrectly and cause link error because the coder just forget to include the header file but

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From ec7ddff8aedaa9d42796b5f952ff7ca77465dfd1 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH 1/4] [clang-tidy] new check readability-mark-static Add new

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-02 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Add support for unity builds (.cpp files included from single .cpp file = > isInMainFile is not sufficient) For unity build, it looks like a project level decision. Then they can ignore this check. Maybe I can provide an option to treat some extension as main file also.

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90830 >From ec7ddff8aedaa9d42796b5f952ff7ca77465dfd1 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 15:44:45 +0800 Subject: [PATCH] [clang-tidy] new check readability-mark-static Add new check

[clang-tools-extra] [clang-tidy] new check readability-mark-static (PR #90830)

2024-05-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/90830 Add new check readability-mark-static to dectect variable and function can be marked as static. >From 7f42888a6c7ee2bdb21c8d84b36b0821d32ffcc7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May

[clang-tools-extra] [NFC][clang-tidy] update check list document (PR #90813)

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

[clang-tools-extra] [NFC][clang-tidy] update check list document (PR #90813)

2024-05-01 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/90813 None >From fb7b2eec7dcd065ff3edfa0f76efc012e8439a63 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 2 May 2024 10:36:11 +0800 Subject: [PATCH] [NFC][clang-tidy] update check list document ---

[clang] [clang-tools-extra] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

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

[clang] [clang-tools-extra] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/90581 >From f0d640d4c1ba2ede182fdf31cc7030aad01de8b8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 30 Apr 2024 17:46:37 +0800 Subject: [PATCH 1/2] [analysis] assume expr is not mutated after analysis to

[clang] [NFC] fix typo in clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp (PR #90606)

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

[clang] [NFC] fix typo in clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp (PR #90606)

2024-04-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/90606 None >From fc5ede49608f8375f6a2170888d7fae77a7f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 30 Apr 2024 21:25:59 +0800 Subject: [PATCH] [NFC] fix typo in

[clang-tools-extra] [clang-tidy] Relax readability-const-return-type (PR #90560)

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

[clang] [analysis] assume expr is not mutated after analysis to avoid recursive (PR #90581)

2024-04-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/90581 Fixes: #89376. >From f0d640d4c1ba2ede182fdf31cc7030aad01de8b8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 30 Apr 2024 17:46:37 +0800 Subject: [PATCH] [analysis] assume expr is not mutated after

[clang-tools-extra] [clang-tidy] Ignore casts from void to void in bugprone-casting-through-void (PR #90566)

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

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/88636 ___ 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 bugprone-exception-rethrow check (PR #86448)

2024-04-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM in code. I am not a native English speaker so I can't review the documentation very well. https://github.com/llvm/llvm-project/pull/86448 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] fix false-negative for macros in `readability-math-missing-parentheses` (PR #90279)

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

[clang-tools-extra] [clang-tidy] Enable C23 support in modernize-use-nullptr (PR #89990)

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

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

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

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

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

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/8] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/7] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-23 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/6] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

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

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-22 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,34 @@ +//===--- ReturnConstRefFromParameterCheck.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] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/5] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-22 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,34 @@ +//===--- ReturnConstRefFromParameterCheck.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] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/4] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/4] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-20 Thread Congcong Cai via cfe-commits
@@ -341,9 +342,9 @@ Clang-Tidy Checks :doc:`portability-std-allocator-const `, :doc:`readability-avoid-const-params-in-decls `, "Yes" :doc:`readability-avoid-nested-conditional-operator `, - :doc:`readability-avoid-return-with-void-value `, +

[clang-tools-extra] 811ffc0 - [tidy] update check list [NFC]

2024-04-20 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2024-04-21T11:58:35+08:00 New Revision: 811ffc049ff914e15116c25ca8db7b8bd9a8e186 URL: https://github.com/llvm/llvm-project/commit/811ffc049ff914e15116c25ca8db7b8bd9a8e186 DIFF: https://github.com/llvm/llvm-project/commit/811ffc049ff914e15116c25ca8db7b8bd9a8e186.diff

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89497 >From 91915f68902ade86c0bf8eba643428017ae8bb3c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 20 Apr 2024 17:58:19 +0800 Subject: [PATCH 1/3] [tidy] add new check

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-20 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,35 @@ +//===--- ReturnConstRefFromParameterCheck.h - 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:

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-20 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,41 @@ +//===--- ReturnConstRefFromParameterCheck.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] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

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

[clang-tools-extra] [tidy] add new check bugprone-return-const-ref-from-parameter (PR #89497)

2024-04-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/89497 Detects the function which returns the const reference from parameter which causes potential use after free if the caller uses xvalue as argument. In c++, const reference parameter can accept xvalue which

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

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

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89076 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH 1/4] [clang-tidy] bugprone-lambda-function-name ignore macro

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89076 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH 1/4] [clang-tidy] bugprone-lambda-function-name ignore macro

[clang-tools-extra] [clang-tidy] fix add_new_check.py regex (PR #89189)

2024-04-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/89189 ___ 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 add_new_check.py regex (PR #89189)

2024-04-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/89189 avoid invalid escape sequence. ``` SyntaxWarning: invalid escape sequence '\(' ``` >From ea4452ec24608111ca37624b0113a5e4de6c6429 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 18 Apr 2024 17:15:44

[clang-tools-extra] [clang-tidy] Ignore deleted ctor in `bugprone-forwarding-reference-overload` (PR #88138)

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

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89076 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH 1/3] [clang-tidy] bugprone-lambda-function-name ignore macro

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89076 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH 1/3] [clang-tidy] bugprone-lambda-function-name ignore macro

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89076 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH 1/2] [clang-tidy] bugprone-lambda-function-name ignore macro

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/89076 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH 1/2] [clang-tidy] bugprone-lambda-function-name ignore macro

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/89076 Fixes: #89065 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH] [clang-tidy] bugprone-lambda-function-name

[clang-tools-extra] [clang-tidy] Ignore deleted ctor in `bugprone-forwarding-reference-overload` (PR #88138)

2024-04-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: please fix format issue.`git-clang-format` is helpful. https://github.com/llvm/llvm-project/pull/88138 ___ 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 deleted ctor in `bugprone-forwarding-reference-overload` (PR #88138)

2024-04-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I can help you to merge it.  https://github.com/llvm/llvm-project/pull/88138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >