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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 24 04:17:50 PDT 2020


labath added inline comments.


================
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`")
+
----------------
teemperor wrote:
> 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.
One of these days, I'm going to write `assertSuccess/assertFailure` functions which know how to test&print SBError objects. But I'm fairly busy these days, so if someone wants to beat me to it, be my guest.


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