Skip to content

Conversation

@charles-zablit
Copy link

@charles-zablit charles-zablit commented May 8, 2025

…m#136693)

This patch replaces the use of `UINT32_MAX` as the error return value of
`GetIndexOfChildWithName` with `llvm::Expected`.

1. Replace `CalculateNumChildrenIgnoringErrors` with
`CalculateNumChildren`. See [this
comment](llvm#136693 (comment)).
2. Update `lldb_private::formatters::ExtractIndexFromString` to use
`llvm::Expected`. See [this
comment](llvm#136693 (comment)).
3. Create a new class which carries both user and internal errors. See
[this
comment](llvm#136693 (comment)).
@charles-zablit charles-zablit requested a review from a team as a code owner May 8, 2025 11:49
@charles-zablit
Copy link
Author

Warning about a merge conflict:

This line was not present in the swiftlang repo:
https://github.com/llvm/llvm-project/blob/c290f48a45df5dc66c9cdc3f3b340cb0e3fc3937/lldb/source/Plugins/Language/CPlusPlus/GenericOptional.cpp#L40-L41

I removed it from the merge conflict, but that might be a mistake.

@adrian-prantl
Copy link

@swift-ci test

@charles-zablit
Copy link
Author

Closing as it depends on too many sub-PRs.

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