Skip to content

Commit 5538068

Browse files
committed
Rename -strict-concurrency=explicit to minimal
This makes it far more clear what the relative ordering of the options is. Thanks, Jake!
1 parent 4116d7a commit 5538068

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace swift {
6262
enum class StrictConcurrency {
6363
/// Enforce Sendable constraints where it has been explicitly adopted and
6464
/// perform actor-isolation checking wherever code has adopted concurrency.
65-
Explicit,
65+
Minimal,
6666
/// Enforce Sendable constraints and perform actor-isolation checking
6767
/// wherever code has adopted concurrency, including code that has
6868
/// explicitly adopted Sendable.

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
697697
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
698698
} else if (const Arg *A = Args.getLastArg(OPT_strict_concurrency)) {
699699
auto value = llvm::StringSwitch<Optional<StrictConcurrency>>(A->getValue())
700-
.Case("explicit", StrictConcurrency::Explicit)
700+
.Case("minimal", StrictConcurrency::Minimal)
701701
.Case("targeted", StrictConcurrency::Targeted)
702702
.Case("complete", StrictConcurrency::Complete)
703703
.Default(None);

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ SendableCheckContext::implicitSendableDiagnosticBehavior() const {
659659

660660
LLVM_FALLTHROUGH;
661661

662-
case StrictConcurrency::Explicit:
662+
case StrictConcurrency::Minimal:
663663
// Explicit Sendable conformances always diagnose, even when strict
664664
// strict checking is disabled.
665665
if (isExplicitSendableConformance())
@@ -2140,7 +2140,7 @@ namespace {
21402140
/// \returns true if we diagnosed the entity, \c false otherwise.
21412141
bool diagnoseReferenceToUnsafeGlobal(ValueDecl *value, SourceLoc loc) {
21422142
switch (value->getASTContext().LangOpts.StrictConcurrencyLevel) {
2143-
case StrictConcurrency::Explicit:
2143+
case StrictConcurrency::Minimal:
21442144
case StrictConcurrency::Targeted:
21452145
// Never diagnose.
21462146
return false;
@@ -3926,7 +3926,7 @@ bool swift::contextRequiresStrictConcurrencyChecking(
39263926
return true;
39273927

39283928
case StrictConcurrency::Targeted:
3929-
case StrictConcurrency::Explicit:
3929+
case StrictConcurrency::Minimal:
39303930
// Check below to see if the context has adopted concurrency features.
39313931
break;
39323932
}

test/Concurrency/strict_concurrency_explicit.swift renamed to test/Concurrency/strict_concurrency_minimal.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -strict-concurrency=explicit
1+
// RUN: %target-typecheck-verify-swift -strict-concurrency=minimal
22
// REQUIRES: concurrency
33

44
class C1 { }

0 commit comments

Comments
 (0)