diff options
| author | Jim Ingham <jingham@apple.com> | 2016-07-07 19:06:37 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2016-07-07 19:06:37 +0000 |
| commit | 3a45e034423ca8811846065ad27fc87e5859cf2f (patch) | |
| tree | db00f4dbc7a61167df18be9f229137e89c37cb1f /lldb/source | |
| parent | 65fa0704aa8878688f66eccb99fe2eafde314b19 (diff) | |
| download | bcm5719-llvm-3a45e034423ca8811846065ad27fc87e5859cf2f.tar.gz bcm5719-llvm-3a45e034423ca8811846065ad27fc87e5859cf2f.zip | |
Check whether Sema::CreateBuiltinUnaryOp returns an empty result.
If it does, calling AddInitializerToDecl will crash, so we should
abort the result synthesis in this case.
<rdar://problem/27205383>
llvm-svn: 274787
Diffstat (limited to 'lldb/source')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp index 44bbfcbca3c..f1231572e26 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp @@ -373,6 +373,8 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body, ExprResult address_of_expr = m_sema->CreateBuiltinUnaryOp(SourceLocation(), UO_AddrOf, last_expr); if (address_of_expr.get()) m_sema->AddInitializerToDecl(result_decl, address_of_expr.get(), true, false); + else + return false; } else { |

