Skip to content

Commit 165827c

Browse files
DougGregorkavon
authored andcommitted
Use -strict-concurrency=minimal as the default for Swift 5.x mode.
Emulate the behavior of Swift 5.5/5.6 by default, using `-strict-concurrency=minimal`.
1 parent 89fec21 commit 165827c

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
@@ -794,8 +794,8 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
794794
} else if (Args.hasArg(OPT_warn_concurrency)) {
795795
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
796796
} else {
797-
// Default to "limited" checking in Swift 5.x.
798-
Opts.StrictConcurrencyLevel = StrictConcurrency::Targeted;
797+
// Default to minimal checking in Swift 5.x.
798+
Opts.StrictConcurrencyLevel = StrictConcurrency::Minimal;
799799
}
800800

801801
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)