Skip to content

Commit 40f4651

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 d501019 commit 40f4651

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
@@ -689,7 +689,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
689689
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
690690
} else if (const Arg *A = Args.getLastArg(OPT_strict_concurrency)) {
691691
auto value = llvm::StringSwitch<Optional<StrictConcurrency>>(A->getValue())
692-
.Case("explicit", StrictConcurrency::Explicit)
692+
.Case("minimal", StrictConcurrency::Minimal)
693693
.Case("targeted", StrictConcurrency::Targeted)
694694
.Case("complete", StrictConcurrency::Complete)
695695
.Default(None);

lib/Sema/TypeCheckConcurrency.cpp

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

780780
LLVM_FALLTHROUGH;
781781

782-
case StrictConcurrency::Explicit:
782+
case StrictConcurrency::Minimal:
783783
// Explicit Sendable conformances always diagnose, even when strict
784784
// strict checking is disabled.
785785
if (isExplicitSendableConformance())
@@ -2071,7 +2071,7 @@ namespace {
20712071
/// \returns true if we diagnosed the entity, \c false otherwise.
20722072
bool diagnoseReferenceToUnsafeGlobal(ValueDecl *value, SourceLoc loc) {
20732073
switch (value->getASTContext().LangOpts.StrictConcurrencyLevel) {
2074-
case StrictConcurrency::Explicit:
2074+
case StrictConcurrency::Minimal:
20752075
case StrictConcurrency::Targeted:
20762076
// Never diagnose.
20772077
return false;
@@ -4190,7 +4190,7 @@ bool swift::contextRequiresStrictConcurrencyChecking(
41904190
return true;
41914191

41924192
case StrictConcurrency::Targeted:
4193-
case StrictConcurrency::Explicit:
4193+
case StrictConcurrency::Minimal:
41944194
// Check below to see if the context has adopted concurrency features.
41954195
break;
41964196
}

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)