about summary refs log tree commit diff homepage
path: root/lib/Expr
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-08 05:19:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-08 05:19:15 +0000
commit9f1655cc26ca22d06c5d8f8d228b0b240381a6cc (patch)
tree67eeff0152890afd074321446370544e824eecf9 /lib/Expr
parent774d9473ee5686d59a8eb398fd78a8a5d591721e (diff)
downloadklee-9f1655cc26ca22d06c5d8f8d228b0b240381a6cc.tar.gz
Fix a mistake in previous commit to turn asserts -> parse errors.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr')
-rw-r--r--lib/Expr/Parser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp
index a5c6123f..a2a5d2e2 100644
--- a/lib/Expr/Parser.cpp
+++ b/lib/Expr/Parser.cpp
@@ -589,12 +589,6 @@ DeclResult ParserImpl::ParseQueryCommand() {
     return DeclResult();
   }
 
-  if (Tok.kind != Token::LSquare) {
-    Error("malformed query, expected expression list.");
-    SkipUntilRParen();
-    return DeclResult();
-  }
-
   ConsumeLSquare();
   // FIXME: Should avoid reading past unbalanced parens here.
   while (Tok.kind != Token::RSquare) {
@@ -642,6 +636,12 @@ DeclResult ParserImpl::ParseQueryCommand() {
   if (Tok.kind == Token::RParen)
     goto exit;
 
+  if (Tok.kind != Token::LSquare) {
+    Error("malformed query, expected array list.");
+    SkipUntilRParen();
+    return DeclResult();
+  }
+
   ConsumeLSquare();
   // FIXME: Should avoid reading past unbalanced parens here.
   while (Tok.kind != Token::RSquare) {