diff options
author | Sean Callanan <scallanan@apple.com> | 2011-02-22 21:52:56 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-02-22 21:52:56 +0000 |
commit | 2d1f4be47a59f7d44b4b099154f9a5c440360185 (patch) | |
tree | 7dec56093fe90dd7f047bbb02dccaba147957e4f /lldb/source/Expression/ASTResultSynthesizer.cpp | |
parent | 996a735b880ed46e50ebdb32f9cede79fca9727e (diff) | |
download | bcm5719-llvm-2d1f4be47a59f7d44b4b099154f9a5c440360185.tar.gz bcm5719-llvm-2d1f4be47a59f7d44b4b099154f9a5c440360185.zip |
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
Diffstat (limited to 'lldb/source/Expression/ASTResultSynthesizer.cpp')
-rw-r--r-- | lldb/source/Expression/ASTResultSynthesizer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp index 7dd1ab45c8b..dcb18f4737b 100644 --- a/lldb/source/Expression/ASTResultSynthesizer.cpp +++ b/lldb/source/Expression/ASTResultSynthesizer.cpp @@ -238,6 +238,10 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body, last_stmt_ptr--; last_stmt = *last_stmt_ptr; } + else + { + return false; + } } Expr *last_expr = dyn_cast<Expr>(last_stmt); |