[clang] Reland [clang][dataflow] Transfer more cast expressions. (PR #157535)

2025-09-09 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/157535 Reverts llvm/llvm-project#157148 Adds fixes to `TransferVisitor::VisitCXXConstructExpr` and `copyRecord` to avoid crashing on base class initialization from sibling-derived class instances. I believe this is th

[clang] Reland [clang][dataflow] Transfer more cast expressions. (PR #157535)

2025-09-09 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/157535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [clang][dataflow] Transfer more cast expressions. (PR #157535)

2025-09-09 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/157535 >From 4779770aab880315d359005a5cacd4c4976d8649 Mon Sep 17 00:00:00 2001 From: Samira Bakon Date: Mon, 8 Sep 2025 15:08:52 -0400 Subject: [PATCH 1/3] Revert "Revert "[clang][dataflow] Transfer more cast expressio

[clang] Revert "[clang][dataflow] Transfer more cast expressions." (PR #157148)

2025-09-07 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi auto_merge_enabled https://github.com/llvm/llvm-project/pull/157148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][dataflow] Transfer more cast expressions." (PR #157148)

2025-09-05 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/157148 Reverts llvm/llvm-project#153066 copyRecord crashes if copying from the RecordStorageLocation shared by the base/derived objects after a DerivedToBase cast because the source type is still `Derived` but the cop

[clang] Revert "[clang][dataflow] Transfer more cast expressions." (PR #157148)

2025-09-05 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/157148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-20 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/153066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-19 Thread Samira Bakon via cfe-commits
@@ -317,17 +320,67 @@ class TransferVisitor : public ConstStmtVisitor { break; } +case CK_BaseToDerived: { + // This is a cast of (single-layer) pointer or reference to a record type. + // We should now model the fields for the derived type. + +

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-19 Thread Samira Bakon via cfe-commits
@@ -317,17 +320,67 @@ class TransferVisitor : public ConstStmtVisitor { break; } +case CK_BaseToDerived: { + // This is a cast of (single-layer) pointer or reference to a record type. + // We should now model the fields for the derived type. + +

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-19 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/153066 >From cb7d1a5988e445795fc178c8751ccac29813368a Mon Sep 17 00:00:00 2001 From: Samira Bakon Date: Mon, 11 Aug 2025 14:37:52 -0400 Subject: [PATCH 1/4] [clang][dataflow] Transfer more cast expressions. Transfer al

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-18 Thread Samira Bakon via cfe-commits
@@ -3569,6 +3583,190 @@ TEST(TransferTest, StaticCast) { }); } +TEST(TransferTest, StaticCastBaseToDerived) { + std::string Code = R"cc( +struct Base {}; +struct Derived : public Base {}; +void target(Base* B) { + Derived* D = static_cast(B); --

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-18 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/153066 >From cb7d1a5988e445795fc178c8751ccac29813368a Mon Sep 17 00:00:00 2001 From: Samira Bakon Date: Mon, 11 Aug 2025 14:37:52 -0400 Subject: [PATCH 1/3] [clang][dataflow] Transfer more cast expressions. Transfer al

[clang] [clang][dataflow] Transfer more cast expressions. (PR #153066)

2025-08-18 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/153066 >From cb7d1a5988e445795fc178c8751ccac29813368a Mon Sep 17 00:00:00 2001 From: Samira Bakon Date: Mon, 11 Aug 2025 14:37:52 -0400 Subject: [PATCH 1/2] [clang][dataflow] Transfer more cast expressions. Transfer al

[clang] Revert "[clang][dataflow] Expose simple access to child StorageLocation presence." (PR #145710)

2025-06-25 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/145710 Reverts llvm/llvm-project#145520 Exposed function is no longer needed and side-stepped the intended contract that the present children are the same set returned by `getModeledFields()` and presence shouldn't ne

[clang] Revert "[clang][dataflow] Expose simple access to child StorageLocation presence." (PR #145710)

2025-06-25 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/145710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][dataflow] Expose simple access to child StorageLocation presence." (PR #145710)

2025-06-25 Thread Samira Bakon via cfe-commits
bazuzi wrote: This reverts a simple change added <24 hours ago and reverting has been discussed directly with original change reviewers. Merging without additional review. https://github.com/llvm/llvm-project/pull/145710 ___ cfe-commits mailing list

[clang] [clang][dataflow] Expose simple access to child StorageLocation presence. (PR #145520)

2025-06-25 Thread Samira Bakon via cfe-commits
bazuzi wrote: No underlying bug, but I was able to simplify my approach out-of-tree and avoid exposing this function that doesn't capture the intended semantics. I'll revert this. https://github.com/llvm/llvm-project/pull/145520 ___ cfe-commits maili

[clang] [clang][dataflow] Expose simple access to child StorageLocation presence. (PR #145520)

2025-06-24 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/145520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Expose simple access to child StorageLocation presence. (PR #145520)

2025-06-24 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/145520 `getChild` does not offer this knowledge, and a map lookup is significantly cheaper than iteration over `children()`. >From 9b8f866a5102dbe23b671760bf35549b30a30a74 Mon Sep 17 00:00:00 2001 From: Samira Bakon D