[lldb] Correct spacing of = {...} when depth limit is hit#149480
Merged
DavidSpickett merged 1 commit intollvm:mainfrom Jul 18, 2025
Merged
[lldb] Correct spacing of = {...} when depth limit is hit#149480DavidSpickett merged 1 commit intollvm:mainfrom
DavidSpickett merged 1 commit intollvm:mainfrom
Conversation
In some places it was printing "= {...}" and some "={...}"
with no space. I think the space looks nicer so do that
in both cases.
Member
|
@llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) ChangesIn some places it was printing "= {...}" and some "={...}" with no space. I think the space looks nicer so do that in both cases. Full diff: https://github.com/llvm/llvm-project/pull/149480.diff 2 Files Affected:
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
index 40493df8aec37..05fcc4db3b125 100644
--- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -854,7 +854,7 @@ llvm::Error ValueObjectPrinter::PrintChildrenIfNeeded(bool value_printed,
PrintChildren(value_printed, summary_printed, curr_ptr_depth);
} else if (HasReachedMaximumDepth() && IsAggregate() &&
ShouldPrintValueObject()) {
- m_stream->PutCString("{...}\n");
+ m_stream->PutCString(" {...}\n");
// The maximum child depth has been reached. If `m_max_depth` is the default
// (i.e. the user has _not_ customized it), then lldb presents a warning to
// the user. The warning tells the user that the limit has been reached, but
diff --git a/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py b/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
index 1dfd7df9ff1be..33648678da797 100644
--- a/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
+++ b/lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
@@ -19,10 +19,10 @@ def test(self):
self.expect(
"frame var --depth 2 --element-count 5 -- c",
substrs=[
- "[0] = {\n b ={...}\n }",
- "[1] = {\n b ={...}\n }",
- "[2] = {\n b ={...}\n }",
- "[3] = {\n b ={...}\n }",
- "[4] = {\n b ={...}\n }",
+ "[0] = {\n b = {...}\n }",
+ "[1] = {\n b = {...}\n }",
+ "[2] = {\n b = {...}\n }",
+ "[3] = {\n b = {...}\n }",
+ "[4] = {\n b = {...}\n }",
],
)
|
Michael137
approved these changes
Jul 18, 2025
Member
Michael137
left a comment
There was a problem hiding this comment.
that bothered me too, thanks!
This was referenced Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some places it was printing "= {...}" and some "={...}" with no space. I think the space looks nicer so do that in both cases.