[Lldb-commits] [lldb] [lldb] DRAFT - Remove 2nd "error: " and print caret (^) below last input line from the developer. (PR #72150)

2023-11-13 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/72150 This patch serves 2 goals: - Remove a second "error: " substring in error messages from debugging Swift. - Print caret (^) line with optional leading/trailing tildes (~) below the line the developer last enter

[Lldb-commits] [lldb] [lldb] DRAFT - Remove 2nd "error: " and print caret (^) below last input line from the developer. (PR #72150)

2023-11-27 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/72150 >From 047413349901684411fb260a49c996633b7b4dc0 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 6 Nov 2023 17:16:28 -1000 Subject: [PATCH] Remove secondary "error: " and print diagnostic line with care

[Lldb-commits] [lldb] [lldb] DRAFT - Remove 2nd "error: " and print caret (^) below last input line from the developer. (PR #72150)

2023-11-27 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/72150 >From af3e1a6dce00477afd1418cc41fde6a2f8c17258 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 6 Nov 2023 17:16:28 -1000 Subject: [PATCH] Remove secondary "error: " and print diagnostic line with care

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-04 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/74413 rdar://119169160 >From 26891e6fab2c6ecc13ee11b6c2f4adbb1c936058 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 4 Dec 2023 18:29:37 -1000 Subject: [PATCH] [lldb] Return index of element in ValueObje

[Lldb-commits] [lldb] [lldb] Correctly check and report error states in StackFrame.cpp (PR #74414)

2023-12-04 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/74414 rdar://119155810 >From 35a7dbc9e4005675273e573fe1d3217668e4a5a0 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 4 Dec 2023 13:56:38 -1000 Subject: [PATCH] [lldb] Correctly check and report error state

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-04 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete ready_for_review https://github.com/llvm/llvm-project/pull/74413 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Correctly check and report error states in StackFrame.cpp (PR #74414)

2023-12-05 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74414 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Correctly check and report error states in StackFrame.cpp (PR #74414)

2023-12-05 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/74414 >From 0ea80f827993cb9993931304a53aac69a8276bef Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 4 Dec 2023 13:56:38 -1000 Subject: [PATCH] [lldb] Correctly check and report error states in StackFrame.c

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
@@ -398,13 +398,16 @@ ValueObject::GetChildAtIndexPath(llvm::ArrayRef idxs, if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); + + size_t current_index = 0; for (size_t idx : idxs) { root = root->GetChildAtIndex(idx); if (!root) { i

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74413 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
@@ -414,13 +417,17 @@ lldb::ValueObjectSP ValueObject::GetChildAtIndexPath( if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); + + size_t current_index = 0; for (std::pair idx : idxs) { root = root->GetChildAtIndex(idx.first, idx.second); i

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74413 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74413 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/74413 >From 5d991726fbb22bc79336becc08b53b49dc87396d Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 4 Dec 2023 18:29:37 -1000 Subject: [PATCH] [lldb] Return index of element in ValueObject path instead of

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
@@ -398,13 +398,16 @@ ValueObject::GetChildAtIndexPath(llvm::ArrayRef idxs, if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); + + size_t current_index = 0; for (size_t idx : idxs) { root = root->GetChildAtIndex(idx); if (!root) { i

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-05 Thread Pete Lawrence via lldb-commits
@@ -414,13 +417,17 @@ lldb::ValueObjectSP ValueObject::GetChildAtIndexPath( if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); + + size_t current_index = 0; for (std::pair idx : idxs) { root = root->GetChildAtIndex(idx.first, idx.second); i

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-07 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > I can see why the mistake was made, we have an index into a list of different > indexes? Anyway, please add a test for this. I'm not really sure there's a good way to test this there doesn't appear to be anything that calls these methods, let alone an SB API. CC @adrian-pr

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-07 Thread Pete Lawrence via lldb-commits
@@ -414,13 +417,17 @@ lldb::ValueObjectSP ValueObject::GetChildAtIndexPath( if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); + + size_t current_index = 0; for (std::pair idx : idxs) { root = root->GetChildAtIndex(idx.first, idx.second); i

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-07 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/74413 >From 5731517e6453f9fc72577531bc3e2f745a8b9ca3 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 4 Dec 2023 18:29:37 -1000 Subject: [PATCH] [lldb] Return index of element in ValueObject path instead of

[Lldb-commits] [lldb] [lldb] Return index of element in ValueObject path instead of the element's value (PR #74413)

2023-12-08 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > > > doesn't appear to be anything that calls these methods > > > > > > Candidate for removal then? If so it still makes sense to fix them, then > > remove them. Saves fixing them again if they are brought back. > > Either way, I'm not going to block this by requiring a test

[Lldb-commits] [lldb] [lldb] All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-08 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/74912 Many methods return `nullptr` or `ValueObjectSP()` to represent an invalid result. For methods that have a `Status &error` parameter and return an `ValueObjectSP`, the return value *becomes* the container

[Lldb-commits] [lldb] [lldb] All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-08 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][draft] All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-08 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][draft] All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-08 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Correctly check and report error states in StackFrame.cpp (PR #74414)

2023-12-12 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > Clicking merge on @PortalPete 's behalf Thank you, sir! https://github.com/llvm/llvm-project/pull/74414 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Print a warning on checksum mismatch (PR #71459)

2023-12-13 Thread Pete Lawrence via lldb-commits
@@ -300,6 +300,16 @@ size_t SourceManager::DisplaySourceLinesWithLineNumbersUsingLastFile( break; } } + +Checksum checksum = last_file_sp->GetFileSpec().GetChecksum(); +if (checksum && checksum != last_file_sp->GetChecksum()) { + llvm::call_once(

[Lldb-commits] [lldb] [lldb] DRAFT - Remove 2nd "error: " and print caret (^) below last input line from the developer. (PR #72150)

2023-12-13 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/72150 >From 0e969a1d7b198d586108a4177ecc1fc32b372e24 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 6 Nov 2023 17:16:28 -1000 Subject: [PATCH] Remove secondary "error: " and print diagnostic line with care

[Lldb-commits] [lldb] [lldb] DRAFT - Remove 2nd "error: " and print caret (^) below last input line from the developer. (PR #72150)

2023-12-13 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/72150 >From 2e886082f69d85ea719339aa4917c744492988c4 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Mon, 6 Nov 2023 17:16:28 -1000 Subject: [PATCH] Remove secondary "error: " and print diagnostic line with care

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability (and behavior?)… (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/75865 … by exiting early and consolidating code paths. As I worked through changes to another PR (https://github.com/llvm/llvm-project/pull/74912), I couldn't help but rewrite a few methods for readability, mainta

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/75865 >From 8d67e8c5d38913e4c57690cb09f92a4211d88229 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 7 Dec 2023 12:14:01 -1000 Subject: [PATCH] [lldb] Improve maintainability and readability for ValueObject

[Lldb-commits] [lldb] [lldb] Remove unused GetChildAtIndexPath(...) methods from ValueObject.cpp (PR #75870)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/75870 This a follow-up PR from this other one: https://github.com/llvm/llvm-project/pull/74413 Nothing calls into these two methods, so we (@DavidSpickett, @adrian-prantl, and I) agreed to remove them once we merge

[Lldb-commits] [lldb] [lldb] DRAFT All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-18 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1777,30 +1783,31 @@ static const char *SkipLeadingExpressionPathSeparators(const char *expression) { ValueObjectSP ValueObject::GetSyntheticExpressionPathChild(const char *expression, bool can_create) { - ValueObjectSP syntheti

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/75865 >From b26dbee59abf1168a395b7852f05fb12771dc6e4 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 7 Dec 2023 12:14:01 -1000 Subject: [PATCH] [lldb] Improve maintainability and readability for ValueObject

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1992,71 +1999,67 @@ void ValueObject::GetExpressionPath(Stream &s, } ValueObjectSP ValueObject::GetValueForExpressionPath( -llvm::StringRef expression, ExpressionPathScanEndReason *reason_to_stop, -ExpressionPathEndResultType *final_value_type, +llvm::StringRef

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1777,30 +1783,31 @@ static const char *SkipLeadingExpressionPathSeparators(const char *expression) { ValueObjectSP ValueObject::GetSyntheticExpressionPathChild(const char *expression, bool can_create) { - ValueObjectSP syntheti

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
@@ -1700,13 +1706,13 @@ ValueObjectSP ValueObject::GetSyntheticChildAtOffset( return synthetic_child_sp; if (!can_create) -return {}; +return ValueObjectSP(); PortalPete wrote: This one is more about consistency because the vast majority of the

[Lldb-commits] [lldb] [lldb] Improve maintainability and readability for ValueObject methods (PR #75865)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/75865 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] DRAFT All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] In-progress — All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] In-progress — All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete ready_for_review https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] In-progress — All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-19 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > > ### Goal > > Every `ValueObjectSP` will have an actual value and will never be equal to > > `nullptr`. > > I would like to learn more about the goal. It seems like the existing code > will result in widespread use of `optional>`. Is the > plan to reduce these cases to a

[Lldb-commits] [lldb] [lldb] Remove 2nd "error: " substring in output to developer (PR #72150)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/72150 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove 2nd "error: " substring in output to developer (PR #72150)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete closed https://github.com/llvm/llvm-project/pull/72150 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] In-progress — All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-19 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete closed https://github.com/llvm/llvm-project/pull/74912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove 2nd "error: " substring in output to developer (PR #72150)

2023-12-20 Thread Pete Lawrence via lldb-commits
PortalPete wrote: My apologies. I renamed the branch and apparently that's GitHub's cue to close all the PRs coming from that branch. In this case, it's probably for the best because we decided to break this up into 2-3 PRs. https://github.com/llvm/llvm-project/pull/72150

[Lldb-commits] [lldb] [lldb] In-progress — All ValueObjectSP instances are now valid (non-null) but have an error state (PR #74912)

2023-12-20 Thread Pete Lawrence via lldb-commits
PortalPete wrote: My apologies. I renamed the branch and apparently that's GitHub's cue to close all the PRs coming from that branch. I'll recreate the PR but please feel free to ask questions and make suggestions here in the meantime. I'll post the replacement PR when it's up. https://github

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2023-12-20 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/76111 For example, the following message has the severity string "error: " twice. > "error: :3:1: error: cannot find 'bogus' in scope This method already appends the severity string in the beginning, but wit

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2023-12-20 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/76111 >From b87fd5cef3463e463589a3fbce2bbd6cb08566dd Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Tue, 19 Dec 2023 19:25:36 -1000 Subject: [PATCH] [lldb] Remove redundant severity substring within a diagnosti

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2023-12-21 Thread Pete Lawrence via lldb-commits
@@ -48,8 +48,17 @@ std::string DiagnosticManager::GetString(char separator) { std::string ret; for (const auto &diagnostic : Diagnostics()) { -ret.append(StringForSeverity(diagnostic->GetSeverity())); -ret.append(std::string(diagnostic->GetMessage())); +std::st

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2023-12-21 Thread Pete Lawrence via lldb-commits
@@ -48,8 +48,17 @@ std::string DiagnosticManager::GetString(char separator) { std::string ret; for (const auto &diagnostic : Diagnostics()) { -ret.append(StringForSeverity(diagnostic->GetSeverity())); -ret.append(std::string(diagnostic->GetMessage())); +std::st

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2024-01-08 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/76111 >From d10ce06475f52ec918aab96f7b1f85ee414d2d2f Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Tue, 19 Dec 2023 19:25:36 -1000 Subject: [PATCH] [lldb] Remove redundant severity substring within a diagnosti

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2024-01-08 Thread Pete Lawrence via lldb-commits
@@ -48,8 +48,17 @@ std::string DiagnosticManager::GetString(char separator) { std::string ret; for (const auto &diagnostic : Diagnostics()) { -ret.append(StringForSeverity(diagnostic->GetSeverity())); -ret.append(std::string(diagnostic->GetMessage())); +std::st

[Lldb-commits] [lldb] [lldb] Add color support to StreamString (PR #77380)

2024-01-08 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/77380 This change just adds a `bool colors` parameter to the `StreamString` class's constructor, which it passes up to its superclass’s constructor. rdar://120671168 >From 6ee5afb1a5f0f5e2070bfb0fb70f4a51bcd6ef9f

[Lldb-commits] [lldb] [lldb] Add color support to StreamString (PR #77380)

2024-01-09 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/77380 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Add color support to StreamString (PR #77380)

2024-01-09 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > Surprised that no one is using that constructor, and if that's true - is this > change to support something else or just making sure we don't make a mistake > in future if we do use this class? Me too! I'm was working on another patch and figured out this is why I couldn't

[Lldb-commits] [lldb] [lldb] All ValueObjectSP instances are now valid (non-null) but have an error state (In-progress | Take 2) (PR #77375)

2024-01-09 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > I don't understand why step 2 is necessary; what does the optional actually > add? Is there a useful distinction between "I got an optional that was empty" > and "I got a ValueObjectSP with an error"? I didn't see any places where you > use that distinction. > > Returning

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2024-01-18 Thread Pete Lawrence via lldb-commits
PortalPete wrote: Ping to @adrian-prantl, I believe this is good to go. 🙂 https://github.com/llvm/llvm-project/pull/76111 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] All ValueObjectSP instances are now valid (non-null) but have an error state (In-progress | Take 2) (PR #77375)

2024-01-23 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete converted_to_draft https://github.com/llvm/llvm-project/pull/77375 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] DRAFT - Add `Status::Detail` type to hold information from diagnostics (PR #80936)

2024-02-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/80936 This is a work in progress that lets `Status` instances separately store multiple messages such as errors, warnings, and/or notes. This approach can help break the anti-pattern where code that creates or modi

[Lldb-commits] [lldb] [lldb] DRAFT - Print multiple messages with line art that goes from each indicator (PR #80938)

2024-02-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/80938 This changes the way `dwim` and `expr` commands display 1 or more errors, warnings, and remarks with line art in a style that inspires the name "pan flute". ### Before The way it looks today. https://github.

[Lldb-commits] [lldb] [lldb] DRAFT - Print multiple messages with line art that goes from each indicator (PR #80938)

2024-02-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/80938 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] DRAFT - Print multiple messages with line art that goes from each indicator (PR #80938)

2024-02-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/80938 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] DRAFT - Add `Status::Detail` type to hold information from diagnostics (PR #80936)

2024-02-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/80936 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove redundant severity substring within a diagnostic message. (PR #76111)

2024-02-07 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/76111 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/68452 The `po` alias now matches the behavior of the `expression` command when the it can apply a Fix-It to an expression. Modifications - Add has `m_fixed_expression` to the `CommandObjectDWIMPrint` class a `prot

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 3a17d92ccaf71bd1f04035278af7be5eb5c3 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] Modify `po` alias to match outward FixIt behavior with `expres

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 7def3f8e3a04ee9efbaef194bd60eec81fb32c25 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] Modify `po` alias to match outward FixIt behavior with `expres

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -0,0 +1,27 @@ +""" +Tests whether the do-what-I-mean (DWIM) print `po` alias applies FixIts like `expr` does +""" +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CPP_DWIM_Fixit_TestCas

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -0,0 +1,27 @@ +""" +Tests whether the do-what-I-mean (DWIM) print `po` alias applies FixIts like `expr` does +""" +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CPP_DWIM_Fixit_TestCas

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -172,8 +172,18 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, { auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; -ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, ev

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -0,0 +1,27 @@ +""" +Tests whether the do-what-I-mean (DWIM) print `po` alias applies FixIts like `expr` does +""" +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CPP_DWIM_Fixit_TestCas

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -43,6 +43,10 @@ class CommandObjectDWIMPrint : public CommandObjectRaw { HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override; +protected: + /// Stores the expression after applying any Fix-Its.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 08f4d4ae5afdedb0fbc6196272fcf8316de5f5ea Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -43,6 +43,10 @@ class CommandObjectDWIMPrint : public CommandObjectRaw { HandleArgumentCompletion(CompletionRequest &request, OptionElementVector &opt_element_vector) override; +protected: + /// Stores the expression after applying any Fix-Its.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
PortalPete wrote: > The code is not something I am familiar with, but I did notice that the PR > title and the commit title are quite different. Not sure which one is better, > but it is generally nice to have them match (in particular it is nice to add > the `[lldb]` tag to the commit title t

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -172,8 +172,18 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, { auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; -ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, ev

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From f842928b5300c2ea98dbdc1bf3e3fe768dcf31ed Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
@@ -0,0 +1,27 @@ +""" +Tests whether the do-what-I-mean (DWIM) print `po` alias applies FixIts like `expr` does +""" +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CPP_DWIM_Fixit_TestCas

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-06 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 6ba636bde2a51704025637f3c35d1b98ba6dd7f3 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 6d8f61115b159cdf4d00135a76b88b7848dc4103 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete updated https://github.com/llvm/llvm-project/pull/68452 >From 60dbef776988d89bbf59ae1aa6e4d2b404881b43 Mon Sep 17 00:00:00 2001 From: Pete Lawrence Date: Thu, 5 Oct 2023 14:22:35 -1000 Subject: [PATCH] [lldb] Update the `po` alias to print Fix-Its to the console.

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
@@ -0,0 +1,27 @@ +""" +Tests whether the do-what-I-mean (DWIM) print `po` alias applies FixIts like `expr` does +""" +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class CPP_DWIM_Fixit_TestCas

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete edited https://github.com/llvm/llvm-project/pull/68452 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68452)

2023-10-10 Thread Pete Lawrence via lldb-commits
@@ -173,7 +173,16 @@ bool CommandObjectDWIMPrint::DoExecute(StringRef command, auto *exe_scope = m_exe_ctx.GetBestExecutionContextScope(); ValueObjectSP valobj_sp; ExpressionResults expr_result = -target.EvaluateExpression(expr, exe_scope, valobj_sp, eval_op

[Lldb-commits] [lldb] [lldb] Fix `po` alias by printing fix-its to the console. (PR #68755)

2023-10-10 Thread Pete Lawrence via lldb-commits
https://github.com/PortalPete created https://github.com/llvm/llvm-project/pull/68755 The `po` alias now matches the behavior of the `expression` command when the it can apply a Fix-It to an expression. Modifications - Add has `m_fixed_expression` to the `CommandObjectDWIMPrint` class a `prot

  1   2   >