Skip to content

Commit bdad7e9

Browse files
Merge pull request #60947 from AnthonyLatsis/migrate-test-suite-to-gh-issues-20
Gardening: Migrate test suite to GH issues p. 20
2 parents 127ff11 + daaac53 commit bdad7e9

30 files changed

+118
-85
lines changed

test/SIL/Parser/debug_info.sil

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ struct TheStruct {
1111

1212
sil_scope 1 { parent @struct_debug_info_test : $@convention(thin) (TheStruct) -> TheStruct }
1313

14-
// SR-14814: Make sure the `forwarding` directive being optional in the presence
15-
// of debug info directives (i.e. `loc` and `scope`)
14+
// https://github.com/apple/swift/issues/57162
15+
// Make sure of the `forwarding` directive being optional in the presence of
16+
// debug info directives (i.e. `loc` and `scope`).
1617

1718
// CHECK-LABEL: sil [transparent] @struct_debug_info_test :
1819
sil [transparent] @struct_debug_info_test : $@convention(thin) (TheStruct) -> TheStruct {

test/SILGen/accessors.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,20 @@ func test_rec2(_ outer: inout Rec2Outer) -> Int {
133133
// CHECK: sil hidden [ossa] @$s9accessors9test_rec2ySiAA9Rec2OuterVzF : $@convention(thin) (@inout Rec2Outer) -> Int {
134134
// CHECK: function_ref @$s9accessors9Rec2OuterV5innerAA0B5InnerVvau : $@convention(method) (@inout Rec2Outer) -> UnsafeMutablePointer<Rec2Inner>
135135

136-
// SR-12456: Compiler crash on class var override adding observer.
137-
class SR12456Base {
138-
open class var instance: SR12456Base {
136+
// https://github.com/apple/swift/issues/54895
137+
// Compiler crash on 'class var' override adding observer
138+
139+
class OverrideAddingObserver_Base {
140+
open class var instance: OverrideAddingObserver_Base {
139141
get {
140-
return SR12456Base()
142+
return OverrideAddingObserver_Base()
141143
}
142144
set {}
143145
}
144146
}
145147

146-
class SR12456Subclass : SR12456Base {
147-
override class var instance: SR12456Base {
148+
class OverrideAddingObserver_Derived : OverrideAddingObserver_Base {
149+
override class var instance: OverrideAddingObserver_Base {
148150
didSet {}
149151
}
150152
}

test/SILGen/assignment.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ func copyRightToLeft(p: inout P) {
5050
p.left = p.right
5151
}
5252

53-
// SR-5919
53+
// https://github.com/apple/swift/issues/48478
54+
5455
func stupidGames() -> ((), ()) {
5556
return ((), ())
5657
}

test/SILGen/auto_generated_super_init_call.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ class ChildOfParentWithNoDefaultInit : ParentWithNoDefaultInit {
134134
}
135135
}
136136

137-
// <https://bugs.swift.org/browse/SR-5974> - auto-generated super.init()
138-
// delegation to a throwing or failing initializer
137+
// https://github.com/apple/swift/issues/48533
138+
// Auto-generated 'super.init()' delegation to a throwing or failing initializer
139+
139140
class FailingParent {
140141
init?() {}
141142
}

test/SILGen/call_as_function.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ func test_call_as_function<T : C>(_ s: S, _ p1: P1, _ p2: P2, _ t: T) {
2222
// CHECK: switch_enum %{{.+}} : $Optional<Int>
2323
let _: Int = s(0)
2424

25-
// SR-12590: SILGen crash on existential callAsFunction.
25+
// https://github.com/apple/swift/issues/55035
26+
// SILGen crash on existential callAsFunction.
27+
//
2628
// CHECK: witness_method $@opened({{.+}}, any P1) Self, #P1.callAsFunction : <Self where Self : P1> (Self) -> () -> ()
2729
p1()
2830

test/SILGen/capture-transitive.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
2-
// SR-8398
2+
3+
// https://github.com/apple/swift/issues/50924
4+
35
func fibonacci(_ n: Int) -> Int {
46
var cache: [Int: Int] = [:]
57

test/SILGen/capture_order.swift

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ func captureInClosure() {
119119

120120
/// Regression tests
121121

122-
class SR4812 {
122+
// https://github.com/apple/swift/issues/47389
123+
class С_47389 {
123124
public func foo() {
124125
let bar = { [weak self] in
125126
// expected-error@-1 {{closure captures 'bar' before it is declared}}
@@ -134,19 +135,22 @@ class SR4812 {
134135
}
135136
}
136137

137-
func timeout(_ f: @escaping () -> Void) {
138-
f()
139-
}
140-
141-
func sr10687() {
142-
timeout { // expected-error {{closure captures 'x' before it is declared}}
143-
proc()
138+
// https://github.com/apple/swift/issues/53085
139+
do {
140+
func timeout(_ f: @escaping () -> Void) {
141+
f()
144142
}
145-
146-
let x = 0 // expected-note {{captured value declared here}}
147-
148-
func proc() {
149-
_ = x // expected-note {{captured here}}
143+
144+
func f() {
145+
timeout { // expected-error {{closure captures 'x' before it is declared}}
146+
proc()
147+
}
148+
149+
let x = 0 // expected-note {{captured value declared here}}
150+
151+
func proc() {
152+
_ = x // expected-note {{captured here}}
153+
}
150154
}
151155
}
152156

@@ -166,8 +170,9 @@ class rdar40600800 {
166170
}
167171
}
168172

173+
// https://github.com/apple/swift/issues/57097
169174
// Make sure we can't capture an uninitialized 'var' box, either.
170-
func SR14747() {
175+
func f_57097() {
171176
func g() -> Int { // expected-error {{closure captures 'r' before it is declared}}
172177
_ = r // expected-note {{captured here}}
173178
return 5

test/SILGen/default_arguments.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ func testMagicLiterals(file: String = #file,
8484
//
8585
// NEGATIVE-NOT: sil hidden [ossa] @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA2_
8686

87-
// SR-11623
87+
// https://github.com/apple/swift/issues/54034
88+
8889
func genericMagicLiteral<T : ExpressibleByIntegerLiteral>(_ x: T = #column) -> T { x }
8990

9091
// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments23testGenericMagicLiteralyyF
@@ -411,7 +412,8 @@ func genericMagic<T : ExpressibleByStringLiteral>(x: T = #file) -> T {
411412

412413
let _: String = genericMagic()
413414

414-
// SR-11778
415+
// https://github.com/apple/swift/issues/54185
416+
415417
struct CallableWithDefault {
416418
func callAsFunction(x: Int = 4) {}
417419
func callAsFunction(y: Int, z: String = #function) {}

test/SILGen/default_arguments_local.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ class ArtClass<T> {
5858
}
5959
}
6060

61-
// Default arguments of local functions inside @inlinable contexts should be serialized.
62-
// https://bugs.swift.org/browse/SR-12404
61+
// Default arguments of local functions inside '@inlinable' contexts should
62+
// be serialized.
63+
// https://github.com/apple/swift/issues/54842
6364

6465
// CHECK-LABEL: sil [serialized] [ossa] @$s23default_arguments_local5outeryyF : $@convention(thin) () -> () {
6566
@inlinable public func outer() {

test/SILGen/default_constructor.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ struct I {
122122
init<T>(_: T) {}
123123
}
124124

125-
// https://bugs.swift.org/browse/SR-10075
125+
// https://github.com/apple/swift/issues/52477
126+
126127
func defaultValue<T>() -> T {
127128
fatalError()
128129
}

0 commit comments

Comments
 (0)