Author: Timm Bäder
Date: 2023-07-20T08:12:58+02:00
New Revision: 12baf9859b70c653b3d67f5efdcaf608804efb5d

URL: 
https://github.com/llvm/llvm-project/commit/12baf9859b70c653b3d67f5efdcaf608804efb5d
DIFF: 
https://github.com/llvm/llvm-project/commit/12baf9859b70c653b3d67f5efdcaf608804efb5d.diff

LOG: [clang][Interp][NFC] Add another assertion to InterpStack::peek()

Added: 
    

Modified: 
    clang/lib/AST/Interp/InterpStack.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/InterpStack.h 
b/clang/lib/AST/Interp/InterpStack.h
index fd4a04a4d4cefe..14a9b69a557c15 100644
--- a/clang/lib/AST/Interp/InterpStack.h
+++ b/clang/lib/AST/Interp/InterpStack.h
@@ -54,6 +54,7 @@ class InterpStack final {
   /// 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


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to