[clang][Interp] Fix ignoring expression return values
authorTimm Bäder <tbaeder@redhat.com>
Sat, 15 Oct 2022 07:56:26 +0000 (09:56 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Fri, 28 Oct 2022 14:45:38 +0000 (16:45 +0200)
commit38ffc89c87ac3b0b1c2173728fba2258dead9ae0
treefc38ea6361b8af3eab152b4ba0456bb874115b89
parent0ccff030f3b4145bd658e362a63db9aae2942bee
[clang][Interp] Fix ignoring expression return values

Randomly noticed this. We need to honor DiscardResult here.

Differential Revision: https://reviews.llvm.org/D136013
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/test/AST/Interp/literals.cpp
clang/test/AST/Interp/records.cpp