Skip to content

[lldb] Correct false case in SwiftOptionalSummaryProvider::DoesPrintChildren#13314

Open
kastiglione wants to merge 1 commit into
stable/21.xfrom
dl/lldb-Correct-false-case-in-SwiftOptionalSummaryProvider-DoesPrintChildren
Open

[lldb] Correct false case in SwiftOptionalSummaryProvider::DoesPrintChildren#13314
kastiglione wants to merge 1 commit into
stable/21.xfrom
dl/lldb-Correct-false-case-in-SwiftOptionalSummaryProvider-DoesPrintChildren

Conversation

@kastiglione

@kastiglione kastiglione commented Jul 2, 2026

Copy link
Copy Markdown

Return false from DoesPrintChildren for .none values.

From the docstring for ExtractSomeIfAny:

/// Returns {} on error, nullptr on .none, and a ValueObject on .some.

This changes the case where nullptr is returned, indicating .none. In those cases, children should not be printed.

I have seen an issue in the wild where "nil" is printed as the summary, yet children are incorrectly printed. I have not yet figured out a reproduction. An example output is:

headKeyView = nil {
  NSResponder = <parent failed to evaluate: read memory from 0x0 failed (0 of 8 bytes read)>
  _frame = <parent failed to evaluate: read memory from 0x0 failed (0 of 8 bytes read)>
  _bounds = <parent failed to evaluate: read memory from 0x0 failed (0 of 8 bytes read)>
  _subviews = <parent failed to evaluate: read memory from 0x0 failed (0 of 8 bytes read)>
  ...
}

@kastiglione

Copy link
Copy Markdown
Author

@swift-ci test

@kastiglione kastiglione requested a review from a team as a code owner July 2, 2026 22:35
@kastiglione

Copy link
Copy Markdown
Author

@swift-ci test

@kastiglione

Copy link
Copy Markdown
Author

@swift-ci test windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants