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
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
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
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
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.
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
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
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
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
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
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
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
@@ -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
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
@@ -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
@@ -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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -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
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
@@ -1777,30 +1783,31 @@ static const char
*SkipLeadingExpressionPathSeparators(const char *expression) {
ValueObjectSP
ValueObject::GetSyntheticExpressionPathChild(const char *expression,
bool can_create) {
- ValueObjectSP syntheti
@@ -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
@@ -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
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
@@ -1777,30 +1783,31 @@ static const char
*SkipLeadingExpressionPathSeparators(const char *expression) {
ValueObjectSP
ValueObject::GetSyntheticExpressionPathChild(const char *expression,
bool can_create) {
- ValueObjectSP syntheti
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
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
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
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
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
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
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
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
@@ -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(
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
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
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
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
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
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
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
@@ -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
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
@@ -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
@@ -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
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
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
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
@@ -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
@@ -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
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
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
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
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
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
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
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
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
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
PortalPete wrote:
> I think I looked at every changed line, looks good to me overall. Found one
> place with a small style issue but it's not a blocker. Thanks!
Thanks @bulbazord!
Do you know why the `code_formatter` check/bot didn't flag that or the other
one-line `if` statements?
https://gi
@@ -769,10 +768,10 @@ bool CommandObjectRaw::Execute(const char *args_string,
handled = InvokeOverrideCallback(argv, result);
}
if (!handled) {
-if (CheckRequirements(result))
- handled = DoExecute(args_string, result);
+if (CheckRequirements(result)) {
+
@@ -429,11 +428,13 @@ llvm::StringRef CommandObjectProxy::GetUnsupportedError()
{
return "command is not implemented";
}
-bool CommandObjectProxy::Execute(const char *args_string,
+void CommandObjectProxy::Execute(const char *args_string,
C
https://github.com/PortalPete updated
https://github.com/llvm/llvm-project/pull/69989
>From d18c6e2fd2200ec14a8ef9f0a525bb2da6a4a968 Mon Sep 17 00:00:00 2001
From: Pete Lawrence
Date: Thu, 19 Oct 2023 18:59:57 -1000
Subject: [PATCH] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)`
t
@@ -715,7 +715,7 @@ Thread *CommandObject::GetDefaultThread() {
return nullptr;
}
-bool CommandObjectParsed::Execute(const char *args_string,
+void CommandObjectParsed::Execute(const char *args_string,
CommandReturnObject &result) {
bo
@@ -429,11 +428,12 @@ llvm::StringRef CommandObjectProxy::GetUnsupportedError()
{
return "command is not implemented";
}
-bool CommandObjectProxy::Execute(const char *args_string,
+void CommandObjectProxy::Execute(const char *args_string,
C
@@ -769,10 +768,10 @@ bool CommandObjectRaw::Execute(const char *args_string,
handled = InvokeOverrideCallback(argv, result);
}
if (!handled) {
-if (CheckRequirements(result))
- handled = DoExecute(args_string, result);
+if (CheckRequirements(result)) {
---
@@ -1541,18 +1539,18 @@ class CommandObjectMemoryWrite : public
CommandObjectParsed {
if (!buffer.GetString().empty()) {
Status error;
- if (process->WriteMemory(addr, buffer.GetString().data(),
- buffer.GetString().size(),
-
@@ -429,11 +428,12 @@ llvm::StringRef CommandObjectProxy::GetUnsupportedError()
{
return "command is not implemented";
}
-bool CommandObjectProxy::Execute(const char *args_string,
+void CommandObjectProxy::Execute(const char *args_string,
C
https://github.com/PortalPete updated
https://github.com/llvm/llvm-project/pull/69989
>From fe1bc418f4404e1201da388be46a37d40b6af038 Mon Sep 17 00:00:00 2001
From: Pete Lawrence
Date: Thu, 19 Oct 2023 18:59:57 -1000
Subject: [PATCH] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)`
t
https://github.com/PortalPete edited
https://github.com/llvm/llvm-project/pull/69989
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/PortalPete edited
https://github.com/llvm/llvm-project/pull/69989
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
https://github.com/PortalPete created
https://github.com/llvm/llvm-project/pull/69989
Justifications:
- The code doesn't ultimately apply the `true`/`false` return values.
- The methods already pass around a `CommandReturnObject`, typically with a
`result` parameter.
- Each command return objec
PortalPete wrote:
Thanks for this suggestion, @medismailben.
> LGTM overall. I think you can make the test less redundant by using the same
> source file & Makefile for both tests.
I wasn't which is better:
- Multiple files, each with a single test
- Fewer files, each with multiple tests.
Ok,
https://github.com/PortalPete updated
https://github.com/llvm/llvm-project/pull/68755
>From c32c8770032143ece59ce5a3effcd5ee7a736f71 Mon Sep 17 00:00:00 2001
From: Pete Lawrence <34425917+portalp...@users.noreply.github.com>
Date: Tue, 10 Oct 2023 10:59:58 -1000
Subject: [PATCH] [lldb] Fix `po`
https://github.com/PortalPete updated
https://github.com/llvm/llvm-project/pull/68755
>From b0dfcb5b88fa206ebf238f04061d170035a6 Mon Sep 17 00:00:00 2001
From: Pete Lawrence <34425917+portalp...@users.noreply.github.com>
Date: Tue, 10 Oct 2023 10:59:58 -1000
Subject: [PATCH] [lldb] Fix `po`
https://github.com/PortalPete updated
https://github.com/llvm/llvm-project/pull/68755
>From 5d48fc34f1ae2fcbbf24294e10aab4152c865221 Mon Sep 17 00:00:00 2001
From: Pete Lawrence <34425917+portalp...@users.noreply.github.com>
Date: Tue, 10 Oct 2023 10:59:58 -1000
Subject: [PATCH] [lldb] Fix `po`
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
@@ -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
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
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
@@ -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
@@ -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
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.
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.
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.
@@ -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
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.
@@ -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
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
@@ -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.
1 - 100 of 117 matches
Mail list logo