[clang][Interp] Fix initializing base class members
authorTimm Bäder <tbaeder@redhat.com>
Tue, 7 Feb 2023 07:20:59 +0000 (08:20 +0100)
committerTimm Bäder <tbaeder@redhat.com>
Mon, 3 Apr 2023 11:51:04 +0000 (13:51 +0200)
commitdb3dcdc08ce06e301cdcc75e2849315a47d7a28d
tree37d776fcd6509d4fbebfc611ccad938db15f3cbc
parentc0dbe857907ff7f8549dc35059c21564f4ad91ed
[clang][Interp] Fix initializing base class members

For the given test case, we were trying to initialize a member of C,
which doesn't have any. Get the proper base pointer instead and
initialize the members there.

Differential Revision: https://reviews.llvm.org/D143466
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Interp.cpp
clang/lib/AST/Interp/Record.cpp
clang/lib/AST/Interp/Record.h
clang/test/AST/Interp/cxx20.cpp
clang/test/AST/Interp/records.cpp