@@ -4853,14 +4853,12 @@ getIsolationFromAttributes(const Decl *decl, bool shouldDiagnose = true,
4853
4853
bool isUnsafe = attr->isArgUnsafe ();
4854
4854
if (attr->hasArgs ()) {
4855
4855
if (isUnsafe) {
4856
- bool inSwiftinterface = decl->getDeclContext ()->isInSwiftinterface ();
4857
- ctx.Diags .diagnose (
4858
- attr->getLocation (),
4859
- diag::unsafe_global_actor)
4860
- .fixItRemove (attr->getArgs ()->getSourceRange ())
4861
- .fixItInsert (attr->getLocation (), " @preconcurrency " )
4862
- .warnUntilSwiftVersion (6 )
4863
- .limitBehaviorIf (inSwiftinterface, DiagnosticBehavior::Ignore);
4856
+ if (!decl->getDeclContext ()->isInSwiftinterface ()) {
4857
+ ctx.Diags .diagnose (attr->getLocation (), diag::unsafe_global_actor)
4858
+ .fixItRemove (attr->getArgs ()->getSourceRange ())
4859
+ .fixItInsert (attr->getLocation (), " @preconcurrency " )
4860
+ .warnUntilSwiftVersion (6 );
4861
+ }
4864
4862
} else {
4865
4863
ctx.Diags .diagnose (
4866
4864
attr->getLocation (),
@@ -6490,11 +6488,14 @@ static bool checkSendableInstanceStorage(
6490
6488
return true ;
6491
6489
}
6492
6490
6493
- property->diagnose (diag::non_concurrent_type_member,
6494
- propertyType, false , property->getName (),
6495
- nominal)
6496
- .limitBehaviorUntilSwiftVersion (behavior, 6 )
6497
- .limitBehaviorIf (preconcurrency);
6491
+ if (preconcurrency)
6492
+ behavior = preconcurrency.value ();
6493
+
6494
+ property
6495
+ ->diagnose (diag::non_concurrent_type_member, propertyType,
6496
+ false , property->getName (), nominal)
6497
+ .limitBehaviorWithPreconcurrency (behavior,
6498
+ preconcurrency.has_value ());
6498
6499
return false ;
6499
6500
});
6500
6501
@@ -6532,10 +6533,14 @@ static bool checkSendableInstanceStorage(
6532
6533
return true ;
6533
6534
}
6534
6535
6535
- element->diagnose (diag::non_concurrent_type_member, type,
6536
- true , element->getName (), nominal)
6537
- .limitBehaviorUntilSwiftVersion (behavior, 6 )
6538
- .limitBehaviorIf (preconcurrency);
6536
+ if (preconcurrency)
6537
+ behavior = preconcurrency.value ();
6538
+
6539
+ element
6540
+ ->diagnose (diag::non_concurrent_type_member, type, true ,
6541
+ element->getName (), nominal)
6542
+ .limitBehaviorWithPreconcurrency (behavior,
6543
+ preconcurrency.has_value ());
6539
6544
return false ;
6540
6545
});
6541
6546
0 commit comments