[Lldb-commits] [lldb] [lldb] Correct spacing of = {...} when depth limit is hit (PR #149480)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 18 02:01:40 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: David Spickett (DavidSpickett)
<details>
<summary>Changes</summary>
In 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:
- (modified) lldb/source/DataFormatters/ValueObjectPrinter.cpp (+1-1)
- (modified) lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py (+5-5)
``````````diff
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 }",
],
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/149480
More information about the lldb-commits
mailing list