[clang][Interp] Record item types in InterpStack
authorTimm Bäder <tbaeder@redhat.com>
Thu, 15 Sep 2022 14:08:28 +0000 (16:08 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Thu, 29 Sep 2022 10:50:55 +0000 (12:50 +0200)
commitdf1cc801da05a6436f6dc3062ccd490f236cd7ec
treedcdfc58a8990ce0fd904526783c1f902ee551613
parent7c4cad43309ebce4a9f3c656ca4629f8ac9ed877
[clang][Interp] Record item types in InterpStack

The type information is lost when pushing things on the stack. When
later pop()ing items of the wrong type, we can instead simply get
garbage values and those problems are hard to find. Add another stack to
record the type of item we pushed and use that for debugging.

Differential Revision: https://reviews.llvm.org/D133941
clang/lib/AST/Interp/InterpStack.h