@@ -967,7 +967,7 @@ void LifetimeChecker::injectActorHops() {
967967
968968 AvailabilitySet inSet (outSet.size ());
969969 auto const &predecessors = block.getPredecessorBlocks ();
970- for (const auto & pred : predecessors)
970+ for (auto * pred : predecessors)
971971 inSet.mergeIn (getBlockInfo (pred).OutAvailability );
972972
973973 if (inSet.isAllYes ()) {
@@ -2027,12 +2027,14 @@ void LifetimeChecker::reportIllegalUseForActorInit(
20272027
20282028 case ActorInitKind::Plain:
20292029 diagnose (Module, Use.Inst ->getLoc (), diag::self_disallowed_actor_init,
2030- false , ProblemDesc);
2030+ false , ProblemDesc)
2031+ .warnUntilSwiftVersion (6 );
20312032 break ;
20322033
20332034 case ActorInitKind::GlobalActorIsolated:
20342035 diagnose (Module, Use.Inst ->getLoc (), diag::self_disallowed_actor_init,
2035- true , ProblemDesc);
2036+ true , ProblemDesc)
2037+ .warnUntilSwiftVersion (6 );
20362038 break ;
20372039 }
20382040
@@ -2070,11 +2072,13 @@ void LifetimeChecker::handleLoadUseFailureForActorInit(
20702072 llvm::report_fatal_error (" this actor init is never problematic!" );
20712073
20722074 case ActorInitKind::Plain:
2073- diagnose (Module, Use.Inst ->getLoc (), diag::self_use_actor_init, false );
2075+ diagnose (Module, Use.Inst ->getLoc (), diag::self_use_actor_init, false )
2076+ .warnUntilSwiftVersion (6 );
20742077 break ;
20752078
20762079 case ActorInitKind::GlobalActorIsolated:
2077- diagnose (Module, Use.Inst ->getLoc (), diag::self_use_actor_init, true );
2080+ diagnose (Module, Use.Inst ->getLoc (), diag::self_use_actor_init, true )
2081+ .warnUntilSwiftVersion (6 );
20782082 break ;
20792083 }
20802084
0 commit comments