From 262dd8c9dfae9d72bbb310e7d4c1bd6ebbe8780e Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 11 Sep 2018 13:59:47 +0000 Subject: [PATCH] Print the correct error when our DynamicCheckerFunctions fail to install Summary: The check is inverted here: If we have error messages, we should print those instead of our default error message. But currently we print the default message when we actually have a sensible error to print. Fixes https://bugs.llvm.org/show_bug.cgi?id=38383 Thanks Nat for the patch! Reviewers: #lldb, JDevlieghere Reviewed By: JDevlieghere Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D51602 llvm-svn: 341940 --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index bf41126..b905b9a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -1162,9 +1162,9 @@ lldb_private::Status ClangExpressionParser::PrepareForExecution( if (!dynamic_checkers->Install(install_diagnostics, exe_ctx)) { if (install_diagnostics.Diagnostics().size()) - err.SetErrorString("couldn't install checkers, unknown error"); - else err.SetErrorString(install_diagnostics.GetString().c_str()); + else + err.SetErrorString("couldn't install checkers, unknown error"); return err; } -- 2.7.4