@@ -944,39 +944,25 @@ ERROR(regionbasedisolation_unknown_pattern, none,
944944 " pattern that the region based isolation checker does not understand how to check. Please file a bug" ,
945945 ())
946946
947- // ===---
948- // Old Transfer Non Sendable Diagnostics
949- //
950-
951- ERROR(regionbasedisolation_transfer_yields_race_no_isolation, none,
952- " sending value of non-Sendable type %0 with later accesses risks causing data races" ,
953- (Type))
954- ERROR(regionbasedisolation_transfer_yields_race_with_isolation, none,
955- " sending value of non-Sendable type %0 with later accesses from %1 context to %2 context risks causing data races" ,
956- (Type, ActorIsolation, ActorIsolation))
957- ERROR(regionbasedisolation_isolated_capture_yields_race, none,
958- " %1 closure captures value of non-Sendable type %0 from %2 context; later accesses to value could race" ,
959- (Type, ActorIsolation, ActorIsolation))
960- ERROR(regionbasedisolation_transfer_yields_race_stronglytransferred_binding, none,
961- " value of non-Sendable type %0 accessed after being transferred; later accesses could race" ,
962- (Type))
963- ERROR(regionbasedisolation_arg_transferred, none,
964- " sending %0 value of type %1 with later accesses to %2 context risks causing data races" ,
965- (StringRef, Type, ActorIsolation))
966- ERROR(regionbasedisolation_arg_passed_to_strongly_transferred_param, none,
967- " %0 value of type %1 passed as a strongly transferred parameter; later accesses could race" ,
968- (StringRef, Type))
969-
970- // ===---
971- // New Transfer Non Sendable Diagnostics
972- //
973-
974947ERROR(regionbasedisolation_named_transfer_yields_race, none,
975948 " sending %0 risks causing data races" ,
976949 (Identifier))
977950NOTE(regionbasedisolation_type_is_non_sendable, none,
978951 " %0 is a non-Sendable type" ,
979952 (Type))
953+ ERROR(regionbasedisolation_type_transfer_yields_race, none,
954+ " sending value of non-Sendable type %0 risks causing data races" ,
955+ (Type))
956+
957+ NOTE(regionbasedisolation_type_use_after_transfer, none,
958+ " sending value of non-Sendable type %0 to %1 callee risks causing data races between %1 and local %2 uses" ,
959+ (Type, ActorIsolation, ActorIsolation))
960+ NOTE(regionbasedisolation_type_use_after_transfer_callee, none,
961+ " sending value of non-Sendable type %0 to %1 %2 %3 risks causing data races between %1 and local %4 uses" ,
962+ (Type, ActorIsolation, DescriptiveDeclKind, DeclName, ActorIsolation))
963+ NOTE(regionbasedisolation_type_isolated_capture_yields_race, none,
964+ " sending value of non-Sendable type %0 to %1 closure due to closure capture risks causing races in between %1 and %2 uses" ,
965+ (Type, ActorIsolation, ActorIsolation))
980966
981967ERROR(regionbasedisolation_inout_sending_cannot_be_actor_isolated, none,
982968 " 'inout sending' parameter %0 cannot be %1at end of function" ,
@@ -1028,11 +1014,31 @@ NOTE(regionbasedisolation_named_value_used_after_explicit_sending, none,
10281014NOTE(regionbasedisolation_named_isolated_closure_yields_race, none,
10291015 " %0%1 is captured by a %2 closure. %2 uses in closure may race against later %3 uses" ,
10301016 (StringRef, Identifier, ActorIsolation, ActorIsolation))
1017+ NOTE(regionbasedisolation_typed_tns_passed_to_sending, none,
1018+ " Passing %0 value of non-Sendable type %1 as a 'sending' parameter risks causing races inbetween %0 uses and uses reachable from the callee" ,
1019+ (StringRef, Type))
1020+ NOTE(regionbasedisolation_typed_tns_passed_to_sending_callee, none,
1021+ " 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" ,
1022+ (StringRef, Type, DescriptiveDeclKind, DeclName))
10311023
10321024NOTE(regionbasedisolation_named_transfer_nt_asynclet_capture, none,
10331025 " sending %1 %0 into async let risks causing data races between nonisolated and %1 uses" ,
10341026 (Identifier, StringRef))
10351027
1028+ NOTE(regionbasedisolation_typed_use_after_sending, none,
1029+ " Passing value of non-Sendable type %0 as a 'sending' argument risks causing races in between local and caller code" ,
1030+ (Type))
1031+ NOTE(regionbasedisolation_typed_use_after_sending_callee, none,
1032+ " Passing value of non-Sendable type %0 as a 'sending' argument to %1 %2 risks causing races in between local and caller code" ,
1033+ (Type, DescriptiveDeclKind, DeclName))
1034+
1035+ NOTE(regionbasedisolation_typed_transferneversendable_via_arg, none,
1036+ " sending %0 value of non-Sendable type %1 to %2 callee risks causing races in between %0 and %2 uses" ,
1037+ (StringRef, Type, ActorIsolation))
1038+ NOTE(regionbasedisolation_typed_transferneversendable_via_arg_callee, none,
1039+ " sending %0 value of non-Sendable type %1 to %2 %3 %4 risks causing races in between %0 and %2 uses" ,
1040+ (StringRef, Type, ActorIsolation, DescriptiveDeclKind, DeclName))
1041+
10361042// Misc Error.
10371043ERROR(regionbasedisolation_task_or_actor_isolated_transferred, none,
10381044 " task or actor isolated value cannot be sent" , ())
0 commit comments