[clang] improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/66110: >From 3194b8958491331918459e6913e5931cc7528115 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 13 Sep 2023 00:03:27 +0800 Subject: [PATCH] improve ast comparation 1.VarDecl should not be ignored.

[clang] [ASTImport]improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/66110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTImport]improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/66110: >From 98a32795dae4587f64c10f91c6ab47f96881ad4b Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 13 Sep 2023 00:03:27 +0800 Subject: [PATCH] improve ast comparation 1.VarDecl should not be ignored.

[clang] improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/66110: 1.VarDecl should not be ignored. 2.GotoStmt has no children, it should be handle explicitly. >From ab11dd019685d714a4d697cc021cb313a5b30b95 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 13 Sep 2023

[clang] improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky review_requested https://github.com/llvm/llvm-project/pull/66110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTImport]improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/66110: >From 999017a007b77efc6c4b2e643e82379c7c46ca2b Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 13 Sep 2023 00:03:27 +0800 Subject: [PATCH] improve ast comparation 1.VarDecl should not be ignored.

[clang] [ASTImport]improve ast comparation (PR #66110)

2023-09-12 Thread Qizhi Hu via cfe-commits
@@ -1295,6 +1306,21 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext , return true; } +static bool IsStructurallyEquivalent(StructuralEquivalenceContext , jcsxky wrote: Thanks for your remind. Storage checking is added and other

[clang] [ASTImport]improve ast comparation (PR #66110)

2023-09-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/66110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-10-30 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The top-level Linux and Windows tests work, but inside the `Trigger > Build`/`clang-ci` run, the windows test step fails. I'm not sure what the > difference is between these two Windows tests. This is interesting! Generally speaking, AST of the code in Windows and Linux

[clang-tools-extra] [clang] [clang-tidy] fix match for binaryOperator in ExprMutationAnalyzer for misc-const-correctness (PR #70559)

2023-11-06 Thread Qizhi Hu via cfe-commits
jcsxky wrote: how about adding a function call like `f()`? will this can prevent clang to emit empty function body? https://github.com/llvm/llvm-project/pull/70559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Loop should contain CXXForRangeStmt (PR #70190)

2023-10-26 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/70190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Loop should contain CXXForRangeStmt (PR #70190)

2023-10-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/70190 Static analyze can't report diagnose when statement after a CXXForRangeStmt and enable widen, because `ExprEngine::processCFGBlockEntrance` lacks of CXXForRangeStmt and when `AMgr.options.maxBlockVisitOnPath -

[clang] [analyzer] Loop should contain CXXForRangeStmt (PR #70190)

2023-10-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/70190 >From f65ad2217e169b1d6876696201b97ffca5f9c886 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 25 Oct 2023 18:13:21 +0800 Subject: [PATCH] [analyzer] Loop should contain CXXForRangeStmt ---

[clang] [analyzer] Loop should contain CXXForRangeStmt (PR #70190)

2023-10-25 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/70190 >From b1b49db9f155d0bf0aef626d620b6287509fb538 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 25 Oct 2023 18:13:21 +0800 Subject: [PATCH] [analyzer] Loop should contain CXXForRangeStmt ---

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

2023-10-18 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From a5c5fc7a17f57a0b6ae328f7138435b4aaf7f9b5 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead of cast to prevent crash

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

2023-10-18 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Thanks, looks good! > > You can submit as is, but if you're up for it, it would actually be better to > add the new test case directly to the model's unittests. Something like this > test (though just one case is enough -- please put it in a separate TEST_P): > >

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Fix release notes, update change description (commit) to describe what was a > problem. Mainly why isThisDeclarationADefinition is needed. After that leave > it open for few days before pushing, so someone else could also look into > this and provide some comments if needed.

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67639 ___ 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 TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67639 >From 208ecd283322e5533b91d04a6a057062e14f4e18 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 28 Sep 2023 15:35:35 +0800 Subject: [PATCH] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67639 >From ee966ceb8d52c000ece8c04b87f791a71a5bfb07 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 28 Sep 2023 15:35:35 +0800 Subject: [PATCH] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only

[clang-tools-extra] [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67639 ___ 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 TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Release note entry would be welcome. updated https://github.com/llvm/llvm-project/pull/67639 ___ 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 TagDecl only when it is a definition && Fix issue 6… (PR #67639)

2023-09-28 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/67639 Fix issue 67529, [clang-tidy: modernize-use-using fails when type is implicitly forward declared](https://github.com/llvm/llvm-project/issues/67529) >From ce645a61b73005a90cc7a0d2cdded632dd047b08 Mon Sep 17

[clang] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From f158c9bca3461452b3b2b316f616f08b39e6228e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From 8e7bc769bca076d6e2d15d38694e6cf3b67ffdbc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] Fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From 77224ec6297a4fb9a86f2634f4a0278b49e81625 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From 23c100253486cf6fb9834d995127e9325a45aec2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/67522 [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record VarTemplateDecl in Record isn't a definition, when imported, it will crash in `ASTContext::setTemplateOrSpecializationInfo` due to setting

[clang] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From f9ff9c8a328a8c3658da8989a96af548eb685272 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] Fix clash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From bbde18aade35c431e9c113a9d200102330aa3e3a Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-09-27 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/67522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-10-03 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From 4a14372fc7856adb5a6d2c2c04eaec8c3a518075 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-10-03 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/67522 >From 9dc31bfb012c32da7a1bf511db04df9c6c480a78 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 27 Sep 2023 15:32:10 +0800 Subject: [PATCH] [clang][ASTImporter] fix clash when import `VarTemplateDecl` in record

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-10-03 Thread Qizhi Hu via cfe-commits
@@ -4988,6 +4988,39 @@ TEST_P(ASTImporterOptionSpecificTestBase, } } +TEST_P(ImportFriendClasses, RecordVarTemplateDecl) { + Decl *ToTU = getToTuDecl( + R"( + template + class A { + public: +template +static constexpr bool X = true; +

[clang] [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt (PR #66110)

2023-09-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/66110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt (PR #66110)

2023-09-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/66110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt (PR #66976)

2023-09-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/66976 improve AST comparasion on VarDecl & GotoStmt: 1. VarDecl should not be ignored, 2. GotoStmt has no children, it should be handle explicitly. Reviewed By: donat.nagy Differential Revision:

[clang] [clang][AST][ASTImporter] improve AST comparasion on VarDecl & GotoStmt (PR #66976)

2023-09-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/66976 ___ 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 TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (PR #67639)

2023-10-04 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/67639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix crash when import `VarTemplateDecl` in record (PR #67522)

2023-10-06 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/67522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/68510 `getStorageLocation` may return `nullptr` and this will produce crash when use `cast`, use `dyn_cast_or_null` instead. I test it locally using [FTXUI](https://github.com/ArthurSonzogni/FTXUI) and it may be the

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

2023-10-10 Thread Qizhi Hu via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U ){ jcsxky wrote: Using `absl::optional`

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

2023-10-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky deleted 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][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Thanks for this fix! Unfortunately, I wasn't able to repro the crash in > godbolt: https://godbolt.org/z/s741z5djY. Can you double check that the check > crashes on that example without your fix? The test case is different from that in this patch. Use `float` in `optional`.

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

2023-10-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 55ca8fa197e469a7c8f57d7a174c07a063eb022e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed 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][dataflow]Use cast_or_null instead of cast to prevent crash (PR #68510)

2023-10-15 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-15 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @ymand Could you take a look at this pr? 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][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > The fix looks great to me! On the other hand, we usually try to add a > regression test for each of the fixes. Any chance you could get a minimal > reproducer from the codebase you are looking at? Thanks for your suggestion! Test case has been added to reproduce this issue.

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

2023-10-09 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > please update release note also Although `bugprone-unchecked-optional-access` is used to test this issue, root cause is in `FlowSensitiveAnalysis`. So, I am confused about which file should be updated about release not. Look forward to your suggestion! Thank you.

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 7a8c515c70bb06ae886c8c434d9d3a79a152d115 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 2de967931684cf792a7fc4708c18b867b47a9b3d Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 3978a4322ed7f82b52a1978debe8108f00f18acc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-09 Thread Qizhi Hu via cfe-commits
@@ -599,7 +599,7 @@ void transferAssignment(const CXXOperatorCallExpr *E, BoolValue , LatticeTransferState ) { assert(E->getNumArgs() > 0); - if (auto *Loc = cast( + if (auto *Loc = dyn_cast_or_null( jcsxky wrote: updated

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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 cast_or_null instead cast to prevent crash (PR #68510)

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 38cf358039d81fb3703885db082b64e11760c5fc Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-10 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > LGTM, When release notes could be nice > (clang-tools-extra/doc/ReleaseNotest.rst) with something like: `Improved > bugprone-unchecked-optional-acces check to not crash during handling of > optional values` or `to not crash i certain situations` it may also not be so >

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

2023-10-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From eb9f8342821048edefaefd038bdd989853ac69a3 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-09 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 466b612ff055ff7497c9473b38b90bc849370b21 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

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

2023-10-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited 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][dataflow]Use dyn_cast_or_null instead cast to prevent crash (PR #68510)

2023-10-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From b0f13442dd6c41331f9ab43f1cd8ac6bbf0deabe Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-19 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 08382e9f909bace4dbaf1f0c5d62d4e17978e3aa Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] fix --- clang/lib/Sema/SemaTemplateInstantiate.cpp | 10 +- 1

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 71660611976c4f21f71ebfe509fc021b1e3586e2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-23 Thread Qizhi Hu via cfe-commits
@@ -859,6 +859,9 @@ Bug Fixes in This Version Fixes (`#78290 `_) - Fixed assertion failure with deleted overloaded unary operators. Fixes (`#78314 `_) +- Fix crash when

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky ready_for_review https://github.com/llvm/llvm-project/pull/79084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From b9de8c52a2ffbd03c8a5368f6e62ba6c68ce2125 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78400 >From 852e2d26ee3433e09978da93dfe6303faac92876 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-22 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++20 -verify %s jcsxky wrote: Sorry, I am afraid that I misunderstand root cause of this issue and still need more working on it. https://github.com/llvm/llvm-project/pull/78896

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky converted_to_draft https://github.com/llvm/llvm-project/pull/79084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-22 Thread Qizhi Hu via cfe-commits
@@ -3063,11 +3064,18 @@ bool Sema::SubstDefaultArgument( /*ForDefinition*/ false); if (addInstantiatedParametersToScope(FD, PatternFD, *LIS, TemplateArgs)) return true; + if (FD->isOutOfLine()) { +auto *CurrentTemplateArgumentList =

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/79084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-01-22 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/79084 >From 0b127ff20bc9a6a1d4de7bcbfa2c5ad466cea14c Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 23 Jan 2024 10:09:44 +0800 Subject: [PATCH] [clang][ASTImporter] fix assert fail due to offset overflow ---

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-21 Thread Qizhi Hu via cfe-commits
@@ -6124,7 +6124,11 @@ QualType TreeTransform::TransformFunctionProtoType( // "pointer to cv-qualifier-seq X" between the optional cv-qualifer-seq // and the end of the function-definition, member-declarator, or // declarator. -

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78896 >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Wed, 17 Jan 2024 14:16:34 +0800 Subject: [PATCH 1/2] [Clang][Sema] fix outline member function template with default

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From 5da8d470b84cc175a3be9c00314b01a1c9f78837 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform ---

[clang] [Clang][AST] fix crash in mangle lambda expression (PR #78896)

2024-01-21 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/78896 Try to fix [issue](https://github.com/llvm/llvm-project/issues/78542) by creating a new `FunctionTypeDepthState` and pop it after finish. >From e4ac395028e651721677d85caf6c76e3a7f79308 Mon Sep 17 00:00:00 2001

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -verify -std=c++20 -emit-llvm -o - %s jcsxky wrote: removed `-verify` https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 9dbc077e263bc16ab3919b6691ee8c4585377caf Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/80802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -1613,8 +1613,8 @@ namespace { bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + if (T->isInstantiationDependentType() || T->isVariablyModifiedType()

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-06 Thread Qizhi Hu via cfe-commits
@@ -1613,8 +1613,8 @@ namespace { bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + if (T->isInstantiationDependentType() || T->isVariablyModifiedType()

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 376d5b0f6986f7cdf7bddd29fdbd418ba632da7a Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 1706840eccdabcd3d5cc8bd7a80c9db96d6230c3 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 2b55af4e11a637e268e498242041cb0fe482e375 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 5430d0709c2ae62bf1cf749b50ab312098ad3771 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-13 Thread Qizhi Hu via cfe-commits
@@ -1614,7 +1614,19 @@ bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + bool DependentLambdaType = false; + QualType DesugaredType =

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-13 Thread Qizhi Hu via cfe-commits
@@ -1614,7 +1614,19 @@ bool TemplateInstantiator::AlreadyTransformed(QualType T) { if (T.isNull()) return true; - if (T->isInstantiationDependentType() || T->isVariablyModifiedType()) + bool DependentLambdaType = false; + QualType DesugaredType =

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-12 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 2f09be514adff0c5e19494b14fbe4cc9588fea9c Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 95f7690ccc843a5878ac212f467693877c40b232 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 78c54ee65b16d33a3c9b19c453ded69adfe62732 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 59fb684ff051dc50eb6f8e4e1c294fd5a2dc55d0 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80802 >From 0063efb61d8076d46289f76a490c28f2ca7f Mon Sep 17 00:00:00 2001 From: huqizhi Date: Tue, 6 Feb 2024 14:06:40 +0800 Subject: [PATCH] [Clang][Sema] fix crash in codegen stage when an lambda expression

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-20 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > @jcsxky Do you have more test cases other than the one from #76674? I wonder > what'll happen if constraint checking is involved. Do you mean `concept`? If yes, I will have a try. https://github.com/llvm/llvm-project/pull/80802 ___

  1   2   3   4   5   >