Skip to content

[5.2][CodeCompletion] Always look into decls to find the parsed expression #29175

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 Jan 14, 2020

Cherry-pick of #28896 into swift-5.2-branch originally reviewed by @benlangmuir

rdar://problem/58098222

In fast completion scenario, 'AbstractFunctionDecl' may have the body
from the different file than the decl itself. Thay may confuses source
range checking.

As a workaround, always look into decls regardless of the range. This
should not regress the speed of the searching much because
statements/expressions (including nested function bodies) in the decl
is still skipped if it's outside the range.

rdar://problem/58098222
(cherry picked from commit a706461)
@rintaro rintaro requested a review from a team as a code owner January 14, 2020 00:52
@rintaro
Copy link
Member Author

rintaro commented Jan 14, 2020

@swift-ci Please test

@rintaro rintaro changed the title [CodeCompletion] Always look into decls to find the parsed expression [5.2][CodeCompletion] Always look into decls to find the parsed expression Jan 14, 2020
@rintaro rintaro merged commit 893eca1 into swiftlang:swift-5.2-branch Jan 14, 2020
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