Skip to content

Commit 83401ed

Browse files
authored
[clang][bytecode] Narrow allocated single-array Pointer (#147160)
Since the result should not be an array element.
1 parent 178e182 commit 83401ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/InterpBuiltin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ static bool interp__builtin_operator_new(InterpState &S, CodePtr OpPC,
15641564
Block *B = Allocator.allocate(Desc, S.getContext().getEvalID(),
15651565
DynamicAllocator::Form::Operator);
15661566
assert(B);
1567-
S.Stk.push<Pointer>(Pointer(B).atIndex(0));
1567+
S.Stk.push<Pointer>(Pointer(B).atIndex(0).narrow());
15681568
return true;
15691569
}
15701570

0 commit comments

Comments
 (0)