[Lldb-commits] [lldb] r341940 - Print the correct error when our DynamicCheckerFunctions fail to install

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 11 06:59:48 PDT 2018


Author: teemperor
Date: Tue Sep 11 06:59:47 2018
New Revision: 341940

URL: http://llvm.org/viewvc/llvm-project?rev=341940&view=rev
Log:
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

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=341940&r1=341939&r2=341940&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Tue Sep 11 06:59:47 2018
@@ -1162,9 +1162,9 @@ lldb_private::Status ClangExpressionPars
 
           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;
           }




More information about the lldb-commits mailing list