-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix MoveOnlyAddressChecker to handle value deinits. #66691
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
91c7228
to
c82ce37
Compare
@swift-ci test |
Track liveness of self so we don't accidentally think that such types can be memberwise reinitialized. Fixes rdar://110232973 ([move-only] Checker should distinguish in between field of single field struct vs parent field itself (was: mutation of field in noncopyable struct should not trigger deinit))
c82ce37
to
a8c45c5
Compare
This passed full testing. |
@swift-ci test source compatibility |
@swift-ci smoke test |
The SCK failure is the same on main |
@@ -350,6 +355,10 @@ void TypeTreeLeafTypeRange::constructFilteredProjections( | |||
callback(newValue, TypeTreeLeafTypeRange(start, next)); | |||
start = next; | |||
} | |||
if (type.isValueTypeWithDeinit()) { |
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 am fine with this as is... but I would like a larger comment here that doesn't just say 'self' has its own liveness. I wish it had the larger explanation or a reference back to the earlier explanation.
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.
Good point. although I need to merge this now to put up a 5.9 PR
Track liveness of self so we don't accidentally think that such types can be memberwise reinitialized.
Fixes rdar://110232973 ([move-only] Checker should distinguish in between field of single field struct vs parent field itself (was: mutation of field in noncopyable struct should not trigger deinit))