@@ -944,39 +944,25 @@ ERROR(regionbasedisolation_unknown_pattern, none,
944
944
" pattern that the region based isolation checker does not understand how to check. Please file a bug" ,
945
945
())
946
946
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
-
974
947
ERROR(regionbasedisolation_named_transfer_yields_race, none,
975
948
" sending %0 risks causing data races" ,
976
949
(Identifier))
977
950
NOTE(regionbasedisolation_type_is_non_sendable, none,
978
951
" %0 is a non-Sendable type" ,
979
952
(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))
980
966
981
967
ERROR(regionbasedisolation_inout_sending_cannot_be_actor_isolated, none,
982
968
" 'inout sending' parameter %0 cannot be %1at end of function" ,
@@ -1028,11 +1014,31 @@ NOTE(regionbasedisolation_named_value_used_after_explicit_sending, none,
1028
1014
NOTE(regionbasedisolation_named_isolated_closure_yields_race, none,
1029
1015
" %0%1 is captured by a %2 closure. %2 uses in closure may race against later %3 uses" ,
1030
1016
(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))
1031
1023
1032
1024
NOTE(regionbasedisolation_named_transfer_nt_asynclet_capture, none,
1033
1025
" sending %1 %0 into async let risks causing data races between nonisolated and %1 uses" ,
1034
1026
(Identifier, StringRef))
1035
1027
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
+
1036
1042
// Misc Error.
1037
1043
ERROR(regionbasedisolation_task_or_actor_isolated_transferred, none,
1038
1044
" task or actor isolated value cannot be sent" , ())
0 commit comments