-
Notifications
You must be signed in to change notification settings - Fork 345
upgrade Swift plugin to use llvm::Expected for GetIndexOfChildWithName #10593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade Swift plugin to use llvm::Expected for GetIndexOfChildWithName #10593
Conversation
if (idx < UINT32_MAX && idx >= CalculateNumChildrenIgnoringErrors()) | ||
return UINT32_MAX; | ||
if ((idx == UINT32_MAX) || | ||
(idx < UINT32_MAX && idx >= CalculateNumChildrenIgnoringErrors())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idx < UINT32_MAX
is now redundant, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I assumed that the value could go higher but it's a uint32
not an uint
.
if (idx < UINT32_MAX && idx >= CalculateNumChildrenIgnoringErrors()) | ||
return UINT32_MAX; | ||
if ((idx == UINT32_MAX) || | ||
(idx < UINT32_MAX && idx >= CalculateNumChildrenIgnoringErrors())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same idea here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just make sure to squash the "review commits" before merging
bf75a76
to
e12f551
Compare
e12f551
to
105d084
Compare
I assume the error fell out of swiftlang#10593, which apparently was not built/tested.
In
llvm/llvm-project
, this PR changed the return type ofGetIndexOfChildWithName
.This PR reflects those changes in the Swift plugin for LLDB.