-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CodeComplete] Skip conjunction elements unrelated to code completion token 🚥 #59944 #59992
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
Conversation
2dde79f
to
8b8b768
Compare
93cd473
to
69c306b
Compare
69c306b
to
d30cd06
Compare
d30cd06
to
693f3e1
Compare
@swift-ci Please smoke test |
@swift-ci Please SourceKit stress test |
693f3e1
to
0a71eb3
Compare
@swift-ci Please smoke test |
@swift-ci Please SourceKit stress test |
@swift-ci Please SourceKit stress test |
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! I think this is worth a cherry-pick to 5.8
lib/Sema/CSSyntacticElement.cpp
Outdated
@@ -995,6 +995,10 @@ class SyntacticElementConstraintGenerator | |||
} | |||
} | |||
|
|||
if (cs.isForCodeCompletion() && !cs.containsIDEInspectionTarget(element)) { |
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.
Nit: could you please add a comment here with brief explanation why this is necessary?
0a71eb3
to
97817ba
Compare
@swift-ci Please SourceKit stress test |
97817ba
to
52756d1
Compare
@swift-ci Please SourceKit stress test |
1 similar comment
@swift-ci Please SourceKit stress test |
@swift-ci Please SourceKit stress test |
1 similar comment
@swift-ci Please SourceKit stress test |
Follow-up to swiftlang#63505 Since, when the type is not stated, a variable assumes the type of its initializer that enables out-of-scope variables to be nested inside of some other concrete type i.e. Optional. Resolves: swiftlang#63455
…n application target whose result is not unused This happens if the code completion expression initializes a variable in a multi-statement closure that doesn’t have LeaveClosureBodiesUnchecked set.
…sed code completion
…ode completion token
…ode completion token
52756d1
to
995083c
Compare
@swift-ci Please SourceKit stress test |
1 similar comment
@swift-ci Please SourceKit stress test |
This is now part of #63717 |
Depends on #59944
This should improve performance of code completion inside result builders by not type checking conjunction elements that don’t affect code completion.