Author: jingham Date: Thu Jul 7 14:06:37 2016 New Revision: 274787 URL: http://llvm.org/viewvc/llvm-project?rev=274787&view=rev Log: 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> Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp?rev=274787&r1=274786&r2=274787&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp Thu Jul 7 14:06:37 2016 @@ -373,6 +373,8 @@ ASTResultSynthesizer::SynthesizeBodyResu 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 { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits