mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement customizable Sendable conformance diagnostics.
Rework Sendable checking to be completely based on "missing" conformances, so that we can individually diagnose missing Sendable conformances based on both the module in which the conformance check happened as well as where the type was declared. The basic rules here are to only diagnose if either the module where the non-Sendable type was declared or the module where it was checked was compiled with a mode that consistently diagnoses `Sendable`, either by virtue of being Swift 6 or because `-warn-concurrency` was provided on the command line. And have that diagnostic be an error in Swift 6 or warning in Swift 5.x. There is much tuning to be done here.
This commit is contained in:
@@ -56,7 +56,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 = 624; // new BodyKind for AbstractFunctionDecl
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 625; // is concurrency checked?
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
@@ -797,6 +797,7 @@ namespace options_block {
|
||||
IS_IMPLICIT_DYNAMIC_ENABLED,
|
||||
IS_ALLOW_MODULE_WITH_COMPILER_ERRORS_ENABLED,
|
||||
MODULE_ABI_NAME,
|
||||
IS_CONCURRENCY_CHECKED,
|
||||
};
|
||||
|
||||
using SDKPathLayout = BCRecordLayout<
|
||||
@@ -843,6 +844,10 @@ namespace options_block {
|
||||
MODULE_ABI_NAME,
|
||||
BCBlob
|
||||
>;
|
||||
|
||||
using IsConcurrencyCheckedLayout = BCRecordLayout<
|
||||
IS_CONCURRENCY_CHECKED
|
||||
>;
|
||||
}
|
||||
|
||||
/// The record types within the input block.
|
||||
|
||||
Reference in New Issue
Block a user