Skip to content

Commit 9eb5d7f

Browse files
committed
Update tests that were added before I finished this.
1 parent e7e035f commit 9eb5d7f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

test/Concurrency/transfernonsendable_instruction_matching.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ bb0:
675675
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %transferRawPointer(%rawPointer) : $@convention(thin) @async (Builtin.RawPointer) -> ()
676676
// expected-warning @-1 {{}}
677677
// expected-note @-2 {{}}
678+
// expected-note @-3 {{}}
678679

679680
fix_lifetime %rawPointer : $Builtin.RawPointer
680681
// expected-note @-1 {{access can happen concurrently}}
@@ -754,6 +755,7 @@ bb0:
754755
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %transferRawPointer(%rawPointer) : $@convention(thin) @async (Builtin.RawPointer) -> ()
755756
// expected-warning @-1 {{}}
756757
// expected-note @-2 {{}}
758+
// expected-note @-3 {{}}
757759

758760
fix_lifetime %rawPointer : $Builtin.RawPointer
759761
// expected-note @-1 {{access can happen concurrently}}
@@ -836,6 +838,7 @@ bb0:
836838
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %transferRawPointer(%rawPointer) : $@convention(thin) @async (Builtin.RawPointer) -> ()
837839
// expected-warning @-1 {{}}
838840
// expected-note @-2 {{}}
841+
// expected-note @-3 {{}}
839842

840843
fix_lifetime %rawPointer : $Builtin.RawPointer
841844
// expected-note @-1 {{access can happen concurrently}}

test/Concurrency/transfernonsendable_typed_errors.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -swift-version 6 -Xllvm -sil-regionbasedisolation-force-use-of-typed-errors -emit-sil -o /dev/null %s -verify
1+
// RUN: %target-swift-frontend -swift-version 6 -Xllvm -sil-regionbasedisolation-force-use-of-typed-errors -emit-sil -o /dev/null %s -verify -disable-availability-checking
22

33
// REQUIRES: concurrency
44
// REQUIRES: asserts
@@ -45,7 +45,7 @@ func isolatedClosureTest() async {
4545
func sendingError() async {
4646
let x = NonSendableKlass()
4747
transferToSendingParam(x) // expected-error {{sending value of non-Sendable type 'NonSendableKlass' risks causing data races}}
48-
// expected-note @-1 {{Passing value of non-Sendable type 'NonSendableKlass' as a 'sending' argument to global function 'transferToSendingParam' risks causing races in between local and callee code}}
48+
// expected-note @-1 {{Passing value of non-Sendable type 'NonSendableKlass' as a 'sending' argument to global function 'transferToSendingParam' risks causing races in between local and caller code}}
4949
print(x) // expected-note {{access can happen concurrently}}
5050
}
5151

test/sil-opt/swift-version.sil

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ bb0(%0 : @guaranteed $NonSendableKlass):
2222
%1 = function_ref @transfer_to_main : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
2323
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %1(%0) : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
2424
// expected-complete-warning @-1 {{}}
25-
// expected-tns-error @-2 {{}}
25+
// expected-complete-note @-2 {{}}
26+
// expected-tns-error @-3 {{}}
27+
// expected-tns-note @-4 {{}}
2628
%9999 = tuple ()
2729
return %9999 : $()
2830
}

0 commit comments

Comments
 (0)