about summary refs log tree commit diff homepage
path: root/lib/Expr/Parser.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-07 07:59:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-07 07:59:12 +0000
commitea8e1675032639bde55c278635f61ca3a08b7a01 (patch)
tree96cd177651eb2444eaf1f55d7dfd0f5fede5ec32 /lib/Expr/Parser.cpp
parent24e065075e7ec973db84639725696b9f84975b2f (diff)
downloadklee-ea8e1675032639bde55c278635f61ca3a08b7a01.tar.gz
Make sure to make up a valid VersionResult on failures.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73019 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/Parser.cpp')
-rw-r--r--lib/Expr/Parser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp
index b73c72d6..dedbaa3a 100644
--- a/lib/Expr/Parser.cpp
+++ b/lib/Expr/Parser.cpp
@@ -1123,9 +1123,10 @@ VersionResult ParserImpl::ParseVersionSpecifier() {
   Token Start = Tok;
   VersionResult Res = ParseVersion();
   // Define update list to avoid use-of-undef errors.
-  if (!Res.isValid())
-    Res = VersionResult(false,
-                        UpdateList(0, true, NULL));
+  if (!Res.isValid()) {
+    Res = VersionResult(true,
+                        UpdateList(new Array(0, -1, 0), true, NULL));
+  }
   
   if (Label)
     VersionSymTab.insert(std::make_pair(Label, Res.get()));