Skip to content
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

Strict safety more minor cleanups #80103

Merged

Conversation

DougGregor
Copy link
Member

Two small improvements to SE-458 strict memory safety checking:

  • withoutActuallyEscaping is unsafe for @convention(block) (rdar://139994149)
  • Add a Fix-It to remove unsafe in the no unsafe operations occur within 'unsafe' expression warning and put it into the StrictMemorySafety diagnostic group

The implementation of `withoutActuallyEscaping` for `@convention(block)`
functions cannot verify at runtime that the function did not actually
escape. Diagnose this as unsafe code under strict memory safety checking.

Fixes rdar://139994149.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit a02633a into swiftlang:main Mar 19, 2025
3 checks passed
@DougGregor DougGregor deleted the strict-safety-more-minor-cleanups branch March 19, 2025 03:29
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.

1 participant