swift
6039ca22 - LifetimeDependenceDiagnostics: extend temp alloc to unreachable.

Commit
35 days ago
LifetimeDependenceDiagnostics: extend temp alloc to unreachable. When a non-Escapable value depends on the address of a trivial value, we use a special computeAddressableRange analysis to compute the trivial value's scope. Extend that analysis to include unreachable paths. Fixes this pattern: inlineStorage.span.withUnsafeBytes where inlineStorage is a trivial type defined in the user module. This does not reproduce directly with InlineArray, but it is a problem for user modules that have their own trivial wrapper around an InlineArray. Fixes rdar://161630684 (Incorrect diagnostic: lifetime-dependent value escapes its scope) (cherry picked from commit 98b7d5906cffa0cf7a481ba47a6acd746e388ac9)
Author
Committer
Parents
Loading