https://github.com/HerrCai0907 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/88268
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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/3] [clang analysis] ExprMutationAnalyzer support recursive
Danny =?utf-8?q?M=C3=B6sch?= ,
Danny =?utf-8?q?M=C3=B6sch?= ,
Danny =?utf-8?q?M=C3=B6sch?= ,
Danny =?utf-8?q?M=C3=B6sch?=
Message-ID:
In-Reply-To:
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/87832
https://github.com/HerrCai0907 edited
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
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/2] [clang analysis] ExprMutationAnalyzer support recursive
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/87954
Partialy fixes: #60895
>From 19f66851204547232d586288fba79d8770837350 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Mon, 8 Apr 2024 09:20:58 +0800
Subject: [PATCH] [clang analysis] ExprMutationAnalyzer
Danny =?utf-8?q?M=C3=B6sch?= ,
Danny =?utf-8?q?M=C3=B6sch?= ,
Danny =?utf-8?q?M=C3=B6sch?= ,
Danny =?utf-8?q?M=C3=B6sch?=
Message-ID:
In-Reply-To:
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/81420
https://github.com/HerrCai0907 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/87433
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/87587
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/86129
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,200 @@
+//===--- EnumInitialValueCheck.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:
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/86129
>From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 15 Mar 2024 08:07:47 +0800
Subject: [PATCH 1/8] [clang-tidy] add new check readability-enum-initial-value
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/86129
>From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 15 Mar 2024 08:07:47 +0800
Subject: [PATCH 1/7] [clang-tidy] add new check readability-enum-initial-value
@@ -0,0 +1,199 @@
+//===--- EnumInitialValueCheck.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:
HerrCai0907 wrote:
> > Try getting rid of findNextTokenSkippingComments, and maybe just jump to
> > begin() + token width
>
> Do you think it is a good idea to use
> `ECD->getLocation().getLocWithOffset(ECD->getName().size())`?
It doesn't work for macro. I think the most precise way is to
HerrCai0907 wrote:
> Try getting rid of findNextTokenSkippingComments, and maybe just jump to
> begin() + token width
Do you think it is a good idea to use
`ECD->getLocation().getLocWithOffset(ECD->getName().size())`?
https://github.com/llvm/llvm-project/pull/86129
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/86129
>From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 15 Mar 2024 08:07:47 +0800
Subject: [PATCH 1/6] [clang-tidy] add new check readability-enum-initial-value
@@ -0,0 +1,193 @@
+//===--- EnumInitialValueCheck.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:
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/86129
>From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 15 Mar 2024 08:07:47 +0800
Subject: [PATCH 1/5] [clang-tidy] add new check readability-enum-initial-value
@@ -0,0 +1,82 @@
+//===--- EnumInitialValueCheck.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:
@@ -0,0 +1,82 @@
+//===--- EnumInitialValueCheck.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:
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/86129
>From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 15 Mar 2024 08:07:47 +0800
Subject: [PATCH 1/2] [clang-tidy] add new check readability-enum-initial-value
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/86129
Fixes: #85243.
>From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 15 Mar 2024 08:07:47 +0800
Subject: [PATCH] [clang-tidy] add new check
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/84922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
It should be another check in maybe performance, since this check wants to
detect unused return instead of iterator.
https://github.com/llvm/llvm-project/pull/84922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
HerrCai0907 wrote:
> Should this check really ignore postfix increment/decrement? Or maybe this
> check ignores it and a new check diagnoses `it++` vs `++it` (where possible).
> What are your thoughts on this?
@5chmidti What does `a new check diagnoses `it++` vs `++it` (where possible)`
@@ -169,16 +176,13 @@ void UnusedReturnValueCheck::registerMatchers(MatchFinder
*Finder) {
callee(functionDecl(
// Don't match void overloads of checked functions.
unless(returns(voidType())),
- // Don't match copy or move
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84922
>From d760b280a79be973642a0549db0e5a8838c397fd Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 12 Mar 2024 22:33:18 +0800
Subject: [PATCH 1/4] [clang-tidy]bugprone-unused-return-value ignore `++` and
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84922
>From d760b280a79be973642a0549db0e5a8838c397fd Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 12 Mar 2024 22:33:18 +0800
Subject: [PATCH 1/3] [clang-tidy]bugprone-unused-return-value ignore `++` and
@@ -165,20 +165,20 @@ void
UnusedReturnValueCheck::storeOptions(ClangTidyOptions::OptionMap ) {
void UnusedReturnValueCheck::registerMatchers(MatchFinder *Finder) {
auto MatchedDirectCallExpr = expr(
- callExpr(
- callee(functionDecl(
- // Don't
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84922
>From d760b280a79be973642a0549db0e5a8838c397fd Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 12 Mar 2024 22:33:18 +0800
Subject: [PATCH 1/2] [clang-tidy]bugprone-unused-return-value ignore `++` and
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/84922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
> Please mention changes in Release Notes.
release notes already includes this change.
https://github.com/llvm/llvm-project/pull/84922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/84922
Fixes: #84705
>From d760b280a79be973642a0549db0e5a8838c397fd Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 12 Mar 2024 22:33:18 +0800
Subject: [PATCH] [clang-tidy]bugprone-unused-return-value
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/84489
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84489
>From 265db5ee772772bef4099cc97b69995cfa67b3f2 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 8 Mar 2024 22:15:20 +0800
Subject: [PATCH 1/3] [clang-tidy]avoid bugprone-unused-return-value false
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84489
>From 265db5ee772772bef4099cc97b69995cfa67b3f2 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 8 Mar 2024 22:15:20 +0800
Subject: [PATCH 1/2] [clang-tidy]avoid bugprone-unused-return-value false
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84489
>From 265db5ee772772bef4099cc97b69995cfa67b3f2 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Fri, 8 Mar 2024 22:15:20 +0800
Subject: [PATCH] [clang-tidy]avoid bugprone-unused-return-value false positive
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/84489
Fixes: #84480
We assuem assignemnt at most of time, operator overloading means the value is
assigned to the other variable, then clang-tidy should suppress warning even if
this operator overloading match
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/84333
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84333
>From aaa9ea1db21b5de5d8be454ce1b1d05b219cccfc Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 7 Mar 2024 23:28:40 +0800
Subject: [PATCH 1/2] [clang-tidy]avoid bugprone-unused-return-value false
https://github.com/HerrCai0907 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/77246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84333
>From aaa9ea1db21b5de5d8be454ce1b1d05b219cccfc Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 7 Mar 2024 23:28:40 +0800
Subject: [PATCH] [clang-tidy]avoid bugprone-unused-return-value false negative
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/84333
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/84333
String without `$` end causes incorrectly match results, For example
`std::unique` can match `std::unique_ptr::unique_ptr`.
It causes false negative.
Fixes: #84314.
>From
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/83930
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/84095
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84095
>From 160add4d95f34608a3d423482ad50fb45f6db522 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 6 Mar 2024 06:55:30 +0800
Subject: [PATCH 1/4] [clang-tidy][NFC]refactor AssertSideEffectCheck logic
---
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/84095
>From 160add4d95f34608a3d423482ad50fb45f6db522 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 6 Mar 2024 06:55:30 +0800
Subject: [PATCH 1/3] [clang-tidy][NFC]refactor AssertSideEffectCheck logic
---
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/84095
Fixes: #84092
>From 160add4d95f34608a3d423482ad50fb45f6db522 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 6 Mar 2024 06:55:30 +0800
Subject: [PATCH 1/2] [clang-tidy][NFC]refactor
https://github.com/HerrCai0907 approved this pull request.
LGTM since it is helpful to improve this check.
But I still take a negative view about use `std::forward` in lambda body.
https://github.com/llvm/llvm-project/pull/83987
___
cfe-commits
@@ -156,7 +156,8 @@ Changes in existing checks
- Improved :doc:`cppcoreguidelines-missing-std-forward
` check by no longer
- giving false positives for deleted functions.
+ giving false positives for deleted functions and fix false negative when one
+ parameter is
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/83987
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
> Capture by reference makes t in parameter same with it in lambda body
That is definitely wrong.
It will get an error for this code if address sanitize is enabled.
```c++
#include
#include
template
auto f(T &) {
return [&]() {
return std::forward(t);
};
}
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/83930
Fixes: #83845
Capturing variable in lambda by reference and doing forward in lambda body are
like constructing a struct by reference and using std::forward in some member
function. It is dangerous if the
HerrCai0907 wrote:
I agree to fix false positive reported in #68105. But for capturing in lambda
be reference and do forward in lambda, It is just like create a record by ref
instead of using forward and do forward in some member function. I don't think
it is an expected false positive.
https://github.com/HerrCai0907 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/83716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/82673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/82689
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/83055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/78598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/82952
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/81420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -42,10 +43,28 @@ void AvoidReturnWithVoidValueCheck::check(
const auto *VoidReturn = Result.Nodes.getNodeAs("void_return");
if (IgnoreMacros && VoidReturn->getBeginLoc().isMacroID())
return;
- if (!StrictMode && !Result.Nodes.getNodeAs("compound_parent"))
+ const
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/81420
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/72050
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/81985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/81560
>From 35dba54b1d6d158118c34d0f1bd8038b64c9bda4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:11:06 +0800
Subject: [PATCH 1/3] [clang-tidy] fix incorrect hint for InitListExpr in
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/81560
>From 35dba54b1d6d158118c34d0f1bd8038b64c9bda4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:11:06 +0800
Subject: [PATCH 1/2] [clang-tidy] fix incorrect hint for InitListExpr in
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/81563
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/81563
Fixes: #81419.
>From fefe52614837d14858d056783dca8b08745de9d4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:47:52 +0800
Subject: [PATCH] [clang-tidy] ignore local variable with
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/81560
Fixes: #77684.
>From 35dba54b1d6d158118c34d0f1bd8038b64c9bda4 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Tue, 13 Feb 2024 09:11:06 +0800
Subject: [PATCH] [clang-tidy] fix incorrect hint for
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -fsyntax-only -Wunused-lambda-capture
-Wused-but-marked-unused -Wno-uninitialized -verify -std=c++20 %s
+
+void test() {
+ int i;
+ auto explicit_by_value_unused_requires = [i] (auto) requires requires { i; }
{}; // expected-warning{{lambda
@@ -19706,22 +19706,29 @@ static void buildLambdaCaptureFixit(Sema ,
LambdaScopeInfo *LSI,
}
}
+static DeclContext *ignoreReuquiresBodyDecl(DeclContext *DC) {
HerrCai0907 wrote:
I think inline it will be better since we only call it once.
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/78598
>From 8fa3dc43e770025308da47f6aff309fa58c47fc3 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 18 Jan 2024 23:12:23 +0800
Subject: [PATCH 1/4] [clang] reject to capture variable in
HerrCai0907 wrote:
> You have an example of that? There may be further bugs there.
> id-expression that appear in any unevaluated context should not be captured (
> typeid being an exception
I think it is from standard, but from user-friendly site. Now clang will hint
user some variables is
HerrCai0907 wrote:
ping @erichkeane @cor3ntin
https://github.com/llvm/llvm-project/pull/78598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Danny =?utf-8?q?M=C3=B6sch?=
Message-ID:
In-Reply-To:
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/80537
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/71701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
> It should not work, as this is not array, but pointer
Agree. But it fulfills the description of this opinion, since it looks like to
construct a array from string literals.
It would be better to explain it in document.
> incomplete array types constructed from string
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/78598
>From 8fa3dc43e770025308da47f6aff309fa58c47fc3 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 18 Jan 2024 23:12:23 +0800
Subject: [PATCH 1/3] [clang] reject to capture variable in
https://github.com/HerrCai0907 commented:
I may not work for
```c++
void f(const char name[]);
f("111");
```
https://github.com/llvm/llvm-project/pull/71701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/HerrCai0907 commented:
Should it change the mangle part in libcxx also?
https://github.com/llvm/llvm-project/pull/78896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -147,10 +161,52 @@ void OwningMemoryCheck::registerMatchers(MatchFinder
*Finder) {
// Matching on functions, that return an owner/resource, but don't declare
// their return type as owner.
Finder->addMatcher(
-
Author: Congcong Cai
Date: 2024-01-20T22:43:15+08:00
New Revision: 0f80f5e362fb43a9335bd154c5f7976a96e32cfc
URL:
https://github.com/llvm/llvm-project/commit/0f80f5e362fb43a9335bd154c5f7976a96e32cfc
DIFF:
https://github.com/llvm/llvm-project/commit/0f80f5e362fb43a9335bd154c5f7976a96e32cfc.diff
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/77943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
> Thanks for the patch!
>
> Requires Expressions should be in an unevaluated context, so we should never
> try to capture variables they mentioned.
>
> Maybe we need to test the evaluation context in either `tryCaptureVariable`
> or `NeedToCaptureVariable`, rather than a
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/78598
>From 8fa3dc43e770025308da47f6aff309fa58c47fc3 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 18 Jan 2024 23:12:23 +0800
Subject: [PATCH 1/3] [clang] reject to capture variable in
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/78598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/78598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/78598
>From 8fa3dc43e770025308da47f6aff309fa58c47fc3 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Thu, 18 Jan 2024 23:12:23 +0800
Subject: [PATCH 1/2] [clang] reject to capture variable in
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/77943
>From 537d283288f555c2bb7cff90aee89fe9b18f08b8 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Sat, 13 Jan 2024 00:31:33 +0800
Subject: [PATCH 1/4] [clang-tid]fix modernize-use-auto incorrect fix hints for
https://github.com/HerrCai0907 approved this pull request.
https://github.com/llvm/llvm-project/pull/78796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/78630
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/78598
Expression in `RequiresExprBodyDecl` is resolved as constants and should not be
captured.
Fixes: #69307, #76593.
>From 33db497c31fd9da3a3acfc0d419dcdc396752863 Mon Sep 17 00:00:00 2001
From: Congcong Cai
HerrCai0907 wrote:
> LGTM. There is open issue for performance of this check. Consider mentioning
> this in release notes as some generic performance improvement.
I have also seen this issue. But after optimization, this check is still slow.
I guess registering too many pattern causes
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/78231
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
> Thanks, the code looks good. Do you have any performance data after this
> change?
I don't run clang-tidy bench for some large project. But I do some test for
some auto-generated cpp file which has lots of using, and the execution time
reduce from 0.2s to 0.18s in my MAC
@@ -173,16 +173,30 @@ StringRef getEquivalentBoolLiteralForExpr(const Expr
*Expression,
return {};
}
+bool needsSpacePrefix(SourceLocation Loc, ASTContext ) {
+ SourceRange PrefixRange(Loc.getLocWithOffset(-1), Loc);
+ StringRef SpaceBeforeStmtStr = Lexer::getSourceText(
201 - 300 of 566 matches
Mail list logo