Skip to content

Rename -strict-concurrency=explicit to minimal #42520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace swift {
enum class StrictConcurrency {
/// Enforce Sendable constraints where it has been explicitly adopted and
/// perform actor-isolation checking wherever code has adopted concurrency.
Explicit,
Minimal,
/// Enforce Sendable constraints and perform actor-isolation checking
/// wherever code has adopted concurrency, including code that has
/// explicitly adopted Sendable.
Expand Down
2 changes: 1 addition & 1 deletion lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.StrictConcurrencyLevel = StrictConcurrency::Complete;
} else if (const Arg *A = Args.getLastArg(OPT_strict_concurrency)) {
auto value = llvm::StringSwitch<Optional<StrictConcurrency>>(A->getValue())
.Case("explicit", StrictConcurrency::Explicit)
.Case("minimal", StrictConcurrency::Minimal)
.Case("targeted", StrictConcurrency::Targeted)
.Case("complete", StrictConcurrency::Complete)
.Default(None);
Expand Down
6 changes: 3 additions & 3 deletions lib/Sema/TypeCheckConcurrency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ SendableCheckContext::implicitSendableDiagnosticBehavior() const {

LLVM_FALLTHROUGH;

case StrictConcurrency::Explicit:
case StrictConcurrency::Minimal:
// Explicit Sendable conformances always diagnose, even when strict
// strict checking is disabled.
if (isExplicitSendableConformance())
Expand Down Expand Up @@ -2140,7 +2140,7 @@ namespace {
/// \returns true if we diagnosed the entity, \c false otherwise.
bool diagnoseReferenceToUnsafeGlobal(ValueDecl *value, SourceLoc loc) {
switch (value->getASTContext().LangOpts.StrictConcurrencyLevel) {
case StrictConcurrency::Explicit:
case StrictConcurrency::Minimal:
case StrictConcurrency::Targeted:
// Never diagnose.
return false;
Expand Down Expand Up @@ -3926,7 +3926,7 @@ bool swift::contextRequiresStrictConcurrencyChecking(
return true;

case StrictConcurrency::Targeted:
case StrictConcurrency::Explicit:
case StrictConcurrency::Minimal:
// Check below to see if the context has adopted concurrency features.
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -strict-concurrency=explicit
// RUN: %target-typecheck-verify-swift -strict-concurrency=minimal
// REQUIRES: concurrency

class C1 { }
Expand Down