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
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 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 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 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 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 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 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
@@ -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
@@ -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
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
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
@@ -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
@@ -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
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
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 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
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
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
@@ -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(
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
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 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 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 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 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 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
@@ -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 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
@@ -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
@@ -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/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
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 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
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 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
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 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
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
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
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
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
@@ -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 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
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
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
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
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:
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
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
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 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 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 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/76111
___
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/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
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
@@ -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
@@ -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 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
@@ -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
@@ -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
@@ -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
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
@@ -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 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
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
@@ -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.
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.
@@ -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.
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
@@ -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
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.
@@ -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 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.
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 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.
@@ -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
@@ -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
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 - 100 of 117 matches
Mail list logo