projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e704400
)
[clang][Interp][NFC] Add another assertion to InterpStack::peek()
author
Timm Bäder
<tbaeder@redhat.com>
Wed, 19 Jul 2023 13:58:40 +0000
(15:58 +0200)
committer
Timm Bäder
<tbaeder@redhat.com>
Thu, 20 Jul 2023 06:12:58 +0000
(08:12 +0200)
clang/lib/AST/Interp/InterpStack.h
patch
|
blob
|
history
diff --git
a/clang/lib/AST/Interp/InterpStack.h
b/clang/lib/AST/Interp/InterpStack.h
index
fd4a04a
..
14a9b69
100644
(file)
--- a/
clang/lib/AST/Interp/InterpStack.h
+++ b/
clang/lib/AST/Interp/InterpStack.h
@@
-54,6
+54,7
@@
public:
/// Discards the top value from the stack.
template <typename T> void discard() {
#ifndef NDEBUG
+ assert(!ItemTypes.empty());
assert(ItemTypes.back() == toPrimType<T>());
ItemTypes.pop_back();
#endif