MPE layout code to exclusively use the new code. The key observation: existing
reflection metadata seems to already provide enough information in all cases, so
we can abandon an earlier effort to add spare bitmask data.
Resolves rdar://129281368
The checker already verifies that no non-destroy consuming users occur
after any `move_value`s corresponding to `consume` operators applied to
a value. There may, however, be _destroy_ users after it.
Previously, the checker did not shorten the lifetime from those destroys
up to `move_value`s that appear after those `move_value`s. The result
was that the value's lifetime didn't end at the `consume`.
Here, the checker is fixed to rewrite the lifetimes so that they both
end at `consume`s and also maintain their lexical lifetimes on paths
away from the `consume`s. This is done by using
`OwnedValueCanonicalization`/`CanonicalizeOSSALifetime`.
Specifically, it passes the `move_value`s that correspond to
source-level `consume`s as the `lexicalLifetimeEnds` to the
canonicalizer. Typically, the canonicalizer retracts the lexical
lifetime of the value from its destroys. When these `move_value`s are
specified, however, instead it retracts them from the lifetime boundary
obtained by maximizing the lifetime within its original lifetime while
maintaining the property that the lifetime ends at those `move_value`s.
rdar://113142446
Computing capture information requires a type checked AST, which we don’t have during code completion. To fix an assertion failure, don’t look for a captured `isolated` parameter while computing a closure’s actor isolation during code completion.
rdar://126923558
rdar://127535274
The layout string needs to be assigned before completion, to make it available in recursive metadata initialization. Setting it in the completion function causes a race between other metadata initializers using it and the completion function running.
Checking for the presence of a feature flag in order to allow syntax tends to
result in condfails when applied to `.swiftinterfaces`, since older compilers
that have this restriction may be used to compile newer interfaces where the
restriction has been lifted. Remove this restriction for non-escapable types
when typechecking an interface.
Resolves rdar://128577611
This implements support for autoclosures, closures and local functions
nested within a pack iteration for loop.
The combination of explicit closure expressions and pack expansion
expressions still needs some work.
Fixes#66917.
Fixes#69947.
Fixes rdar://113505724.
Fixes rdar://122293832.
Fixes rdar://124329076.