Skip to content

[IDE][NFC] Cleanup collectArgumentExpectation() #18535

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

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Aug 7, 2018

Strictly NFC cleanups for CompletionLookup::collectArgumentExpectation()

@rintaro
Copy link
Member Author

rintaro commented Aug 7, 2018

@swift-ci Please smoke test

@rintaro rintaro requested a review from benlangmuir August 7, 2018 09:54
}
}
auto &SM = DC.getASTContext().SourceMgr;
for (unsigned i = 0, n = tuple->getNumElements(); i != n; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have both of these loops? Are there any cases found by the first loop that we couldn't find with the second?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I just inlined getPositionInTupleExpr() here, and I wanted to keep this PR strictly NFC. I'll do further improvements in follow-ups.

@rintaro rintaro merged commit de66cc1 into swiftlang:master Aug 7, 2018
@rintaro rintaro deleted the ide-complete-refactor-argexpectation branch August 7, 2018 16:14
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