Skip to content

[CodeComplete] Offer completions for the names: argument of a macro declaration #65521

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 1 commit into from
May 2, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 29, 2023

When completing after names:, completion should offer the different ways you can specify the names, i.e. arbitrary, named, etc.

@attached(member, names: #^COMPLETE^#)

rdar://108535077

… declaration

When completing after `names:`, completion should offer the different ways you can specify the names, i.e. `arbitrary`, `named`, etc.

```
@freestanding(declaration, names: #^COMPLETE^#)
```

rdar://108535077
@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

@swift-ci Please smoke test macOS

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented May 1, 2023

@swift-ci Please smoke test macOS

Comment on lines +101 to +102
// NOTE: When adding a new name kind, also add it to
// `getAllMacroIntroducedDeclNameKinds`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't looked at all the uses of MacroIntroducedDeclNameKind, could we have a Last equivalent rather than the vector?

Copy link
Member Author

Choose a reason for hiding this comment

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

Discussed offline and couldn’t come up with a betters solution than the std::vector

@ahoppen ahoppen merged commit e4a0b9e into swiftlang:main May 2, 2023
@ahoppen ahoppen deleted the ahoppen/name-suggestions branch May 2, 2023 03:12
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