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`.
@@ -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`
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
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
>
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
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
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
@@ -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
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
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
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.
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.
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
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
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
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
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
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
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
@@ -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;
+
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
@@ -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
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.
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.
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
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.
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
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
401 - 453 of 453 matches
Mail list logo