Skip to content

[5.9] Batched cherry-picks #65195

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

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Apr 14, 2023

Just batching some cherry-picks in order to lower the amount of times I need to ping the branch managers.

This PR contains the following changes:

  1. I added support for handling structs without any fields to the move checker.
  2. I changed slightly how we emit the error that we emit when we partially invalidate through a deinit. Specifically I error now based off of the AST rather than the SIL level deinit construct and I also as a bonus use that to provide a note showing the user where the deinit is in the source code.

Explanation: This changes the noncopyable types implementation in two ways: 1. It adds support for handling structs without any fields to the move checker. This was done by just saying that they artificially have a single field rather than no fields. 2. It changes the implementation around validating that we do not partially invalidate types with deinits to use AST information instead of SIL level information. I also used this as an opportunity to insert a new note on the deinit itself that is causing the error so it shows up in the IDE.

Scope: Only affects noncopyable types since it only changes the move only checkers.

Risk: Low.

Testing: Added compiler tests

…n instance to make sure it is initialized.

I ran into this while fixing the parent commit when attempting to add the
interpreter test in this commit into the aforementioned parent commit.

rdar://107974302
(cherry picked from commit 19f1ded)
… deinit at the AST level rather than the SIL level.

I also added a note telling the user where the deinit is.

rdar://101651138
(cherry picked from commit 8118240)
@gottesmm gottesmm requested a review from a team as a code owner April 14, 2023 17:47
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

Original PRs on main:

#65156
#65130

@gottesmm gottesmm merged commit 4e4518c into swiftlang:release/5.9 Apr 15, 2023
@gottesmm gottesmm deleted the release/5.9/101651138/107974302/104395115 branch April 15, 2023 08:21
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants