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

2024-06-06 Thread Congcong Cai via cfe-commits
@@ -24,12 +24,28 @@ namespace { AST_MATCHER(Decl, isFirstDecl) { return Node.isFirstDecl(); } -AST_MATCHER_P(Decl, isInMainFile, FileExtensionsSet, HeaderFileExtensions) { +static bool isInMainFile(SourceLocation L, SourceManager &SM, + const FileExten

[clang-tools-extra] [clang-tidy]fix crashing when self include cycles for misc-header-include-cycle (PR #94636)

2024-06-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/94636 Fixes: #94634 >From 28ef0936ee115720bbe6cc20cf255100d63780cc Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 7 Jun 2024 00:11:55 +0800 Subject: [PATCH] [clang-tidy]fix crashing when self include cycl

[clang-tools-extra] [clang-tidy]fix crashing when self include cycles for misc-header-include-cycle (PR #94636)

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

[clang-tools-extra] [clang-tidy] refactor misc-header-include-cycle (PR #94697)

2024-06-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/94697 1. merge valid check 2. use range base loop >From 8104085685772f93bcc595858821f839636ada9e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 7 Jun 2024 07:06:37 +0800 Subject: [PATCH] [clang-tidy] refa

[clang-tools-extra] [clang-tidy] refactor misc-header-include-cycle (PR #94697)

2024-06-06 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/94697 ___ 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-06-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed 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] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/94923 Fixes: #93335 For decl with body, we should provide physical locations also. Because it may be the function which have the same name as std library. >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/94923 >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 10 Jun 2024 09:04:27 +0800 Subject: [PATCH] [clang-tidy] fix false positives for the functions with the s

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-06-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. `at` and `operator[]` in `std::map` have different meanings. `operator[]` will insert value if key does not exist but `at` won't. Please limit this check only for index containers instead of key-value containers. https://gi

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-10 Thread Congcong Cai via cfe-commits
@@ -15,3 +15,5 @@ std::string HelloString; // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: no header providing "std::string" is directly included [misc-include-cleaner] int FooBarResult = foobar(); // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: no header providing "foobar" is direc

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/94923 >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 10 Jun 2024 09:04:27 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positives for the functions with t

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

2024-06-11 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/94923 >From e467b03cc120eedc580c185232f000e0d8aa0cc7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 10 Jun 2024 09:04:27 +0800 Subject: [PATCH 1/2] [clang-tidy] fix false positives for the functions with t

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() (PR #90043)

2024-06-11 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > To be clear and reiterate my previous comment: this check should NOT require > users to use at(). That behavior should be opt-in. It should only warn about > using operator[]. It's up to the users to figure out what the best > replacement is. I don't think it is a good so

[clang-tools-extra] [clang-tidy] fix false positives for the functions with the same name as standard library functions in misc-include-cleaner (PR #94923)

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

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-12 Thread Congcong Cai via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= Message-ID: In-Reply-To: HerrCai0907 wrote: > I

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-12 Thread Congcong Cai via cfe-commits
Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= , Paul =?utf-8?q?Heidekrüger?= Message-ID: In-Reply-To: HerrCai0907 wrote: > >

[clang-tools-extra] [clang-tidy] ignoring macro with hash preprocessing token in cppcoreguidelines-macro-usage (PR #95265)

2024-06-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95265 `#` and `##` preprocessing tokens cannot be replaced by constexpr function. It should be ignored in check. >From eaeb5b6493e0c3980a60f9acbc5572de0d619419 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Th

[clang-tools-extra] [clang-tidy] ignoring macro with hash preprocessing token in cppcoreguidelines-macro-usage (PR #95265)

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

[clang-tools-extra] tidy (PR #95384)

2024-06-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95384 - **[MLIR] Translate DIStringType. (#94480)** - **[clangd] Fix crash with null check for Token at Loc (#94528)** - **[flang][Transforms][NFC] Remove boilerplate from vscale range pass (#94598)** - **[PowerPC]

[clang-tools-extra] 3f9e2e1 - [NFC][clang-tidy] fix typo in readability-else-after-return

2024-06-13 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2024-06-13T18:24:12+08:00 New Revision: 3f9e2e179a52eb50a2bcff148a5f351a4eddcb37 URL: https://github.com/llvm/llvm-project/commit/3f9e2e179a52eb50a2bcff148a5f351a4eddcb37 DIFF: https://github.com/llvm/llvm-project/commit/3f9e2e179a52eb50a2bcff148a5f351a4eddcb37.diff

[clang-tools-extra] tidy (PR #95384)

2024-06-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/95384 ___ 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 positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

2024-06-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95434 Fixes: #90274 >From ecbd726bb937361b243ea4433e8c597c8d30f857 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 14 Jun 2024 00:50:04 +0800 Subject: [PATCH] [clang-tidy] avoid false positive when overloa

[clang-tools-extra] [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

2024-06-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/95434 >From ecbd726bb937361b243ea4433e8c597c8d30f857 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 14 Jun 2024 00:50:04 +0800 Subject: [PATCH 1/2] [clang-tidy] avoid false positive when overload for bugpr

[clang-tools-extra] [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

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

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/95550 ___ 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 of the result of std::move() is used as rvalue for performance-move-const-arg (PR #95633)

2024-06-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95633 Fixes: #86404 >From 0022050f7b537914dff7adf937103def4c9c939a Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 15 Jun 2024 05:40:50 + Subject: [PATCH] [clang-tidy]fix false positives of the result

[clang-tools-extra] [clang-tidy]fix false positives of the result of std::move() is used as rvalue for performance-move-const-arg (PR #95633)

2024-06-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/95633 >From 0022050f7b537914dff7adf937103def4c9c939a Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 15 Jun 2024 05:40:50 + Subject: [PATCH 1/2] [clang-tidy]fix false positives of the result of std::mov

[clang-tools-extra] [clang-tidy]fix false positives of the result of std::move() is used as rvalue for performance-move-const-arg (PR #95633)

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

[clang-tools-extra] [clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (PR #93827)

2024-06-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/93827 ___ 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 negatives for performance-inefficient-vector-operation (PR #95667)

2024-06-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95667 Fixes: #95596 Check will warn if the loop var type is not same as var init expr type >From 5a4a4aac26a2a4078f07977b5101d3a1e22a3e0c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 15 Jun 2024 16:24:5

[clang-tools-extra] [clang-tidy] fix false negatives for performance-inefficient-vector-operation (PR #95667)

2024-06-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/95667 ___ 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 negatives for performance-inefficient-vector-operation (PR #95667)

2024-06-15 Thread Congcong Cai via cfe-commits
@@ -387,3 +387,38 @@ void foo(const StructWithFieldContainer &Src) { B.push_back(Number); } } + +namespace gh95596 { + +void f(std::vector& t) { + { +std::vector gh95596_0; +// CHECK-FIXES: gh95596_0.reserve(10); +for (unsigned i = 0; i < 10; ++i) + gh95

[clang-tools-extra] [clang-tidy] fix false negatives for performance-inefficient-vector-operation (PR #95667)

2024-06-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/95667 >From 5a4a4aac26a2a4078f07977b5101d3a1e22a3e0c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 15 Jun 2024 16:24:55 + Subject: [PATCH 1/2] [clang-tidy] fix false negatives for performance-ineffici

[clang-tools-extra] [clang-tidy] fix false negatives for performance-inefficient-vector-operation (PR #95667)

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

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95729 Fixes: #95658 Unqualified canonical type should be used instead of normal QualType for type equality comparison >From 40f18f2be624ed2a5b4922e67e4ed6070d2d2400 Mon Sep 17 00:00:00 2001 From: Congcong Cai Da

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/95729 >From 40f18f2be624ed2a5b4922e67e4ed6070d2d2400 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 17 Jun 2024 00:13:20 + Subject: [PATCH 1/2] [clang][analyzer] use unqualified canonical type during m

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/95797 When a definition is being located, standard library function recognition is skipped if the function has a definition with body in the main file >From 71a2c0d29058edac2539fbbe406890e6a6dc875c Mon Sep 17 00:

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Do you need us to merge this, or you have merge rights? Yes. https://github.com/llvm/llvm-project/pull/95729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

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

[clang] [clang][analyzer] use unqualified canonical type during merging equivalence class (PR #95729)

2024-06-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Excellent quality. Thank for fixing this. Should I fix the other type comparison in static analysis? It looks like not consider this case at lots of position. https://github.com/llvm/llvm-project/pull/95729 ___ cfe-commits mail

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-18 Thread Congcong Cai via cfe-commits
@@ -39,20 +40,24 @@ Hints declHints(const Decl *D) { } std::vector> locateDecl(const Decl &D) { - std::vector> Result; - // FIXME: Should we also provide physical locations? - if (auto SS = tooling::stdlib::Recognizer()(&D)) { -Result.push_back({*SS, Hints::CompleteSymb

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

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

[clang-tools-extra] [clang][include-cleaner]skip stdlib recogntion only when there are defintion with body in main file. (PR #95797)

2024-06-19 Thread Congcong Cai via cfe-commits
@@ -39,20 +40,24 @@ Hints declHints(const Decl *D) { } std::vector> locateDecl(const Decl &D) { - std::vector> Result; - // FIXME: Should we also provide physical locations? - if (auto SS = tooling::stdlib::Recognizer()(&D)) { -Result.push_back({*SS, Hints::CompleteSymb

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/96122 When clang-tidy get an empty checks, it will throw "no checks enabled" error and exit with non-zero return value. It make clang-tidy's wrapper program confused when in big project some files don't want to be

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > if a reason for this parameter is not to fail wrapper scripts, then maybe > run-clang-tidy.py / run-clang-tidy-diff.py should also be updated. Both of them is fine because they only count the failed file and don't do any check about failure. https://github.com/llvm/llvm-p

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96122 >From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Jun 2024 23:20:09 + Subject: [PATCH 1/2] [clang-tidy] add option to avoid "no checks enabled" erro

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96122 >From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Jun 2024 23:20:09 + Subject: [PATCH 1/3] [clang-tidy] add option to avoid "no checks enabled" erro

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96122 >From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Jun 2024 23:20:09 + Subject: [PATCH 1/4] [clang-tidy] add option to avoid "no checks enabled" erro

[clang-tools-extra] [clang-tidy] align all help message in run-clang-tidy (PR #96199)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/96199 None >From 36194358315d1614cb6d802d30ffc7c651c9ff44 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 14:36:51 + Subject: [PATCH] [clang-tidy] align all help message in run-clang-tidy -

[clang-tools-extra] [clang-tidy] align all help message in run-clang-tidy (PR #96199)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96199 >From 03bc40a343227cb839ec908492c0d904be9af654 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 14:36:51 + Subject: [PATCH] [clang-tidy] align all help message in run-clang-tidy [NFC] -

[clang-tools-extra] [clang-tidy] add fixhint for misc-use-internal-linkage (PR #96203)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/96203 None >From 669205c0f659239c58a3bde3ddadabb0a8ecbad8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 15:05:57 + Subject: [PATCH] [clang-tidy] add fixhint for misc-use-internal-linkage

[clang-tools-extra] [clang-tidy] align all help message in run-clang-tidy (PR #96199)

2024-06-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96199 >From 03bc40a343227cb839ec908492c0d904be9af654 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 14:36:51 + Subject: [PATCH 1/2] [clang-tidy] align all help message in run-clang-tidy [NF

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-20 Thread Congcong Cai via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -342,31 +342,33 @@ void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) { if (DenominatorSize > CharUnits::Zero() && !NumeratorSize.isMultipleOf(DenominatorSize)) {

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

2024-06-04 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: Apa

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

2024-06-04 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: Apa

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

2024-04-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/87954 >From 19f66851204547232d586288fba79d8770837350 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 8 Apr 2024 09:20:58 +0800 Subject: [PATCH 1/4] [clang analysis] ExprMutationAnalyzer support recursive fo

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference (PR #87954)

2024-04-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/87954 ___ 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-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM in source code part. 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-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited 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-15 Thread Congcong Cai via cfe-commits
@@ -286,6 +286,10 @@ Changes in existing checks check by resolving fix-it overlaps in template code by disregarding implicit instances. +- Improved :doc:`bugprone-forwarding-reference-overload + ` + check to not flag deleted constructors which are unable to hide anything

[clang] [clang-tools-extra] Revert "[clang analysis] ExprMutationAnalyzer avoid infinite recursion for recursive forwarding reference" (PR #88765)

2024-04-15 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Sorry, I will re-land it after fixing this bug. https://github.com/llvm/llvm-project/pull/88765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer support recursive forwarding reference (PR #88843)

2024-04-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/88843 Partialy fixes: #60895 >From bfc4567ffa00d48e673f5644536c1863814ca0c3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 8 Apr 2024 09:20:58 +0800 Subject: [PATCH] [clang analysis] ExprMutationAnalyzer

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer support recursive forwarding reference (PR #88843)

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

[clang] [clang-tools-extra] [clang analysis] ExprMutationAnalyzer support recursive forwarding reference (PR #88843)

2024-04-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/88843 ___ 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

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

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

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

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

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

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

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

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

[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
@@ -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: Apa

[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: Apa

[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 bugprone-return-const-ref-from-param

[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
@@ -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 `, + :doc:`readability-a

[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 bugprone-return-const-ref-from-param

[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 bugprone-return-const-ref-from-param

[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: Apa

[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 bugprone-return-const-ref-from-param

[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: Apa

[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-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 bugprone-return-const-ref-from-param

[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 bugprone-return-const-ref-from-param

[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 bugprone-return-const-ref-from-param

[clang-tools-extra] [clang-tidy] Add modernize-use-cpp-style-comments check (PR #99713)

2024-07-20 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,67 @@ +//===--- UseCppStyleCommentsCheck.cpp - clang-tidy-===// + +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[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 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] [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] [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] 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 cfe-commits@lists.ll

[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

<    1   2   3   4   5   6   7   8   9   10   >