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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to