Skip to content

LifetimeDependenceDiagnostics; remove a bootstrapping hack. #78599

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
merged 4 commits into from
Jan 14, 2025

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jan 12, 2025

This temporary hack was preventing diagnostics from kicking in. This could even result in invalid SIL after the diagnostic failed to trigger.

Add unit tests for lifetime dependence property access semantics.

@atrick atrick requested review from meg-gupta and removed request for jckarter and eeckstein January 12, 2025 23:15
@atrick
Copy link
Contributor Author

atrick commented Jan 12, 2025

@swift-ci test

@atrick atrick enabled auto-merge January 12, 2025 23:16
This temporary hack was preventing diagnostics from kicking in. This could even
result in invalid SIL after the diagnostic failed to trigger.
Preserve ownership for empty non-trivial structs. This currently applies to
~Escapable structs. People often use empty structs to investigate language
behavior. They should behave just like a struct that wraps a
pointer.

Previously, this would crash later during OSSA lifetime completion:

Assertion failed: (isa<UnreachableInst>(block->getTerminator())),
function computeRegion, file OSSALifetimeCompletion.cpp.
Use _overrideLifetime to avoid a diagnostic error.
@atrick atrick force-pushed the fix-diagnostic-hack branch from 2c35728 to 8b02bd7 Compare January 14, 2025 00:47
@atrick
Copy link
Contributor Author

atrick commented Jan 14, 2025

@swift-ci test

@atrick atrick merged commit 0f9e4fc into swiftlang:main Jan 14, 2025
4 of 5 checks passed
@atrick atrick deleted the fix-diagnostic-hack branch January 14, 2025 06:57
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.

2 participants