Skip to content

Commit 5d6acf8

Browse files
committed
[clang][Interp][NFC] Properly assign block pointer Pointee
1 parent 192cd68 commit 5d6acf8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/AST/Interp/Pointer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ void Pointer::operator=(const Pointer &P) {
8080

8181
if (P.isBlockPointer()) {
8282
PointeeStorage.BS = P.PointeeStorage.BS;
83+
PointeeStorage.BS.Pointee = P.PointeeStorage.BS.Pointee;
8384

8485
if (PointeeStorage.BS.Pointee)
8586
PointeeStorage.BS.Pointee->addPointer(this);
@@ -107,6 +108,7 @@ void Pointer::operator=(Pointer &&P) {
107108

108109
if (P.isBlockPointer()) {
109110
PointeeStorage.BS = P.PointeeStorage.BS;
111+
PointeeStorage.BS.Pointee = P.PointeeStorage.BS.Pointee;
110112

111113
if (PointeeStorage.BS.Pointee)
112114
PointeeStorage.BS.Pointee->addPointer(this);

0 commit comments

Comments
 (0)