https://github.com/martinboehme closed
https://github.com/llvm/llvm-project/pull/85064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Xazax-hun approved this pull request.
Thanks! At this point all of my comments are addressed, and I am happy with the
patch.
https://github.com/llvm/llvm-project/pull/85064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) {
// [[p]]
}
)";
+ auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap {
+CXXRecordDecl *ADecl = nullptr;
+if (Ty.getAsString() == "A")
+ ADecl =
@@ -14,18 +14,52 @@
#define DEBUG_TYPE "dataflow"
-void clang::dataflow::copyRecord(RecordStorageLocation ,
- RecordStorageLocation , Environment )
{
+namespace clang::dataflow {
+
+static void copyField(const ValueDecl *Field,
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) {
// [[p]]
}
)";
+ auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap {
+CXXRecordDecl *ADecl = nullptr;
+if (Ty.getAsString() == "A")
+ ADecl =
https://github.com/martinboehme edited
https://github.com/llvm/llvm-project/pull/85064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation ,
});
assert(compatibleTypes);
- for (auto [Field, DstFieldLoc] : Dst.children()) {
-StorageLocation *SrcFieldLoc = Src.getChild(*Field);
-
-assert(Field->getType()->isReferenceType() ||
-
https://github.com/Xazax-hun approved this pull request.
https://github.com/llvm/llvm-project/pull/85064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) {
// [[p]]
}
)";
+ auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap {
+CXXRecordDecl *ADecl = nullptr;
+if (Ty.getAsString() == "A")
+ ADecl =
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation ,
});
assert(compatibleTypes);
- for (auto [Field, DstFieldLoc] : Dst.children()) {
-StorageLocation *SrcFieldLoc = Src.getChild(*Field);
-
-assert(Field->getType()->isReferenceType() ||
-
@@ -14,18 +14,52 @@
#define DEBUG_TYPE "dataflow"
-void clang::dataflow::copyRecord(RecordStorageLocation ,
- RecordStorageLocation , Environment )
{
+namespace clang::dataflow {
+
+static void copyField(const ValueDecl *Field,
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) {
// [[p]]
}
)";
+ auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap {
+CXXRecordDecl *ADecl = nullptr;
+if (Ty.getAsString() == "A")
+ ADecl =
https://github.com/martinboehme updated
https://github.com/llvm/llvm-project/pull/85064
>From 9362adfb0d1a61cb56b897f31fd9f2ead1605383 Mon Sep 17 00:00:00 2001
From: Martin Braenne
Date: Wed, 13 Mar 2024 12:07:24 +
Subject: [PATCH 1/3] [clang][dataflow] Model assignment to derived class
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation ,
});
assert(compatibleTypes);
- for (auto [Field, DstFieldLoc] : Dst.children()) {
-StorageLocation *SrcFieldLoc = Src.getChild(*Field);
-
-assert(Field->getType()->isReferenceType() ||
-
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation ,
});
assert(compatibleTypes);
- for (auto [Field, DstFieldLoc] : Dst.children()) {
-StorageLocation *SrcFieldLoc = Src.getChild(*Field);
-
-assert(Field->getType()->isReferenceType() ||
-
@@ -14,18 +14,52 @@
#define DEBUG_TYPE "dataflow"
-void clang::dataflow::copyRecord(RecordStorageLocation ,
- RecordStorageLocation , Environment )
{
+namespace clang::dataflow {
+
+static void copyField(const ValueDecl *Field,
@@ -14,18 +14,52 @@
#define DEBUG_TYPE "dataflow"
-void clang::dataflow::copyRecord(RecordStorageLocation ,
- RecordStorageLocation , Environment )
{
+namespace clang::dataflow {
+
+static void copyField(const ValueDecl *Field,
https://github.com/martinboehme updated
https://github.com/llvm/llvm-project/pull/85064
>From 9362adfb0d1a61cb56b897f31fd9f2ead1605383 Mon Sep 17 00:00:00 2001
From: Martin Braenne
Date: Wed, 13 Mar 2024 12:07:24 +
Subject: [PATCH 1/2] [clang][dataflow] Model assignment to derived class
https://github.com/ymand approved this pull request.
modulo Gabor's comments.
https://github.com/llvm/llvm-project/pull/85064
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14,18 +14,52 @@
#define DEBUG_TYPE "dataflow"
-void clang::dataflow::copyRecord(RecordStorageLocation ,
- RecordStorageLocation , Environment )
{
+namespace clang::dataflow {
+
+static void copyField(const ValueDecl *Field,
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation ,
});
assert(compatibleTypes);
- for (auto [Field, DstFieldLoc] : Dst.children()) {
-StorageLocation *SrcFieldLoc = Src.getChild(*Field);
-
-assert(Field->getType()->isReferenceType() ||
-
@@ -35,45 +69,27 @@ void clang::dataflow::copyRecord(RecordStorageLocation ,
});
assert(compatibleTypes);
- for (auto [Field, DstFieldLoc] : Dst.children()) {
-StorageLocation *SrcFieldLoc = Src.getChild(*Field);
-
-assert(Field->getType()->isReferenceType() ||
-
@@ -14,18 +14,52 @@
#define DEBUG_TYPE "dataflow"
-void clang::dataflow::copyRecord(RecordStorageLocation ,
- RecordStorageLocation , Environment )
{
+namespace clang::dataflow {
+
+static void copyField(const ValueDecl *Field,
@@ -212,8 +212,23 @@ TEST(TransferTest, CopyRecordFromDerivedToBase) {
// [[p]]
}
)";
+ auto SyntheticFieldCallback = [](QualType Ty) -> llvm::StringMap {
+CXXRecordDecl *ADecl = nullptr;
+if (Ty.getAsString() == "A")
+ ADecl =
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (martinboehme)
Changes
This is a relatively rare case, but
- It's still nice to get this right,
- We can remove the special case for this in `VisitCXXOperatorCallExpr()` (that
simply bails out), and
- With this in place, I can
https://github.com/martinboehme created
https://github.com/llvm/llvm-project/pull/85064
This is a relatively rare case, but
- It's still nice to get this right,
- We can remove the special case for this in `VisitCXXOperatorCallExpr()` (that
simply bails out), and
- With this in place, I can
26 matches
Mail list logo