[Lldb-commits] [lldb] [lldb] Add Status::Detail to store expression evaluator diagnostics [… (PR #106442)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 28 12:58:00 PDT 2024
================
@@ -47,7 +48,34 @@ class Status {
/// into ValueType.
typedef uint32_t ValueType;
- Status();
+ /// A customizable "detail" for an error. For example, expression
+ /// evaluation failures often have more than one diagnostic that the
+ /// UI layer might want to render differently.
+ ///
+ /// Running example:
+ /// (lldb) expr 1+x
+ /// error: <user expression 0>:1:3: use of undeclared identifier 'foo'
+ /// 1+foo
+ /// ^
+ struct Detail {
+ struct SourceLocation {
+ FileSpec file;
+ unsigned line = 0;
+ uint16_t column = 0;
+ uint16_t length = 0;
+ bool in_user_input = false;
----------------
medismailben wrote:
What are these 2 fields used for ?
https://github.com/llvm/llvm-project/pull/106442
More information about the lldb-commits
mailing list