diff --git a/clang/lib/AST/Interp/InterpStack.cpp b/clang/lib/AST/Interp/InterpStack.cpp index 592e22ed77b9f..c5d9a459ce824 100644 --- a/clang/lib/AST/Interp/InterpStack.cpp +++ b/clang/lib/AST/Interp/InterpStack.cpp @@ -24,6 +24,9 @@ void InterpStack::clear() { std::free(Chunk); Chunk = nullptr; StackSize = 0; +#ifndef NDEBUG + ItemTypes.clear(); +#endif } void *InterpStack::grow(size_t Size) {