[Lldb-commits] [PATCH] D51602: Print the correct error when our DynamicCheckerFunctions fail to install

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 3 13:40:09 PDT 2018


teemperor created this revision.
teemperor added a reviewer: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51602

Files:
  source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp


Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===================================================================
--- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -1162,9 +1162,9 @@
 
           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;
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51602.163746.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180903/46edde93/attachment.bin>


More information about the lldb-commits mailing list