Skip to content

MemoryLifetimeVerifier: treat enums and function types as trivial types#89458

Open
eeckstein wants to merge 2 commits into
swiftlang:mainfrom
eeckstein:memory-lifetime-verifier
Open

MemoryLifetimeVerifier: treat enums and function types as trivial types#89458
eeckstein wants to merge 2 commits into
swiftlang:mainfrom
eeckstein:memory-lifetime-verifier

Conversation

@eeckstein
Copy link
Copy Markdown
Contributor

Conservatively treat enums and functions as trivial (even if their types are not trivial).
Memory locations of such types can be missing destroys in case the enum is in fact a trivial case (like Optional.none).

Fixes a false verifier error.
rdar://177972760

eeckstein added 2 commits May 27, 2026 08:12
Conservatively treat enums and functions as trivial (even if their types are not trivial).
Memory locations of such types can be missing destroys in case the enum is in fact a trivial case (like `Optional.none`).

Fixes a false verifier error.
rdar://177972760
@eeckstein eeckstein requested a review from jckarter as a code owner May 27, 2026 10:21
@eeckstein eeckstein requested a review from meg-gupta May 27, 2026 10:21
@eeckstein
Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test

@eeckstein
Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test Windows

Copy link
Copy Markdown
Contributor

@meg-gupta meg-gupta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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