[Lldb-commits] [PATCH] D78697: [lldb][TypeSystemClang] Desugar an elaborated type before checking if it's a typedef or getting a typedefed type

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 23 09:43:34 PDT 2020


teemperor added a comment.

LGTM now beside some minor request for the test. Thanks for the patch!



================
Comment at: lldb/test/API/lang/cpp/typedef/TestCppTypedef.py:33
+        expr_result = frame.EvaluateExpression("(SF)s")
+        self.assertTrue(expr_result.IsValid(), "Can't evaluate an expression with result type `SF`")
+
----------------
I know we do this (sadly) really often in LLDB, but these static error messages are just not useful. If my expression fails and the error message is "expression failed" then that doesn't help me with debugging the issue (especially when it's the only thing some remote bot sends back to me after a commit).

You could do `self.assertTrue(expr_result.IsValid(), "Expression failed with:" + expr_result.GetError().GetCString())` instead and then people see the actual compiler output in the error log. Same for the other expr evaluation below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78697/new/

https://reviews.llvm.org/D78697





More information about the lldb-commits mailing list