[clang][Interp] Fix dereferencing arrays with no offset applied
authorTimm Bäder <tbaeder@redhat.com>
Mon, 31 Oct 2022 14:48:15 +0000 (15:48 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Wed, 25 Jan 2023 10:21:31 +0000 (11:21 +0100)
commitad2fb01cb68dc17594d2a923da90f5e01e127cdf
tree097eb911efe6529f2141a29957501f4cec8c6ebc
parent8184b563a42dafad2dc589914456028bd228429a
[clang][Interp] Fix dereferencing arrays with no offset applied

A pointer to an array and a pointer to the first element of the array
are not the same in the interpreter, so handle this specially in
deref().

Differential Revision: https://reviews.llvm.org/D137082
clang/lib/AST/Interp/Pointer.h
clang/test/AST/Interp/arrays.cpp