[Lldb-commits] [lldb] [lldb] Add Status::Detail to store expression evaluator diagnostics [… (PR #106442)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 29 09:30:31 PDT 2024
adrian-prantl wrote:
> Not really (although this might work as well). What I meant was that, AIUI you're doing this so that you can plumb structured error information from one place (clang expression parser?) to another place (the thing which generates the expression errors -- I guess somewhere CommandObjectExpression?).
Yes, just that it's a generalized data structure for all expression parser plugins.
> That could be done by creating a (custom) llvm::Error in the first place, and consuming it in the second one _and_ by making sure that all of the functions along that path don't lose this information by converting the error to a lldb_private::Status.
This would only work if Status actually stored an error, like I outlined above. The conversion from structured error into text needs to happen at the UI layer. For example, because only it knows indentation and coloring.
Oh.. you mean converting the entire path from the expression evaluator to CommandObject from Status to llvm::Error! Yes. That would work. Since I have a few hours today, I'm going to attempt what I outlined above and then later change the APIs from Status to Expected.
https://github.com/llvm/llvm-project/pull/106442
More information about the lldb-commits
mailing list