@@ -347,7 +347,7 @@ GlobalActorAttributeRequest::evaluate(
347347 if (var->isTopLevelGlobal () &&
348348 (var->getDeclContext ()->isAsyncContext () ||
349349 var->getASTContext ().LangOpts .StrictConcurrencyLevel >=
350- StrictConcurrency::On )) {
350+ StrictConcurrency::Complete )) {
351351 var->diagnose (diag::global_actor_top_level_var)
352352 .highlight (globalActorAttr->getRangeWithAt ());
353353 return None;
@@ -651,23 +651,23 @@ DiagnosticBehavior SendableCheckContext::defaultDiagnosticBehavior() const {
651651DiagnosticBehavior
652652SendableCheckContext::implicitSendableDiagnosticBehavior () const {
653653 switch (fromDC->getASTContext ().LangOpts .StrictConcurrencyLevel ) {
654- case StrictConcurrency::Limited :
654+ case StrictConcurrency::Targeted :
655655 // Limited checking only diagnoses implicit Sendable within contexts that
656656 // have adopted concurrency.
657657 if (shouldDiagnoseExistingDataRaces (fromDC))
658658 return DiagnosticBehavior::Warning;
659659
660660 LLVM_FALLTHROUGH;
661661
662- case StrictConcurrency::Off :
662+ case StrictConcurrency::Explicit :
663663 // Explicit Sendable conformances always diagnose, even when strict
664664 // strict checking is disabled.
665665 if (isExplicitSendableConformance ())
666666 return DiagnosticBehavior::Warning;
667667
668668 return DiagnosticBehavior::Ignore;
669669
670- case StrictConcurrency::On :
670+ case StrictConcurrency::Complete :
671671 return defaultDiagnosticBehavior ();
672672 }
673673}
@@ -2140,12 +2140,12 @@ 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::Off :
2144- case StrictConcurrency::Limited :
2143+ case StrictConcurrency::Explicit :
2144+ case StrictConcurrency::Targeted :
21452145 // Never diagnose.
21462146 return false ;
21472147
2148- case StrictConcurrency::On :
2148+ case StrictConcurrency::Complete :
21492149 break ;
21502150 }
21512151
@@ -3713,7 +3713,7 @@ ActorIsolation ActorIsolationRequest::evaluate(
37133713 if (auto var = dyn_cast<VarDecl>(value)) {
37143714 if (var->isTopLevelGlobal () &&
37153715 (var->getASTContext ().LangOpts .StrictConcurrencyLevel >=
3716- StrictConcurrency::On ||
3716+ StrictConcurrency::Complete ||
37173717 var->getDeclContext ()->isAsyncContext ())) {
37183718 if (Type mainActor = var->getASTContext ().getMainActorType ())
37193719 return inferredIsolation (
@@ -3922,11 +3922,11 @@ bool swift::contextRequiresStrictConcurrencyChecking(
39223922 const DeclContext *dc,
39233923 llvm::function_ref<Type(const AbstractClosureExpr *)> getType) {
39243924 switch (dc->getASTContext ().LangOpts .StrictConcurrencyLevel ) {
3925- case StrictConcurrency::On :
3925+ case StrictConcurrency::Complete :
39263926 return true ;
39273927
3928- case StrictConcurrency::Limited :
3929- case StrictConcurrency::Off :
3928+ case StrictConcurrency::Targeted :
3929+ case StrictConcurrency::Explicit :
39303930 // Check below to see if the context has adopted concurrency features.
39313931 break ;
39323932 }
0 commit comments