You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[sending] Change transferring diagnostics to say sending instead of transferring.
Just trying to slice off a larger change where I change these tests to actually
use 'sending'. This is nice to do now since it is algebraic to do.
rdar://128216574
// expected-swift-5-warning @-2 {{sending 'x' risks causing data races}}
66
-
// expected-swift-5-note @-3 {{'x' used after being passed as a transferring parameter; Later uses could race}}
66
+
// expected-swift-5-note @-3 {{'x' used after being passed as a 'sending' parameter; Later uses could race}}
67
67
// expected-swift-6-warning @-4 {{sending 'x' risks causing data races}}
68
-
// expected-swift-6-note @-5 {{'x' used after being passed as a transferring parameter; Later uses could race}}
68
+
// expected-swift-6-note @-5 {{'x' used after being passed as a 'sending' parameter; Later uses could race}}
69
69
useValue(x)
70
70
// expected-swift-5-note @-1 {{access can happen concurrently}}
71
71
// expected-swift-6-note @-2 {{access can happen concurrently}}
@@ -77,8 +77,8 @@ func testNormal() async {
77
77
transferArg(x) // expected-swift-5-no-tns-warning {{passing argument of non-sendable type 'PostCUncheckedNonSendableKlass' (aka 'NonSendableKlass') into main actor-isolated context may introduce data races}}
78
78
// expected-swift-5-warning @-1 {{sending 'x' risks causing data races}}
79
79
// expected-swift-6-error @-2 {{sending 'x' risks causing data races}}
80
-
// expected-swift-5-note @-3 {{'x' used after being passed as a transferring parameter; Later uses could race}}
81
-
// expected-swift-6-note @-4 {{'x' used after being passed as a transferring parameter; Later uses could race}}
80
+
// expected-swift-5-note @-3 {{'x' used after being passed as a 'sending' parameter; Later uses could race}}
81
+
// expected-swift-6-note @-4 {{'x' used after being passed as a 'sending' parameter; Later uses could race}}
82
82
useValue(x) // expected-swift-5-note {{access can happen concurrently}}
83
83
// expected-swift-6-note @-1 {{access can happen concurrently}}
// expected-swift-5-no-tns-warning @-1 2{{passing argument of non-sendable type '(PreCUncheckedNonSendableKlass, PreCUncheckedNonSendableKlass)' (aka '(NonSendableKlass, NonSendableKlass)') into main actor-isolated context may introduce data races}}
93
93
// expected-swift-5-warning @-2 {{sending 'y' risks causing data races}}
94
-
// expected-swift-5-note @-3 {{'y' used after being passed as a transferring parameter; Later uses could race}}
94
+
// expected-swift-5-note @-3 {{'y' used after being passed as a 'sending' parameter; Later uses could race}}
95
95
// expected-swift-6-error @-4 {{sending 'y' risks causing data races}}
96
-
// expected-swift-6-note @-5 {{'y' used after being passed as a transferring parameter; Later uses could race}}
96
+
// expected-swift-6-note @-5 {{'y' used after being passed as a 'sending' parameter; Later uses could race}}
97
97
useValue(x)
98
98
// expected-swift-5-note @-1 {{access can happen concurrently}}
99
99
// expected-swift-6-note @-2 {{access can happen concurrently}}
transferArg(x) // expected-swift-5-no-tns-warning {{passing argument of non-sendable type 'PreCUncheckedExplicitlyNonSendableKlass' (aka 'ExplicitlyNonSendableKlass') into main actor-isolated context may introduce data races}}
120
120
// expected-swift-5-warning @-1 {{sending 'x' risks causing data races}}
121
-
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
121
+
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
122
122
// expected-swift-6-warning @-3 {{sending 'x' risks causing data races}}
123
-
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
123
+
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
transferArg(x) // expected-swift-5-no-tns-warning {{passing argument of non-sendable type 'PostCUncheckedNonSendableKlass' (aka 'NonSendableKlass') into main actor-isolated context may introduce data races}}
128
128
// expected-swift-5-warning @-1 {{sending 'x' risks causing data races}}
129
-
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
129
+
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
130
130
// expected-swift-6-error @-3 {{sending 'x' risks causing data races}}
131
-
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
131
+
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
transferArg(x) // expected-swift-5-no-tns-warning 2{{passing argument of non-sendable type '(PreCUncheckedNonSendableKlass, PreCUncheckedNonSendableKlass)' (aka '(NonSendableKlass, NonSendableKlass)') into main actor-isolated context may introduce data races}}
137
137
// expected-swift-5-warning @-1 {{sending 'x' risks causing data races}}
138
-
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
138
+
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
139
139
// expected-swift-6-error @-3 {{sending 'x' risks causing data races}}
140
-
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
140
+
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
transferArg(x) // expected-swift-5-no-tns-warning {{passing argument of non-sendable type '(PreCUncheckedExplicitlyNonSendableKlass, PreCUncheckedExplicitlyNonSendableKlass)' (aka '(ExplicitlyNonSendableKlass, ExplicitlyNonSendableKlass)') into main actor-isolated context may introduce data races}}
146
146
// expected-swift-5-warning @-1 {{sending 'x' risks causing data races}}
147
-
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
147
+
// expected-swift-5-note @-2 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
148
148
// expected-swift-6-error @-3 {{sending 'x' risks causing data races}}
149
-
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a transferring parameter; Uses in callee may race with later task-isolated uses}}
149
+
// expected-swift-6-note @-4 {{task-isolated 'x' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses}}
0 commit comments