Skip to content

Commit ae55078

Browse files
authored
Merge pull request #63786 from kavon/5.8-strict-concurrency-minimal-cherry
[5.8🍒] Use -strict-concurrency=minimal as the default for Swift 5.x mode.
2 parents b2641d6 + 5e99d9c commit ae55078

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ namespace swift {
331331
bool UseMalloc = false;
332332

333333
/// Specifies how strict concurrency checking will be.
334-
StrictConcurrency StrictConcurrencyLevel = StrictConcurrency::Targeted;
334+
StrictConcurrency StrictConcurrencyLevel = StrictConcurrency::Minimal;
335335

336336
/// Enable experimental concurrency model.
337337
bool EnableExperimentalConcurrency = false;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
788788
} else if (Args.hasArg(OPT_warn_concurrency)) {
789789
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
790790
} else {
791-
// Default to "limited" checking in Swift 5.x.
792-
Opts.StrictConcurrencyLevel = StrictConcurrency::Targeted;
791+
// Default to minimal checking in Swift 5.x.
792+
Opts.StrictConcurrencyLevel = StrictConcurrency::Minimal;
793793
}
794794

795795
Opts.WarnImplicitOverrides =

test/Concurrency/strict_concurrency_minimal.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-typecheck-verify-swift -strict-concurrency=minimal
2+
// RUN: %target-typecheck-verify-swift
23
// REQUIRES: concurrency
34

45
class C1 { }

0 commit comments

Comments
 (0)