mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Like `?` or property access, `x!` can be borrowing, consuming, or mutated through depending on the use site and the ownership of the base value. Alter SILGen to emit `x!` as a borrowing operation when the result is only used as a borrow. Fix the move-only checker not to treat the unreachable branch as a dead path for values and try to destroy the value unnecessarily and possibly out-of-order with cleanups on the value. Fixes rdar://127459955.
14 KiB
14 KiB