about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-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();
   }
 }