@@ -998,23 +998,23 @@ GROUPED_ERROR(regionbasedisolation_type_send_yields_race, SendingRisksDataRace,
998
998
(Type))
999
999
NOTE(regionbasedisolation_type_use_after_send, none,
1000
1000
" sending value of non-Sendable type %0 to %1 callee risks causing data races between %1 and local %2 uses" ,
1001
- (Type, ActorIsolation, ActorIsolation ))
1001
+ (Type, StringRef, StringRef ))
1002
1002
NOTE(regionbasedisolation_type_use_after_send_callee, none,
1003
1003
" sending value of non-Sendable type %0 to %1 %kind2 risks causing data "
1004
1004
" races between %1 and local %3 uses" ,
1005
- (Type, ActorIsolation , const ValueDecl *, ActorIsolation ))
1005
+ (Type, StringRef , const ValueDecl *, StringRef ))
1006
1006
1007
1007
NOTE(regionbasedisolation_named_info_send_yields_race, none,
1008
- " sending %1%0 to %2 callee risks causing data races between %2 and local %3 uses" ,
1009
- (Identifier, StringRef, ActorIsolation, ActorIsolation ))
1008
+ " sending %select{%2 |}0%1 to %3 callee risks causing data races between %3 and local %4 uses" ,
1009
+ (bool , Identifier, StringRef, StringRef, StringRef ))
1010
1010
NOTE(regionbasedisolation_named_info_send_yields_race_callee, none,
1011
- " sending %1%0 to %2 %kind3 risks causing data races between %2 and local %4 uses" ,
1012
- (Identifier, StringRef, ActorIsolation , const ValueDecl *, ActorIsolation ))
1011
+ " sending %select{%2 |}0%1 to %3 %kind4 risks causing data races between %3 and local %5 uses" ,
1012
+ (bool , Identifier, StringRef, StringRef , const ValueDecl *, StringRef ))
1013
1013
1014
1014
// Use after send closure.
1015
1015
NOTE(regionbasedisolation_type_isolated_capture_yields_race, none,
1016
1016
" sending value of non-Sendable type %0 to %1 closure due to closure capture risks causing races in between %1 and %2 uses" ,
1017
- (Type, ActorIsolation, ActorIsolation ))
1017
+ (Type, StringRef, StringRef ))
1018
1018
1019
1019
// Value captured in async let and reused.
1020
1020
NOTE(regionbasedisolation_named_nonisolated_asynclet_name, none,
@@ -1025,8 +1025,8 @@ NOTE(regionbasedisolation_named_value_used_after_explicit_sending, none,
1025
1025
" %0 used after being passed as a 'sending' parameter; Later uses could race" ,
1026
1026
(Identifier))
1027
1027
NOTE(regionbasedisolation_named_isolated_closure_yields_race, none,
1028
- " %0 %1 is captured by a %2 closure. %2 uses in closure may race against later %3 uses" ,
1029
- (StringRef, Identifier, ActorIsolation, ActorIsolation ))
1028
+ " %select{ %1 |}0%2 is captured by a %3 closure. %3 uses in closure may race against later %4 uses" ,
1029
+ (bool , StringRef, Identifier, StringRef, StringRef ))
1030
1030
1031
1031
NOTE(regionbasedisolation_typed_use_after_sending, none,
1032
1032
" Passing value of non-Sendable type %0 as a 'sending' argument risks causing races in between local and caller code" ,
@@ -1039,19 +1039,19 @@ NOTE(regionbasedisolation_typed_use_after_sending_callee, none,
1039
1039
// Sending Never Sendable Emitter
1040
1040
1041
1041
NOTE(regionbasedisolation_named_send_never_sendable, none,
1042
- " sending %1%0 to %2 callee risks causing data races between %2 and %3 uses" ,
1043
- (Identifier, StringRef, ActorIsolation , StringRef))
1042
+ " sending %select{%2 |}0%1 to %3 callee risks causing data races between %3 and %4 uses" ,
1043
+ (bool , Identifier, StringRef, StringRef , StringRef))
1044
1044
NOTE(regionbasedisolation_named_send_never_sendable_callee, none,
1045
- " sending %1%0 to %2 %kind3 risks causing data races between %2 and %4 uses" ,
1046
- (Identifier, StringRef, ActorIsolation , const ValueDecl *, StringRef))
1045
+ " sending %select{%2 |}0%1 to %3 %kind4 risks causing data races between %3 and %5 uses" ,
1046
+ (bool , Identifier, StringRef, StringRef , const ValueDecl *, StringRef))
1047
1047
1048
1048
NOTE(regionbasedisolation_named_send_into_sending_param, none,
1049
- " %0%1 is passed as a 'sending' parameter; Uses in callee may race with "
1050
- " later %0uses " ,
1051
- (StringRef, Identifier))
1049
+ " %select{%1 |}0%2 is passed as a 'sending' parameter; Uses in callee may race with "
1050
+ " later %1 uses " ,
1051
+ (bool , StringRef, Identifier))
1052
1052
NOTE(regionbasedisolation_named_nosend_send_into_result, none,
1053
- " %0 %1 cannot be a 'sending' result. %2 uses may race with caller uses" ,
1054
- (StringRef, Identifier, StringRef))
1053
+ " %select{ %1 |}0%2 cannot be a 'sending' result. %3 uses may race with caller uses" ,
1054
+ (bool , StringRef, Identifier, StringRef))
1055
1055
NOTE(regionbasedisolation_typed_tns_passed_to_sending, none,
1056
1056
" Passing %0 value of non-Sendable type %1 as a 'sending' parameter risks "
1057
1057
" causing races inbetween %0 uses and uses reachable from the callee" ,
@@ -1092,10 +1092,10 @@ NOTE(regionbasedisolation_named_send_nt_asynclet_capture, none,
1092
1092
(Identifier, StringRef))
1093
1093
NOTE(regionbasedisolation_typed_sendneversendable_via_arg, none,
1094
1094
" sending %0 value of non-Sendable type %1 to %2 callee risks causing races in between %0 and %2 uses" ,
1095
- (StringRef, Type, ActorIsolation ))
1095
+ (StringRef, Type, StringRef ))
1096
1096
NOTE(regionbasedisolation_typed_sendneversendable_via_arg_callee, none,
1097
1097
" sending %0 value of non-Sendable type %1 to %2 %kind3 risks causing races in between %0 and %2 uses" ,
1098
- (StringRef, Type, ActorIsolation , const ValueDecl *))
1098
+ (StringRef, Type, StringRef , const ValueDecl *))
1099
1099
1100
1100
// Error that is only used when the send non sendable emitter cannot discover any
1101
1101
// information to give a better diagnostic.
@@ -1109,10 +1109,10 @@ NOTE(regionbasedisolation_inout_sending_must_be_reinitialized, none,
1109
1109
" 'inout sending' parameter must be reinitialized before function exit with a non-actor-isolated value" ,
1110
1110
())
1111
1111
ERROR(regionbasedisolation_inout_sending_cannot_be_actor_isolated, none,
1112
- " 'inout sending' parameter %0 cannot be %1at end of function" ,
1112
+ " 'inout sending' parameter %0 cannot be %1 at end of function" ,
1113
1113
(Identifier, StringRef))
1114
1114
NOTE(regionbasedisolation_inout_sending_cannot_be_actor_isolated_note, none,
1115
- " %1%0 risks causing races in between %1uses and caller uses since caller assumes value is not actor isolated" ,
1115
+ " %1 %0 risks causing races in between %1 uses and caller uses since caller assumes value is not actor isolated" ,
1116
1116
(Identifier, StringRef))
1117
1117
1118
1118
// ===
@@ -1137,10 +1137,10 @@ NOTE(regionbasedisolation_out_sending_cannot_be_actor_isolated_note_named, none,
1137
1137
// Example: returning main-actor isolated result to a custom-actor isolated context risks causing data races
1138
1138
ERROR(rbi_isolation_crossing_result, none,
1139
1139
" non-Sendable %0-typed result can not be returned from %1 %kind2 to %3 context" ,
1140
- (Type, ActorIsolation , const ValueDecl *, ActorIsolation ))
1140
+ (Type, StringRef , const ValueDecl *, StringRef ))
1141
1141
ERROR(rbi_isolation_crossing_result_no_decl, none,
1142
1142
" non-Sendable %0-typed result can not be returned from %1 function to %2 context" ,
1143
- (Type, ActorIsolation, ActorIsolation ))
1143
+ (Type, StringRef, StringRef ))
1144
1144
NOTE(rbi_non_sendable_nominal,none,
1145
1145
" %kind0 does not conform to the 'Sendable' protocol" ,
1146
1146
(const ValueDecl *))
0 commit comments