Skip to content

[5.9][Completion] Only provide macro completions when they are valid #65029

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
merged 2 commits into from
Apr 11, 2023

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Apr 8, 2023

Only return macros that are valid in their current position, ie. an
attached macro is not valid on a nominal.

Also return freestanding expression macros in code block item position
and handle the new freestanding code item macros.

Resolves rdar://105563583.

(cherry picked from commit 31dee1c)
@bnbarham bnbarham requested a review from airspeedswift April 8, 2023 18:12
@bnbarham bnbarham requested a review from a team as a code owner April 8, 2023 18:12
31dee1c refactored the completion
filter, accidentally dropping initializers when found from the cache.
Add these back in and also modify the existing test to load from the
cache as well.

Resolves rdar://107807707.

(cherry picked from commit 39c0afc)
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham changed the title [Completion] Only provide macro completions when they are valid [5.9][Completion] Only provide macro completions when they are valid Apr 10, 2023
@bnbarham bnbarham merged commit 77dfcd9 into swiftlang:release/5.9 Apr 11, 2023
@bnbarham bnbarham deleted the cherry-macro-completions branch April 11, 2023 16:41
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants