Skip to content

[LifetimeCompletion] Require boundary to be specified. #73386

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

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented May 2, 2024

Don't default to one boundary or another based on whether the value being completed is lexical. For SILGenCleanup, use a new boundary: "availability with leaks". The new boundary lets values that are already leaked on paths that exit the function normally to remain leaked (unless they are only leaked on some paths that exit the function through a given normal exit block in which case they will be destroyed on the availability boundary of the value).

@nate-chandler nate-chandler requested a review from kavon as a code owner May 2, 2024 01:06
Makes it easier to search for since editors will see it as a single
name.
This lambda has to do with availability or the lack thereof but
unreachable instructions are of interest in this context so using the
wrong name confuses things unnecessarily.
Match the declaration order.
Don't default to one boundary or another based on whether the value
being completed is lexical.
The new boundary allows for invalid OSSA where values are not consumed
on paths leading to blocks that exit the function normally.  In such
cases, the value is allowed to continue leaking as before.
Use the new AvailabilityWithLeaks boundary.
@nate-chandler nate-chandler force-pushed the lifetime-completion/20240501/2 branch from ea41ac8 to 284262d Compare May 9, 2024 00:15
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler changed the title [NFC] LifetimeCompletion: Require boundary to be specified. [LifetimeCompletion] Require boundary to be specified. May 9, 2024
@nate-chandler nate-chandler requested a review from atrick May 10, 2024 00:08
@nate-chandler nate-chandler merged commit e74cfb0 into swiftlang:main May 10, 2024
@nate-chandler nate-chandler deleted the lifetime-completion/20240501/2 branch May 10, 2024 14:18
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