Fixed a hang in the expression parser's result synthesizer that occurs when the function generated for the expression is completely empty except for a NULL_STMT. This happens sometimes when the parser returns errors.
llvm-svn: 126251
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp
index 7dd1ab4..dcb18f4 100644
--- a/lldb/source/Expression/ASTResultSynthesizer.cpp
+++ b/lldb/source/Expression/ASTResultSynthesizer.cpp
@@ -238,6 +238,10 @@
last_stmt_ptr--;
last_stmt = *last_stmt_ptr;
}
+ else
+ {
+ return false;
+ }
}
Expr *last_expr = dyn_cast<Expr>(last_stmt);