about summary refs log tree commit diff homepage
path: root/lib/Expr
diff options
context:
space:
mode:
authorDaniel Schemmel <daniel@schemmel.net>2023-03-24 04:43:46 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2023-03-30 14:13:53 +0200
commit2aa5b7b83da9d3036c5b90df7be0a1e6a49d058f (patch)
tree5a2b8d7d0b532ee0a298a24ad707eddbb6c4acac /lib/Expr
parent66e1044824d07697e6745a516451d75a21808938 (diff)
downloadklee-2aa5b7b83da9d3036c5b90df7be0a1e6a49d058f.tar.gz
Prevent fallthrough warning
Diffstat (limited to 'lib/Expr')
-rw-r--r--lib/Expr/Parser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp
index 7ef56849..937abdec 100644
--- a/lib/Expr/Parser.cpp
+++ b/lib/Expr/Parser.cpp
@@ -21,6 +21,7 @@
 #include "llvm/Support/raw_ostream.h"
 
 #include <cassert>
+#include <cstdlib>
 #include <map>
 #include <cstring>
 
@@ -999,11 +1000,12 @@ ExprResult ParserImpl::ParseParenExpr(TypeResult FIXME_UNUSED) {
     if (ExprKind == Expr::Select) {
       return ParseSelectParenExpr(Name, ResTy);
     } else {
-      assert(0 && "Invalid ternary expression kind.");
+      assert(false && "Invalid ternary expression kind.");
+      std::abort();
     }
   default:
-    assert(0 && "Invalid argument kind (number of args).");
-    return ExprResult();
+    assert(false && "Invalid argument kind (number of args).");
+    std::abort();
   }
 }