@@ -648,6 +648,12 @@ class TransferVisitor : public
ConstStmtVisitor {
QualType Type = S->getType();
if (!Type->isStructureOrClassType()) {
+ // It is possible that InitListExpr is not a prvalue, in which case
+ // `setValue` will fail. In this case, we can
https://github.com/paulsemel closed
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/martinboehme approved this pull request.
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/paulsemel updated
https://github.com/llvm/llvm-project/pull/80970
>From 584e875913dc2f3d667aae95f44225c1c0b3101a Mon Sep 17 00:00:00 2001
From: Paul Semel
Date: Wed, 7 Feb 2024 10:26:23 +
Subject: [PATCH] [dataflow] Fix crash when InitListExpr is not a prvalue
---
clang
https://github.com/paulsemel updated
https://github.com/llvm/llvm-project/pull/80970
>From 35fa8c1f4815bf2922ba9018d3f64b99428ecdc6 Mon Sep 17 00:00:00 2001
From: Paul Semel
Date: Wed, 7 Feb 2024 10:26:23 +
Subject: [PATCH 1/2] [dataflow] Fix crash when InitListExpr is not a prvalue
---
c
https://github.com/martinboehme edited
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2313,6 +2313,28 @@ TEST(TransferTest,
AssignmentOperatorWithInitAndInheritance) {
ASTContext &ASTCtx) {});
}
+TEST(TransferTest, InitListExprAsXValue) {
+ // This is a crash repro.
+ std::string Code = R"(
+void target() {
+ bool&& Foo{false};
+ /
https://github.com/martinboehme requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/paulsemel edited
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/paulsemel updated
https://github.com/llvm/llvm-project/pull/80970
>From 35fa8c1f4815bf2922ba9018d3f64b99428ecdc6 Mon Sep 17 00:00:00 2001
From: Paul Semel
Date: Wed, 7 Feb 2024 10:26:23 +
Subject: [PATCH] [dataflow] Fix crash when InitListExpr is not a prvalue
---
clang
@@ -648,6 +648,12 @@ class TransferVisitor : public
ConstStmtVisitor {
QualType Type = S->getType();
if (!Type->isStructureOrClassType()) {
+ // It is possible that InitListExpr is not a prvalue, in which case
+ // `setValue` will fail. In this case, we can
https://github.com/paulsemel updated
https://github.com/llvm/llvm-project/pull/80970
>From 1ff7ea57e76041b25889685ead115a1b793d3921 Mon Sep 17 00:00:00 2001
From: Paul Semel
Date: Wed, 7 Feb 2024 10:26:23 +
Subject: [PATCH] [dataflow] Fix crash when InitListExpr is not a prvalue
---
clang
@@ -648,6 +648,12 @@ class TransferVisitor : public
ConstStmtVisitor {
QualType Type = S->getType();
if (!Type->isStructureOrClassType()) {
+ // It is possible that InitListExpr is not a prvalue, in which case
+ // `setValue` will fail. In this case, we can
https://github.com/martinboehme requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2313,6 +2313,20 @@ TEST(TransferTest,
AssignmentOperatorWithInitAndInheritance) {
ASTContext &ASTCtx) {});
}
+TEST(TransferTest, InitListExprAsXValue) {
+ // This is a crash repro.
+ std::string Code = R"(
+void target() {
+ auto&& test{false};
---
https://github.com/martinboehme edited
https://github.com/llvm/llvm-project/pull/80970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-analysis
Author: Paul Semel (paulsemel)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/80970.diff
2 Files Affected:
- (modified) clang/lib/Analysis/FlowSensitive/Transfer.cpp (+6)
- (modified) clan
https://github.com/paulsemel created
https://github.com/llvm/llvm-project/pull/80970
None
>From e56ced76e19d57a020030ab41a125012460d08d7 Mon Sep 17 00:00:00 2001
From: Paul Semel
Date: Wed, 7 Feb 2024 10:26:23 +
Subject: [PATCH] [dataflow] Fix crash when InitListExpr is not a prvalue
---
18 matches
Mail list logo