AST: Remove ParameterTypeFlags::Escaping

Escapingness is a property of the type of a value, not a property of a function
parameter. Having it as a separate parameter flag just meant one more piece of
state that could get out of sync and cause weird problems.

Instead, always look at the noescape bit in a function type as the canonical
source of truth.

This does mean that '@escaping' is now printed in a few diagnostics where it was
not printed before; we can investigate these as separate issues, but it is
correct to print it there because the function types in question are, in fact,
escaping.

Fixes <https://bugs.swift.org/browse/SR-10256>, <rdar://problem/49522774>.
This commit is contained in:
Slava Pestov
2019-04-14 22:20:22 -04:00
parent 91dffc9d44
commit 39a22f3d6a
19 changed files with 72 additions and 85 deletions

View File

@@ -52,7 +52,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t SWIFTMODULE_VERSION_MINOR = 484; // SDK-relative dependencies flag
const uint16_t SWIFTMODULE_VERSION_MINOR = 485; // remove @escaping parameter flag
using DeclIDField = BCFixed<31>;
@@ -765,7 +765,6 @@ namespace decls_block {
TypeIDField, // type
BCFixed<1>, // vararg?
BCFixed<1>, // autoclosure?
BCFixed<1>, // escaping?
ValueOwnershipField // inout, shared or owned?
>;