Skip to content

Commit 12baf98

Browse files
committed
[clang][Interp][NFC] Add another assertion to InterpStack::peek()
1 parent e704400 commit 12baf98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/lib/AST/Interp/InterpStack.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class InterpStack final {
5454
/// Discards the top value from the stack.
5555
template <typename T> void discard() {
5656
#ifndef NDEBUG
57+
assert(!ItemTypes.empty());
5758
assert(ItemTypes.back() == toPrimType<T>());
5859
ItemTypes.pop_back();
5960
#endif

0 commit comments

Comments
 (0)