[clang-tools-extra] [clang-tidy] Add StrictMode to cppcoreguidelines-pro-type-static-cast-downcast (PR #69529)

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

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-10-26 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/66573 ___ 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 PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/70316 - assignment twice cannot be simplified to once when assigning to reference type - safe assignment cannot be advanced before unsafe assignment >From 41278ca046ae5d4be4ac4ac1bc673b5010668d9c Mon Sep 17 00:00:0

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Congcong Cai via cfe-commits
@@ -570,3 +570,19 @@ struct PR52818 { int bar; }; + +struct RefReassignment { + RefReassignment(int &i) : m_i{i} { +m_i = 1; + } + int & m_i; +}; + +struct ReassignmentAfterUnsafetyAssignment { + ReassignmentAfterUnsafetyAssignment() { +int a = 10; +m_i =

[clang-tools-extra] [clang-tidy]Fix PreferMemberInitializer false positive for reassignment (PR #70316)

2023-10-26 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/70316 >From 41278ca046ae5d4be4ac4ac1bc673b5010668d9c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 26 Oct 2023 18:54:05 +0800 Subject: [PATCH 1/2] [clang-tidy]Fix PreferMemberInitializer false positive fo

[clang] [clang]set invalid for lambda which missing capture `this` (PR #70432)

2023-10-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/70432 It can suppression further crash. Fixes: #67687 >From c12aeb6f2a83b9cb3c3815e72d57638cf7de43a0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 27 Oct 2023 16:51:59 +0800 Subject: [PATCH] WIP fix lambd

[clang-tools-extra] [clang-tidy][test] Add more bugprone-string-constructor tests (PR #70456)

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

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/66846 Fixes: #66204 >From 6d8e737ab1a883371a7491b676e1e202a087701f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 19 Sep 2023 16:15:20 +0800 Subject: [PATCH] [clang-analysis]Fix false positive in mutation

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66846 >From 6d8e737ab1a883371a7491b676e1e202a087701f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 19 Sep 2023 16:15:20 +0800 Subject: [PATCH] [clang-analysis]Fix false positive in mutation check when usi

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

2023-09-20 Thread Congcong Cai via cfe-commits
@@ -729,3 +729,21 @@ struct forward_declared_as_struct; class forward_declared_as_struct { }; +namespace pr55156 { + +typedef enum { + VALUE0, + VALUE1, +} ValueType; HerrCai0907 wrote: Could you also add some test cases for function typedef? https://githu

[clang-tools-extra] [clang-tidy] Fix support for typedefs in readability-identifier-naming (PR #66835)

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

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66846 >From 6d8e737ab1a883371a7491b676e1e202a087701f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 19 Sep 2023 16:15:20 +0800 Subject: [PATCH 1/2] [clang-analysis]Fix false positive in mutation check when

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918 >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/5] [Sema] add cast from IncompleteArrayType to ConstantArray

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918 >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/5] [Sema] add cast from IncompleteArrayType to ConstantArray

[clang] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66846 >From 6d8e737ab1a883371a7491b676e1e202a087701f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 19 Sep 2023 16:15:20 +0800 Subject: [PATCH 1/2] [clang-analysis]Fix false positive in mutation check when

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66846 >From 6d8e737ab1a883371a7491b676e1e202a087701f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 19 Sep 2023 16:15:20 +0800 Subject: [PATCH 1/2] [clang-analysis]Fix false positive in mutation check when

[clang] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
@@ -274,8 +288,8 @@ const Stmt *ExprMutationAnalyzer::findDirectMutation(const Expr *Exp) { const auto NonConstMethod = cxxMethodDecl(unless(isConst())); const auto AsNonConstThis = expr(anyOf( - cxxMemberCallExpr(callee(NonConstMethod), -on(c

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
@@ -274,8 +288,8 @@ const Stmt *ExprMutationAnalyzer::findDirectMutation(const Expr *Exp) { const auto NonConstMethod = cxxMethodDecl(unless(isConst())); const auto AsNonConstThis = expr(anyOf( - cxxMemberCallExpr(callee(NonConstMethod), -on(c

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

2023-09-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66846 >From 6d8e737ab1a883371a7491b676e1e202a087701f Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 19 Sep 2023 16:15:20 +0800 Subject: [PATCH 1/4] [clang-analysis]Fix false positive in mutation check when

[clang-tools-extra] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

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

[clang] [clang-analysis]Fix false positive in mutation check when using pointer to member function (PR #66846)

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

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-25 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918 >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/6] [Sema] add cast from IncompleteArrayType to ConstantArray

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-28 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I guess this ends up producing a CK_NoOp CastExpr? That's probably okay, but > can we amend the documentation for CK_NoOp to give this as an example? Done https://github.com/llvm/llvm-project/pull/65918 ___ cfe-commits mailing li

[clang-tools-extra] [clang-tidy][libc] Fix namespace check with macro (PR #68134)

2023-10-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. Please update the release notes. https://github.com/llvm/llvm-project/pull/68134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] 9be33de - [clang-tidy]`pro-bounds-array-to-pointer-decay` ignore predefined expression

2023-08-18 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2023-08-19T08:13:00+08:00 New Revision: 9be33de4f39713c2deb7cc262b4dd4e50dc8349d URL: https://github.com/llvm/llvm-project/commit/9be33de4f39713c2deb7cc262b4dd4e50dc8349d DIFF: https://github.com/llvm/llvm-project/commit/9be33de4f39713c2deb7cc262b4dd4e50dc8349d.diff

[clang-tools-extra] 1c94124 - [clang-tidy]mark record initList as non-const param

2023-08-21 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2023-08-22T11:43:27+08:00 New Revision: 1c9412441b87eb15262fb4653015ff30c42d URL: https://github.com/llvm/llvm-project/commit/1c9412441b87eb15262fb4653015ff30c42d DIFF: https://github.com/llvm/llvm-project/commit/1c9412441b87eb15262fb4653015ff30c42d.diff

[clang-tools-extra] 9b6859d - [clang-tidy][readability-braces-around-statements] ignore false-positive for constexpr if statement in lambda expression

2023-08-21 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2023-08-22T14:21:59+08:00 New Revision: 9b6859dc89b9578cc31811e6c122ed79ec58dac3 URL: https://github.com/llvm/llvm-project/commit/9b6859dc89b9578cc31811e6c122ed79ec58dac3 DIFF: https://github.com/llvm/llvm-project/commit/9b6859dc89b9578cc31811e6c122ed79ec58dac3.diff

[clang-tools-extra] [clang-tidy][modernize-return-braced-init-list]fix false-positives (PR #68491)

2023-10-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/68491 fix false-positives when constructing the container with ``count`` copies of elements with value ``value`` (e.g., ``vector(size_type count, const T& value);``). Fixes: #68159 >From d1b76f7649e1b1239ad328c7da

[clang-tools-extra] [clang-tidy][modernize-return-braced-init-list]fix false-positives (PR #68491)

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

[clang-tools-extra] [clang-tidy][modernize-return-braced-init-list]fix false-positives (PR #68491)

2023-10-07 Thread Congcong Cai via cfe-commits
@@ -17,11 +17,21 @@ using namespace clang::ast_matchers; namespace clang::tidy::modernize { void ReturnBracedInitListCheck::registerMatchers(MatchFinder *Finder) { - // Skip list initialization and constructors with an initializer list. + auto SemanticallyDifferentContainer

[clang-tools-extra] [clang-tidy][modernize-return-braced-init-list]fix false-positives (PR #68491)

2023-10-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/68491 >From d1b76f7649e1b1239ad328c7da9b1f9d8fb2c5f3 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 8 Oct 2023 01:00:15 +0800 Subject: [PATCH 1/2] [clang-tidy][modernize-return-braced-init-list]fix false-p

[clang-tools-extra] [clang-tidy][modernize-return-braced-init-list]fix false-positives (PR #68491)

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

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/68646 Fixes:#68542 It is meaningless to diagnose further error for a invalid function declaration. >From ffc9412252cd0e046978f183384375580bd31245 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Oct 2023

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/68646 >From ffc9412252cd0e046978f183384375580bd31245 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Oct 2023 07:52:06 +0800 Subject: [PATCH 1/2] [clang]Avoid diagnoise invalid consteval call for invalid

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/68646 >From ffc9412252cd0e046978f183384375580bd31245 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 10 Oct 2023 07:52:06 +0800 Subject: [PATCH 1/3] [clang]Avoid diagnoise invalid consteval call for invalid

[clang] [clang][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: please update release note also https://github.com/llvm/llvm-project/pull/68510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Congcong Cai via cfe-commits
@@ -599,7 +599,7 @@ void transferAssignment(const CXXOperatorCallExpr *E, BoolValue &HasValueVal, LatticeTransferState &State) { assert(E->getNumArgs() > 0); - if (auto *Loc = cast( + if (auto *Loc = dyn_cast_or_null( HerrCai0907 w

[clang] [clang]Avoid diagnose invalid consteval call for invalid function decl (PR #68646)

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

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

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

[clang] [clang]Transform uninstantiated ExceptionSpec in TemplateInstantiator (PR #68878)

2023-10-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/68878 Fixes #68543, #42496 >From b93096929aa98e17dfdb0240a9285d315fc95bfc Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Oct 2023 19:31:08 +0800 Subject: [PATCH] [clang]Transform uninstantiated Exceptio

[clang] [clang]Transform uninstantiated ExceptionSpec in TemplateInstantiator (PR #68878)

2023-10-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/68878 >From b93096929aa98e17dfdb0240a9285d315fc95bfc Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Oct 2023 19:31:08 +0800 Subject: [PATCH 1/2] [clang]Transform uninstantiated ExceptionSpec in Template

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/69062 None >From bfeaa2eeaa3d20e1919288bcf1027ec196378236 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 00:20:08 +0800 Subject: [PATCH] [clang-tidy][modernize-loop-convert]check isDependentSi

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69062 >From bfeaa2eeaa3d20e1919288bcf1027ec196378236 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 00:20:08 +0800 Subject: [PATCH 1/2] [clang-tidy][modernize-loop-convert]check isDependentSize

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

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

[clang] [clang]Avoid to check created local variable multiple time when evaluating (PR #69106)

2023-10-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/69106 When evaluating variable initialized from compound literal multiple times, it will be converted to evaluting the compound literal itself multiple times, which causes clang crash in assertions. Further evalua

[clang-tools-extra] Fix #35272: Don't replace typedefs in extern c scope (PR #69102)

2023-10-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: please update release note and doc https://github.com/llvm/llvm-project/pull/69102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69062 >From bfeaa2eeaa3d20e1919288bcf1027ec196378236 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 00:20:08 +0800 Subject: [PATCH 1/3] [clang-tidy][modernize-loop-convert]check isDependentSize

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

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

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69062 >From bfeaa2eeaa3d20e1919288bcf1027ec196378236 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 00:20:08 +0800 Subject: [PATCH 1/3] [clang-tidy][modernize-loop-convert]check isDependentSize

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

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

[clang] [clang]Avoid to check created local variable multiple time when evaluating (PR #69106)

2023-10-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69106 >From 8e599770d1dc3a5cd3edc011e7d830bc5b428410 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 19:48:09 +0800 Subject: [PATCH 1/2] [clang]Avoid to check created local variable multiple tim

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/65918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-10 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/65918: Fixed: https://github.com/llvm/llvm-project/issues/62945 c++20 supports "Permit conversions to arrays of unknown bound". This need additional cast from IncompleteArrayType to ConstantArrayType in TryReferen

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-10 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: from https://reviews.llvm.org/D151515 https://github.com/llvm/llvm-project/pull/65918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: I wonder whether we should also add some test in clang/analysis module? Crash happens in `StmtProfiler` but only add test case in clang-tidy level. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commit

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

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

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/66055: None >From ed5150a69925dc3b6557796026a2820ac5c2e2f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 12 Sep 2023 14:41:57 +0800 Subject: [PATCH] add --- .../bugprone/BugproneTidyModule.cpp

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66055: >From ed5150a69925dc3b6557796026a2820ac5c2e2f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 12 Sep 2023 14:41:57 +0800 Subject: [PATCH 1/2] add --- .../bugprone/BugproneTidyModule.cpp |

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,89 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.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-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - performance-move-smart-pointer-contents + +performance-move-smart-pointer-contents +=== + +Given a smart pointer containing a movable type, such as a +`std::unique_ptr`, it's possible to move the content

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. This check has some issue in my opinion, the semantic of `std::move(*p)` are not same as `*std::move(p)` ```c++ #include #include #include using std::unique_ptr; void f1() { unique_ptr p{new std::string("demo")}; st

[clang] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 requested changes to this pull request. This check has some issue in my opinion, the semantic of `std::move(*p)` are not same as `*std::move(p)` ```c++ #include #include #include using std::unique_ptr; void f1() { unique_ptr p{new std::string("demo")}; st

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

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

[clang] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

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

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66055: >From ed5150a69925dc3b6557796026a2820ac5c2e2f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 12 Sep 2023 14:41:57 +0800 Subject: [PATCH 1/7] add --- .../bugprone/BugproneTidyModule.cpp |

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66055: >From ed5150a69925dc3b6557796026a2820ac5c2e2f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 12 Sep 2023 14:41:57 +0800 Subject: [PATCH 01/10] add --- .../bugprone/BugproneTidyModule.cpp

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66055: >From ed5150a69925dc3b6557796026a2820ac5c2e2f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 12 Sep 2023 14:41:57 +0800 Subject: [PATCH 01/11] add --- .../bugprone/BugproneTidyModule.cpp

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

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

[clang] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/66055: >From ed5150a69925dc3b6557796026a2820ac5c2e2f5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Tue, 12 Sep 2023 14:41:57 +0800 Subject: [PATCH 01/12] add --- .../bugprone/BugproneTidyModule.cpp

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918: >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/3] [Sema] add cast from IncompleteArrayType to ConstantArra

[clang-tools-extra] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918: >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/3] [Sema] add cast from IncompleteArrayType to ConstantArra

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-14 Thread Congcong Cai via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema &S, if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if (S.getLangOpts().CPlusP

[clang-tools-extra] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-14 Thread Congcong Cai via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema &S, if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if (S.getLangOpts().CPlusP

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918: >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/4] [Sema] add cast from IncompleteArrayType to ConstantArra

[clang-tools-extra] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918: >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/4] [Sema] add cast from IncompleteArrayType to ConstantArra

[clang] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-15 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I run this check on two bigger projects, didn't found anything (I was > expecting it wont). > > So at least in case of false-positives it looks fine. I also run in some project and find nothing. Could I land it now? https://github.com/llvm/llvm-project/pull/66055 ___

[clang] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

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

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

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

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918 >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/5] [Sema] add cast from IncompleteArrayType to ConstantArray

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Congcong Cai via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema &S, if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if (S.getLangOpts().CPlusP

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

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

[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

2023-09-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/65431: `HeaderIncludes` won't update `ExistingIncludes` during inserting. We need to manage it in tidy check. Fixed: #65285 >From 2b727285edb91a4a88add118745eabc08da9c6fd Mon Sep 17 00:00:00 2001 From: Congcong Ca

[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

2023-09-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/65431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

2023-09-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/65431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

2023-09-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 review_requested https://github.com/llvm/llvm-project/pull/65431 ___ 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   >