-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[6.0] [Completion] Update type attribute completions #74989
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
These aren't currently claimed by anything other than SILFunctions, and as such are invalid in regular Swift code. Treat them as SIL type attributes. Also while here, fix the SIL reference attributes to be SIL attributes.
`TypeAttribute::isSilOnly` does the same thing.
Pick up all non-underscored simple type attributes for code completion, and add support for `@isolated(any)`. rdar://130741006 rdar://130288443
Add a case for completing type attributes in inheritance clause position, and limit the completion of `@unchecked`, `@preconcurrency`, and `@retroactive` to that case.
@swift-ci please test |
@@ -83,6 +82,7 @@ SIMPLE_SIL_TYPE_ATTR(inout, Inout) | |||
SIMPLE_SIL_TYPE_ATTR(inout_aliasable, InoutAliasable) | |||
SIMPLE_SIL_TYPE_ATTR(in_guaranteed, InGuaranteed) | |||
SIMPLE_SIL_TYPE_ATTR(in_constant, InConstant) | |||
SIMPLE_SIL_TYPE_ATTR(noescape, NoEscape) |
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.
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.
I intentionally didn't put any effort in that patch into recategorizing the existing attributes. I wanted it to be focused on the high-level representation change.
I don't know why they're not simple attributes in SIL. They certainly look like simple attributes.
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.
All good, was just checking that there wasn't any underlying reason that we missed. Thanks!
6.0 cherry-pick of #74890
@isolated(any)
,@noDerivative
,@preconcurrency
,@retroactive
,@Sendable
, and@unchecked