@@ -315,12 +315,12 @@ ERROR(missing_never_call_closure,none,
315315 (Type))
316316
317317ERROR(missing_return_decl,none,
318- " missing return in %1 expected to return %0" ,
319- (Type, DescriptiveDeclKind ))
318+ " missing return in %kindonly1 expected to return %0" ,
319+ (Type, const AbstractFunctionDecl * ))
320320ERROR(missing_never_call_decl,none,
321- " %1 with uninhabited return type %0 is missing "
321+ " %kindonly1 with uninhabited return type %0 is missing "
322322 " call to another never-returning function on all paths" ,
323- (Type, DescriptiveDeclKind ))
323+ (Type, const AbstractFunctionDecl * ))
324324
325325NOTE(missing_return_last_expr_note,none,
326326 " did you mean to return the last expression?" , ())
@@ -701,8 +701,9 @@ WARNING(warning_int_to_fp_inexact, none,
701701
702702// Flow-isolation diagnostics
703703ERROR(isolated_after_nonisolated, none,
704- " cannot access %1 %2 here in %select{nonisolated initializer|deinitializer}0" ,
705- (bool , DescriptiveDeclKind, DeclName))
704+ " cannot access %kind1 here in "
705+ " %select{nonisolated initializer|deinitializer}0" ,
706+ (bool , const ValueDecl *))
706707NOTE(nonisolated_blame, none, " after %1%2 %3, "
707708 " only nonisolated properties of 'self' can be accessed from "
708709 " %select{this init|a deinit}0" , (bool , StringRef, StringRef, DeclName))
@@ -982,23 +983,23 @@ GROUPED_ERROR(regionbasedisolation_type_send_yields_race, SendingRisksDataRace,
982983 (Type))
983984NOTE(regionbasedisolation_type_use_after_send, none,
984985 " sending value of non-Sendable type %0 to %1 callee risks causing data races between %1 and local %2 uses" ,
985- (Type, ActorIsolation, ActorIsolation ))
986+ (Type, StringRef, StringRef ))
986987NOTE(regionbasedisolation_type_use_after_send_callee, none,
987- " sending value of non-Sendable type %0 to %1 %2 %3 risks causing data "
988- " races between %1 and local %4 uses" ,
989- (Type, ActorIsolation, DescriptiveDeclKind, DeclName, ActorIsolation ))
988+ " sending value of non-Sendable type %0 to %1 %kind2 risks causing data "
989+ " races between %1 and local %3 uses" ,
990+ (Type, StringRef, const ValueDecl *, StringRef ))
990991
991992NOTE(regionbasedisolation_named_info_send_yields_race, none,
992- " sending %1%0 to %2 callee risks causing data races between %2 and local %3 uses" ,
993- (Identifier, StringRef, ActorIsolation, ActorIsolation ))
993+ " sending %select{%2 |}0%1 to %3 callee risks causing data races between %3 and local %4 uses" ,
994+ (bool , Identifier, StringRef, StringRef, StringRef ))
994995NOTE(regionbasedisolation_named_info_send_yields_race_callee, none,
995- " sending %1%0 to %2 % 3 %4 risks causing data races between %2 and local %5 uses" ,
996- (Identifier, StringRef, ActorIsolation, DescriptiveDeclKind, DeclName, ActorIsolation ))
996+ " sending %select{%2 |}0%1 to %3 %kind4 risks causing data races between %3 and local %5 uses" ,
997+ (bool , Identifier, StringRef, StringRef, const ValueDecl *, StringRef ))
997998
998999// Use after send closure.
9991000NOTE(regionbasedisolation_type_isolated_capture_yields_race, none,
10001001 " sending value of non-Sendable type %0 to %1 closure due to closure capture risks causing races in between %1 and %2 uses" ,
1001- (Type, ActorIsolation, ActorIsolation ))
1002+ (Type, StringRef, StringRef ))
10021003
10031004// Value captured in async let and reused.
10041005NOTE(regionbasedisolation_named_nonisolated_asynclet_name, none,
@@ -1009,33 +1010,33 @@ NOTE(regionbasedisolation_named_value_used_after_explicit_sending, none,
10091010 " %0 used after being passed as a 'sending' parameter; Later uses could race" ,
10101011 (Identifier))
10111012NOTE(regionbasedisolation_named_isolated_closure_yields_race, none,
1012- " %0 %1 is captured by a %2 closure. %2 uses in closure may race against later %3 uses" ,
1013- (StringRef, Identifier, ActorIsolation, ActorIsolation ))
1013+ " %select{ %1 |}0%2 is captured by a %3 closure. %3 uses in closure may race against later %4 uses" ,
1014+ (bool , StringRef, Identifier, StringRef, StringRef ))
10141015
10151016NOTE(regionbasedisolation_typed_use_after_sending, none,
10161017 " Passing value of non-Sendable type %0 as a 'sending' argument risks causing races in between local and caller code" ,
10171018 (Type))
10181019NOTE(regionbasedisolation_typed_use_after_sending_callee, none,
1019- " Passing value of non-Sendable type %0 as a 'sending' argument to %1 %2 risks causing races in between local and caller code" ,
1020- (Type, DescriptiveDeclKind, DeclName ))
1020+ " Passing value of non-Sendable type %0 as a 'sending' argument to %kind1 risks causing races in between local and caller code" ,
1021+ (Type, const ValueDecl * ))
10211022
10221023// ===
10231024// Sending Never Sendable Emitter
10241025
10251026NOTE(regionbasedisolation_named_send_never_sendable, none,
1026- " sending %1%0 to %2 callee risks causing data races between %2 and %3 uses" ,
1027- (Identifier, StringRef, ActorIsolation , StringRef))
1027+ " sending %select{%2 |}0%1 to %3 callee risks causing data races between %3 and %4 uses" ,
1028+ (bool , Identifier, StringRef, StringRef , StringRef))
10281029NOTE(regionbasedisolation_named_send_never_sendable_callee, none,
1029- " sending %1%0 to %2 % 3 %4 risks causing data races between %2 and %5 uses" ,
1030- (Identifier, StringRef, ActorIsolation, DescriptiveDeclKind, DeclName , StringRef))
1030+ " sending %select{%2 |}0%1 to %3 %kind4 risks causing data races between %3 and %5 uses" ,
1031+ (bool , Identifier, StringRef, StringRef, const ValueDecl * , StringRef))
10311032
10321033NOTE(regionbasedisolation_named_send_into_sending_param, none,
1033- " %0%1 is passed as a 'sending' parameter; Uses in callee may race with "
1034- " later %0uses " ,
1035- (StringRef, Identifier))
1034+ " %select{%1 |}0%2 is passed as a 'sending' parameter; Uses in callee may race with "
1035+ " later %1 uses " ,
1036+ (bool , StringRef, Identifier))
10361037NOTE(regionbasedisolation_named_nosend_send_into_result, none,
1037- " %0 %1 cannot be a 'sending' result. %2 uses may race with caller uses" ,
1038- (StringRef, Identifier, StringRef))
1038+ " %select{ %1 |}0%2 cannot be a 'sending' result. %3 uses may race with caller uses" ,
1039+ (bool , StringRef, Identifier, StringRef))
10391040NOTE(regionbasedisolation_typed_tns_passed_to_sending, none,
10401041 " Passing %0 value of non-Sendable type %1 as a 'sending' parameter risks "
10411042 " causing races inbetween %0 uses and uses reachable from the callee" ,
@@ -1051,8 +1052,8 @@ NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_value_
10511052 " closure captures %0 which is accessible to code in the current task" ,
10521053 (DeclName))
10531054NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_boxed_value_task_isolated, none,
1054- " closure captures reference to mutable %1 %0 which is accessible to code in the current task" ,
1055- (DeclName, DescriptiveDeclKind ))
1055+ " closure captures reference to mutable %kind0 which is accessible to code in the current task" ,
1056+ (const ValueDecl * ))
10561057NOTE(regionbasedisolation_typed_tns_passed_to_sending_closure_helper_have_value_region, none,
10571058 " closure captures %1 which is accessible to %0 code" ,
10581059 (StringRef, DeclName))
@@ -1068,18 +1069,18 @@ NOTE(regionbasedisolation_closure_captures_actor, none,
10681069 (DeclName, StringRef))
10691070
10701071NOTE(regionbasedisolation_typed_tns_passed_to_sending_callee, none,
1071- " Passing %0 value of non-Sendable type %1 as a 'sending' parameter to %2 %3 risks causing races inbetween %0 uses and uses reachable from %3 " ,
1072- (StringRef, Type, DescriptiveDeclKind, DeclName ))
1072+ " Passing %0 value of non-Sendable type %1 as a 'sending' parameter to %kind2 risks causing races inbetween %0 uses and uses reachable from %2 " ,
1073+ (StringRef, Type, const ValueDecl * ))
10731074
10741075NOTE(regionbasedisolation_named_send_nt_asynclet_capture, none,
10751076 " sending %1 %0 into async let risks causing data races between nonisolated and %1 uses" ,
10761077 (Identifier, StringRef))
10771078NOTE(regionbasedisolation_typed_sendneversendable_via_arg, none,
10781079 " sending %0 value of non-Sendable type %1 to %2 callee risks causing races in between %0 and %2 uses" ,
1079- (StringRef, Type, ActorIsolation ))
1080+ (StringRef, Type, StringRef ))
10801081NOTE(regionbasedisolation_typed_sendneversendable_via_arg_callee, none,
1081- " sending %0 value of non-Sendable type %1 to %2 %3 %4 risks causing races in between %0 and %2 uses" ,
1082- (StringRef, Type, ActorIsolation, DescriptiveDeclKind, DeclName ))
1082+ " sending %0 value of non-Sendable type %1 to %2 %kind3 risks causing races in between %0 and %2 uses" ,
1083+ (StringRef, Type, StringRef, const ValueDecl * ))
10831084
10841085NOTE(regionbasedisolation_isolated_conformance_introduced, none,
10851086 " isolated conformance to %kind0 can be introduced here" ,
@@ -1097,10 +1098,10 @@ NOTE(regionbasedisolation_inout_sending_must_be_reinitialized, none,
10971098 " 'inout sending' parameter must be reinitialized before function exit with a non-actor isolated value" ,
10981099 ())
10991100ERROR(regionbasedisolation_inout_sending_cannot_be_actor_isolated, none,
1100- " 'inout sending' parameter %0 cannot be %1at end of function" ,
1101+ " 'inout sending' parameter %0 cannot be %1 at end of function" ,
11011102 (Identifier, StringRef))
11021103NOTE(regionbasedisolation_inout_sending_cannot_be_actor_isolated_note, none,
1103- " %1%0 risks causing races in between %1uses and caller uses since caller assumes value is not actor isolated" ,
1104+ " %1 %0 risks causing races in between %1 uses and caller uses since caller assumes value is not actor isolated" ,
11041105 (Identifier, StringRef))
11051106
11061107// ===
@@ -1125,10 +1126,10 @@ NOTE(regionbasedisolation_out_sending_cannot_be_actor_isolated_note_named, none,
11251126// Example: returning main-actor isolated result to a custom-actor isolated context risks causing data races
11261127ERROR(rbi_isolation_crossing_result, none,
11271128 " non-Sendable %0-typed result can not be returned from %1 %kind2 to %3 context" ,
1128- (Type, ActorIsolation , const ValueDecl *, ActorIsolation ))
1129+ (Type, StringRef , const ValueDecl *, StringRef ))
11291130ERROR(rbi_isolation_crossing_result_no_decl, none,
11301131 " non-Sendable %0-typed result can not be returned from %1 function to %2 context" ,
1131- (Type, ActorIsolation, ActorIsolation ))
1132+ (Type, StringRef, StringRef ))
11321133NOTE(rbi_non_sendable_nominal,none,
11331134 " %kind0 does not conform to the 'Sendable' protocol" ,
11341135 (const ValueDecl *))
0 commit comments