[clang] 5d6acf8 - [clang][Interp][NFC] Properly assign block pointer Pointee

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 02:49:07 PDT 2024


Author: Timm Bäder
Date: 2024-06-07T11:48:44+02:00
New Revision: 5d6acf8196a44225991ab2fb6dfc9cc72296b348

URL: https://github.com/llvm/llvm-project/commit/5d6acf8196a44225991ab2fb6dfc9cc72296b348
DIFF: https://github.com/llvm/llvm-project/commit/5d6acf8196a44225991ab2fb6dfc9cc72296b348.diff

LOG: [clang][Interp][NFC] Properly assign block pointer Pointee

Added: 
    

Modified: 
    clang/lib/AST/Interp/Pointer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Pointer.cpp b/clang/lib/AST/Interp/Pointer.cpp
index e3d21f93f114e..85857d4ee1c88 100644
--- a/clang/lib/AST/Interp/Pointer.cpp
+++ b/clang/lib/AST/Interp/Pointer.cpp
@@ -80,6 +80,7 @@ void Pointer::operator=(const Pointer &P) {
 
   if (P.isBlockPointer()) {
     PointeeStorage.BS = P.PointeeStorage.BS;
+    PointeeStorage.BS.Pointee = P.PointeeStorage.BS.Pointee;
 
     if (PointeeStorage.BS.Pointee)
       PointeeStorage.BS.Pointee->addPointer(this);
@@ -107,6 +108,7 @@ void Pointer::operator=(Pointer &&P) {
 
   if (P.isBlockPointer()) {
     PointeeStorage.BS = P.PointeeStorage.BS;
+    PointeeStorage.BS.Pointee = P.PointeeStorage.BS.Pointee;
 
     if (PointeeStorage.BS.Pointee)
       PointeeStorage.BS.Pointee->addPointer(this);


        


More information about the cfe-commits mailing list