swift
268d5ccb - Suppress strict safety diagnostics in `@unsafe` declarations

Commit
299 days ago
Suppress strict safety diagnostics in `@unsafe` declarations When a declaration is `@unsafe`, don't emit strict safety diagnostics for uses of unsafe entities, constructs, or types within it. This allows one to account for all unsafe behavior in a module using strict memory safety by marking the appropriate declarations `@unsafe`. Enhance the strict-safety diagnostics to suggest the addition of `@unsafe` where it is needed to suppress them, with a Fix-It. Ensure that all such diagnostics can be suppressed via `@unsafe` so it's possible to get to the above state. Also includes a drive-by bug fix where we weren't diagnosing unsafe methods overriding safe ones in some cases. Fixes rdar://139467327.
Author
Parents
Loading