Merge pull request #70123 from hborla/swift-6-upcoming-features

[Features] Update upcoming feature flags for Swift 6.
This commit is contained in:
Holly Borla
2023-11-30 19:00:20 -08:00
committed by GitHub
18 changed files with 107 additions and 44 deletions

View File

@@ -888,6 +888,12 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.Features.insert(*feature);
}
// CompleteConcurrency enables all data-race safety upcoming features.
if (Opts.hasFeature(Feature::CompleteConcurrency)) {
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
Opts.Features.insert(Feature::DisableOutwardActorInference);
}
// Map historical flags over to experimental features. We do this for all
// compilers because that's how existing experimental feature flags work.
if (Args.hasArg(OPT_enable_experimental_static_assert))
@@ -1002,7 +1008,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
} else if (Args.hasArg(OPT_warn_concurrency)) {
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
} else if (Opts.hasFeature(Feature::StrictConcurrency)) {
} else if (Opts.hasFeature(Feature::CompleteConcurrency) ||
Opts.hasFeature(Feature::StrictConcurrency)) {
// Already set above.
} else {
// Default to minimal checking in Swift 5.x.