[clang][Interp] Fix record members of reference type
authorTimm Bäder <tbaeder@redhat.com>
Sat, 15 Oct 2022 07:22:34 +0000 (09:22 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Fri, 28 Oct 2022 14:34:45 +0000 (16:34 +0200)
commit0ccff030f3b4145bd658e362a63db9aae2942bee
treebb4927205cad50b57e394b27d75ddccc503f1e67
parent8b87cb4853409ea8066e451ee87f550a9ecd3c34
[clang][Interp] Fix record members of reference type

When assigning to them, we can't classify the expression type, because
that doesn't contain the right information.

And when reading from them, we need to do the extra deref, just like we
do when reading from a DeclRefExpr.

Differential Revision: https://reviews.llvm.org/D136012
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/Interp/Interp.h
clang/test/AST/Interp/references.cpp