Skip to content

Commit e347365

Browse files
authored
Merge pull request #72544 from gottesmm/pr-9b9437a095cb67aaf6c9f66f9c77174865b39be3
[region-isolation] Wordsmith "{access,use} here could race".
2 parents bf685b4 + 2f9b519 commit e347365

17 files changed

+321
-321
lines changed

include/swift/AST/DiagnosticsSIL.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ NOTE(sil_referencebinding_inout_binding_here, none,
930930
//===----------------------------------------------------------------------===//
931931

932932
NOTE(regionbasedisolation_maybe_race, none,
933-
"access here could race", ())
933+
"use here could race", ())
934934
ERROR(regionbasedisolation_unknown_pattern, none,
935935
"pattern that the region based isolation checker does not understand how to check. Please file a bug",
936936
())

test/Concurrency/experimental_feature_strictconcurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func iterate(stream: AsyncStream<Int>) async {
3333

3434
// expected-region-isolation-warning @+3 {{transferring 'it' may cause a race}}
3535
// expected-region-isolation-note @+2 {{transferring disconnected 'it' to nonisolated callee could cause races in between callee nonisolated and local main actor-isolated uses}}
36-
// expected-region-isolation-note @+1 {{access here could race}}
36+
// expected-region-isolation-note @+1 {{use here could race}}
3737
while let element = await it.next() {
3838
print(element)
3939
}

test/Concurrency/sendable_checking.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func testNonSendableBaseArg() async {
282282

283283
_ = await t.x
284284
// expected-warning @-1 {{non-sendable type 'NonSendable' passed in implicitly asynchronous call to main actor-isolated property 'x' cannot cross actor boundary}}
285-
// expected-tns-note@-2 {{access here could race}}
285+
// expected-tns-note@-2 {{use here could race}}
286286
}
287287

288288
@available(SwiftStdlib 5.1, *)

test/Concurrency/transfernonsendable.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ bb0:
160160
// expected-warning @-1 {{transferring value of non-Sendable type 'NonSendableKlass' from nonisolated context to global actor '<null>'-isolated context}}
161161
%useIndirect = function_ref @useIndirect : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
162162
apply %useIndirect<NonSendableKlass>(%1) : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
163-
// expected-note @-1 {{access here could race}}
163+
// expected-note @-1 {{use here could race}}
164164

165165
destroy_addr %1 : $*NonSendableKlass
166166
dealloc_stack %1 : $*NonSendableKlass

test/Concurrency/transfernonsendable.swift

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

test/Concurrency/transfernonsendable_asynclet.swift

Lines changed: 60 additions & 60 deletions
Large diffs are not rendered by default.

test/Concurrency/transfernonsendable_cfg.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bb3:
4747
// expected-warning @-1 {{transferring value of non-Sendable type 'NonSendableKlass' from nonisolated context to global actor '<null>'-isolated context; later accesses could race}}
4848
%useKlass = function_ref @useKlass : $@convention(thin) (@guaranteed NonSendableKlass) -> ()
4949
apply %useKlass(%klass) : $@convention(thin) (@guaranteed NonSendableKlass) -> ()
50-
// expected-note @-1 {{access here could race}}
50+
// expected-note @-1 {{use here could race}}
5151
destroy_value %klass : $NonSendableKlass
5252
%9999 = tuple ()
5353
return %9999 : $()

test/Concurrency/transfernonsendable_global_actor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private class NonSendableLinkedListNode<T> { // expected-complete-note 3{{}}
9696
// expected-tns-note @-1 {{transferring disconnected 'x' to nonisolated callee could cause races in between callee nonisolated and local global actor 'GlobalActor'-isolated uses}}
9797
// expected-complete-warning @-2 {{passing argument of non-sendable type 'NonSendableLinkedListNode<Int>' outside of global actor 'GlobalActor'-isolated context may introduce data races}}
9898

99-
useValue(x) // expected-tns-note {{access here could race}}
99+
useValue(x) // expected-tns-note {{use here could race}}
100100
}
101101

102102
private struct StructContainingValue { // expected-complete-note 2{{}}
@@ -112,7 +112,7 @@ private struct StructContainingValue { // expected-complete-note 2{{}}
112112
// expected-tns-note @-1 {{transferring disconnected 'x' to nonisolated callee could cause races in between callee nonisolated and local global actor 'GlobalActor'-isolated uses}}
113113
// expected-complete-warning @-2 {{passing argument of non-sendable type 'StructContainingValue' outside of global actor 'GlobalActor'-isolated context may introduce data races}}
114114

115-
useValue(x) // expected-tns-note {{access here could race}}
115+
useValue(x) // expected-tns-note {{use here could race}}
116116
}
117117

118118
@GlobalActor func useGlobalActor7() async {
@@ -135,7 +135,7 @@ private struct StructContainingValue { // expected-complete-note 2{{}}
135135
// expected-complete-warning @-2 {{passing argument of non-sendable type '(NonSendableLinkedList<Int>, NonSendableLinkedList<Int>)' outside of global actor 'GlobalActor'-isolated context may introduce data races}}
136136
// expected-complete-warning @-3 {{passing argument of non-sendable type '(NonSendableLinkedList<Int>, NonSendableLinkedList<Int>)' outside of global actor 'GlobalActor'-isolated context may introduce data races}}
137137

138-
useValue(x) // expected-tns-note {{access here could race}}
138+
useValue(x) // expected-tns-note {{use here could race}}
139139
}
140140

141141
@GlobalActor func useGlobalActor9() async {

0 commit comments

Comments
 (0)