Skip to content

Commit f3dcbbe

Browse files
committed
[send-non-sendable] Convert a bunch of swift concurrency tests that just used -typecheck to instead emit sil so we can test with send-non-sendable.
1 parent baea392 commit f3dcbbe

19 files changed

+33
-21
lines changed

test/Concurrency/async_tasks.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -strict-concurrency=targeted -disable-availability-checking
1+
// RUN: %target-swift-frontend -strict-concurrency=targeted -disable-availability-checking %s -o /dev/null -verify
2+
23
// REQUIRES: concurrency
34

45
@available(SwiftStdlib 5.1, *)

test/Concurrency/property_initializers_swift6.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 6 -disable-availability-checking -warn-concurrency
2-
// REQUIRES: concurrency
1+
// RUN: %target-swift-frontend -swift-version 6 -disable-availability-checking -warn-concurrency -emit-sil -o /dev/null -verify
32

3+
// REQUIRES: concurrency
44
// REQUIRES: asserts
55

66
@globalActor

test/Concurrency/sendable_associated_type.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -strict-concurrency=complete
1+
// RUN: %target-swift-frontend -strict-concurrency=complete -emit-sil -o /dev/null %s -verify
2+
23
// REQUIRES: concurrency
34

45
class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}}

test/Concurrency/sendable_checking.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -strict-concurrency=targeted
1+
// RUN: %target-swift-frontend -verify -strict-concurrency=targeted -emit-sil -o /dev/null %s
2+
23
// REQUIRES: concurrency
34
// REQUIRES: OS=macosx
45

test/Concurrency/sendable_conformance_checking.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify
2+
23
// REQUIRES: concurrency
34

45
@available(SwiftStdlib 5.1, *)

test/Concurrency/sendable_cycle.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
// RUN: %target-typecheck-verify-swift %S/Inputs/sendable_cycle_other.swift -disable-availability-checking
1+
// RUN: %target-swift-frontend %S/Inputs/sendable_cycle_other.swift -disable-availability-checking %s -verify -emit-sil -o /dev/null
2+
23
// REQUIRES: concurrency
34

45
struct Bar {
5-
lazy var foo = {
6-
self.x()
6+
lazy var foo = { // expected-error {{escaping closure captures mutating 'self' parameter}}
7+
self.x() // expected-note {{captured here}}
78
}
89

910
func x() -> Int { 42 }

test/Concurrency/sendable_existentials.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -strict-concurrency=targeted
1+
// RUN: %target-swift-frontend -strict-concurrency=targeted -emit-sil -o /dev/null %s -verify
2+
23
// REQUIRES: concurrency
34
// REQUIRES: OS=macosx
45

test/Concurrency/sendable_functions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s
2+
23
// REQUIRES: concurrency
34

45

test/Concurrency/sendable_module_checking.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/StrictModule.swiftmodule -module-name StrictModule -warn-concurrency %S/Inputs/StrictModule.swift
33
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/NonStrictModule.swiftmodule -module-name NonStrictModule %S/Inputs/NonStrictModule.swift
4+
5+
// We leave this as just type check since we are checking something that is cross module.
46
// RUN: %target-swift-frontend -typecheck -strict-concurrency=targeted -disable-availability-checking -I %t 2>&1 %s | %FileCheck %s
57

68
// REQUIRES: concurrency

test/Concurrency/sendable_obc_protocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify -parse-as-library
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil %s -verify -parse-as-library -o /dev/null
22

33
// REQUIRES: objc_interop
44
// REQUIRES: concurrency

test/Concurrency/sendable_override_checking.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-swift-frontend -verify -emit-sil -o /dev/null %s
2+
23
// REQUIRES: concurrency
34

45
@available(SwiftStdlib 5.1, *)

test/Concurrency/sendable_preconcurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/StrictModule.swiftmodule -module-name StrictModule -swift-version 6 %S/Inputs/StrictModule.swift
33
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/NonStrictModule.swiftmodule -module-name NonStrictModule %S/Inputs/NonStrictModule.swift
4-
// RUN: %target-typecheck-verify-swift -strict-concurrency=targeted -disable-availability-checking -I %t
4+
// RUN: %target-swift-frontend -strict-concurrency=targeted -disable-availability-checking -I %t %s -o /dev/null -verify -emit-sil
55

66
// REQUIRES: concurrency
77
// REQUIRES: asserts

test/Concurrency/sendable_preconcurrency_unused.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/StrictModule.swiftmodule -module-name StrictModule -warn-concurrency %S/Inputs/StrictModule.swift
33
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/NonStrictModule.swiftmodule -module-name NonStrictModule %S/Inputs/NonStrictModule.swift
4-
// RUN: %target-typecheck-verify-swift -disable-availability-checking -I %t
4+
// RUN: %target-swift-frontend -disable-availability-checking -I %t -verify -emit-sil %s -o /dev/null
55

66
// REQUIRES: concurrency
77

test/Concurrency/sendable_without_preconcurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/StrictModule.swiftmodule -module-name StrictModule -swift-version 6 %S/Inputs/StrictModule.swift
33
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/NonStrictModule.swiftmodule -module-name NonStrictModule %S/Inputs/NonStrictModule.swift
4-
// RUN: %target-typecheck-verify-swift -strict-concurrency=targeted -disable-availability-checking -I %t
4+
// RUN: %target-swift-frontend -strict-concurrency=targeted -disable-availability-checking -I %t -verify %s -o /dev/null -emit-sil
55

66
// REQUIRES: concurrency
77
// REQUIRES: asserts

test/Concurrency/sendable_without_preconcurrency_2.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/StrictModule.swiftmodule -module-name StrictModule -swift-version 6 %S/Inputs/StrictModule.swift
33
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/NonStrictModule.swiftmodule -module-name NonStrictModule %S/Inputs/NonStrictModule.swift
4-
// RUN: %target-typecheck-verify-swift -strict-concurrency=targeted -disable-availability-checking -I %t
4+
// RUN: %target-swift-frontend -strict-concurrency=targeted -disable-availability-checking -I %t %s -verify -emit-sil -o /dev/null
55

66
// REQUIRES: concurrency
77
// REQUIRES: asserts

test/Concurrency/sendable_witness_check_delayed.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-swift-frontend -o /dev/null -emit-sil %s -verify
22

33
// This triggers a conformance check with SuppressDiagnostics=true.
44
let x = S().f {}

test/Concurrency/strict_concurrency_minimal.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// RUN: %target-typecheck-verify-swift -strict-concurrency=minimal
2-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-swift-frontend -strict-concurrency=minimal -o /dev/null -emit-sil %s -verify
2+
// RUN: %target-swift-frontend -o /dev/null -emit-sil %s -verify
3+
34
// REQUIRES: concurrency
45

56
class C1 { }

test/Concurrency/task_local.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-typecheck-verify-swift -disable-availability-checking
2+
23
// REQUIRES: concurrency
34

45
@available(SwiftStdlib 5.1, *)

test/Concurrency/unsafe_inherit_executor_lib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck -verify -disable-availability-checking %s -strict-concurrency=complete
1+
// RUN: %target-swift-frontend -emit-sil -verify -o /dev/null -disable-availability-checking %s -strict-concurrency=complete
22

33
actor A {
44
func g() { }

0 commit comments

Comments
 (0)