Skip to content

Commit 08588b9

Browse files
committed
Gardening: Migrate test suite to GH issues: SILGen (2/2)
1 parent 04f1cde commit 08588b9

15 files changed

+68
-45
lines changed

test/SILGen/magic_identifier_file.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
// Test in "Swift 6" mode:
2222
// RUN: %target-swift-emit-silgen -I %t -enable-experimental-concise-pound-file -module-name Foo %/s | %FileCheck --check-prefixes=BOTH,CONCISE %s
2323

24-
// TODO: Update RUN lines currently using -enable-experimental-concise-pound-file to use -swift-version <whatever> instead. (SR-13199)
24+
// TODO: Update RUN lines currently using
25+
// -enable-experimental-concise-pound-file to use -swift-version <whatever>
26+
// instead (https://github.com/apple/swift/issues/55639).
2527

2628
import MagicIdentifierFileSwift5
2729
import MagicIdentifierFileSwift6

test/SILGen/mangling_retroactive.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ extension ExternalGeneric: Error where Argument: Error { }
9393
func useRequiresError(_: RequiresError<ExternalGeneric<Error>>) {}
9494
// CHECK: sil hidden [ossa] @$s20mangling_retroactive16useRequiresErroryyAA0dE0Vy12RetroactiveB15ExternalGenericVys0E0_pGAIsAhAsAH_psAHHPyHC_HCg_GF
9595

96-
// SR-10926
96+
// https://github.com/apple/swift/issues/53317
9797
protocol OurBaseProtocol: P {
9898
associatedtype Assoc: P
9999
}

test/SILGen/objc_attr_NSManaged.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ func testFinal(_ obj: FinalGizmo) -> String {
8080
return obj.y
8181
}
8282

83-
// SR-2673: @NSManaged property can't satisfy protocol requirement
83+
// https://github.com/apple/swift/issues/45278
84+
// '@NSManaged' property can't satisfy protocol requirement
85+
8486
@objc protocol ObjCProto {
8587
var managedProp: String { get set }
8688
var managedExtProp: AnyObject { get }
@@ -94,7 +96,9 @@ extension ProtoAdopter {
9496
}
9597

9698

97-
// SR-6534: @NSManaged properties can be 'final'
99+
// https://github.com/apple/swift/issues/49084
100+
// '@NSManaged' properties can be 'final'
101+
98102
protocol EntityIDProto {
99103
var entityID: String { get set }
100104
}

test/SILGen/objc_error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func eraseFictionalServerError() -> Error {
135135
}
136136
// CHECK: } // end sil function '$s10objc_error25eraseFictionalServerErrors0F0_pyF'
137137

138-
// SR-1562
138+
// https://github.com/apple/swift/issues/44171
139139
extension Error {
140140
// CHECK-LABEL: sil hidden [ossa] @$ss5ErrorP10objc_errorE16convertToNSErrorSo0F0CyF
141141
// CHECK: bb0([[SELF:%[0-9]+]] : $*Self)

test/SILGen/objc_extensions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ extension SubSub {
171171
}
172172
}
173173

174-
// SR-1025
174+
// https://github.com/apple/swift/issues/43637
175+
175176
extension Base {
176177
fileprivate static var x = 1
177178
}

test/SILGen/objc_init_iuo_override.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// SR-8789
2-
31
// RUN: %target-swift-emit-silgen -verify -import-objc-header %S/Inputs/objc_init_iuo_override.h %s
42
// REQUIRES: objc_interop
53

4+
// https://github.com/apple/swift/issues/51297
5+
66
class ChildClass: ParentClass {}
77

88
class GrandchildClass: ChildClass {

test/SILGen/objc_properties.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ class NonObjCBaseClass : NSObject {
226226
// CHECK-LABEL: sil private [thunk] [ossa] @$s15objc_properties12ObjCSubclassC8propertySivsTo
227227

228228
// Make sure lazy properties that witness @objc protocol requirements are
229-
// correctly formed
229+
// correctly formed.
230230
//
231-
// <https://bugs.swift.org/browse/SR-1825>
231+
// https://github.com/apple/swift/issues/44434
232232

233233
@objc protocol HasProperty {
234234
@objc var window: NSObject? { get set }

test/SILGen/property_wrappers.swift

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,9 @@ public class Container {
728728
}
729729
}
730730

731-
// SR-11303 / rdar://problem/54311335 - crash due to wrong archetype used in generated SIL
731+
// rdar://problem/54311335
732+
// https://github.com/apple/swift/issues/53704
733+
// Crash due to wrong archetype used in generated SIL
732734
public protocol TestProtocol {}
733735
public class TestClass<T> {
734736
@WrapperWithInitialValue var value: T
@@ -801,7 +803,9 @@ extension UsesMyPublished {
801803
}
802804
}
803805

804-
// SR-11603 - crash due to incorrect lvalue computation
806+
// https://github.com/apple/swift/issues/54010
807+
// Crash due to incorrect lvalue computation
808+
805809
@propertyWrapper
806810
struct StructWrapper<T> {
807811
var wrappedValue: T
@@ -815,7 +819,7 @@ class ClassWrapper<T> {
815819
}
816820
}
817821

818-
struct SR_11603 {
822+
struct S_54010 {
819823
@StructWrapper @ClassWrapper var prop: Int
820824

821825
func foo() {
@@ -908,7 +912,9 @@ struct NonMutatingWrapperTestStruct {
908912
}
909913

910914

911-
// SR-12443: Crash on property with wrapper override that adds observer.
915+
// https://github.com/apple/swift/issues/54882
916+
// Crash on property with wrapper override that adds observer.
917+
912918
@propertyWrapper
913919
struct BasicIntWrapper {
914920
var wrappedValue: Int
@@ -957,31 +963,33 @@ struct TestAutoclosureComposition {
957963
@Once @ObservedObject var model = Model()
958964
}
959965

966+
// https://github.com/apple/swift/issues/58201
967+
960968
@propertyWrapper
961-
struct SR_15940Foo {
969+
struct BasicComputedIntWrapper {
962970
var wrappedValue: Int { 0 }
963971
}
964972

965-
struct SR_15940_C {
973+
struct S_58201 {
966974
func a() {
967-
@SR_15940Foo var b: Int
975+
@BasicComputedIntWrapper var b: Int
968976
}
969977
}
970978

971-
// CHECK-LABEL: sil hidden [ossa] @$s17property_wrappers10SR_15940_CV1ayyF : $@convention(method) (SR_15940_C) -> () {
972-
// CHECK: bb0(%0 : $SR_15940_C):
973-
// CHECK-NEXT: debug_value %0 : $SR_15940_C, let, name "self", argno 1, implicit
974-
// CHECK-NEXT: [[BOX:%.*]] = alloc_box ${ var SR_15940Foo }, var, name "_b"
975-
// CHECK-NEXT: [[BOXADDR:%.*]] = project_box [[BOX]] : ${ var SR_15940Foo }, 0
976-
// CHECK-NEXT: [[METATYPE:%.*]] = metatype $@thin SR_15940Foo.Type
977-
// CHECK-NEXT: // function_ref SR_15940Foo.init()
978-
// CHECK-NEXT: [[DEFAULTVALUE_FN:%.*]] = function_ref @$s17property_wrappers11SR_15940FooVACycfC : $@convention(method) (@thin SR_15940Foo.Type) -> SR_15940Foo
979-
// CHECK-NEXT: [[DEFAULTRESULT:%.*]] = apply [[DEFAULTVALUE_FN]]([[METATYPE]]) : $@convention(method) (@thin SR_15940Foo.Type) -> SR_15940Foo
980-
// CHECK-NEXT: store [[DEFAULTRESULT]] to [trivial] [[BOXADDR]] : $*SR_15940Foo
981-
// CHECK-NEXT: destroy_value [[BOX]] : ${ var SR_15940Foo }
979+
// CHECK-LABEL: sil hidden [ossa] @$s17property_wrappers7S_58201V1ayyF : $@convention(method) (S_58201) -> () {
980+
// CHECK: bb0(%0 : $S_58201):
981+
// CHECK-NEXT: debug_value %0 : $S_58201, let, name "self", argno 1, implicit
982+
// CHECK-NEXT: [[BOX:%.*]] = alloc_box ${ var BasicComputedIntWrapper }, var, name "_b"
983+
// CHECK-NEXT: [[BOXADDR:%.*]] = project_box [[BOX]] : ${ var BasicComputedIntWrapper }, 0
984+
// CHECK-NEXT: [[METATYPE:%.*]] = metatype $@thin BasicComputedIntWrapper.Type
985+
// CHECK-NEXT: // function_ref BasicComputedIntWrapper.init()
986+
// CHECK-NEXT: [[DEFAULTVALUE_FN:%.*]] = function_ref @$s17property_wrappers23BasicComputedIntWrapperVACycfC : $@convention(method) (@thin BasicComputedIntWrapper.Type) -> BasicComputedIntWrapper
987+
// CHECK-NEXT: [[DEFAULTRESULT:%.*]] = apply [[DEFAULTVALUE_FN]]([[METATYPE]]) : $@convention(method) (@thin BasicComputedIntWrapper.Type) -> BasicComputedIntWrapper
988+
// CHECK-NEXT: store [[DEFAULTRESULT]] to [trivial] [[BOXADDR]] : $*BasicComputedIntWrapper
989+
// CHECK-NEXT: destroy_value [[BOX]] : ${ var BasicComputedIntWrapper }
982990
// CHECK-NEXT: [[TUPLE:%.*]] = tuple ()
983991
// CHECK-NEXT: return [[TUPLE]] : $()
984-
// CHECK-NEXT: } // end sil function '$s17property_wrappers10SR_15940_CV1ayyF
992+
// CHECK-NEXT: } // end sil function '$s17property_wrappers7S_58201V1ayyF'
985993

986994
// CHECK-LABEL: sil_vtable ClassUsingWrapper {
987995
// CHECK-NEXT: #ClassUsingWrapper.x!getter: (ClassUsingWrapper) -> () -> Int : @$s17property_wrappers17ClassUsingWrapperC1xSivg // ClassUsingWrapper.x.getter

test/SILGen/protocols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public func test(_ p: Proto) {
429429
// CHECK: end_apply [[TOKEN]]
430430
// CHECK: return
431431

432-
// SR-11748
432+
// https://github.com/apple/swift/issues/54155
433433

434434
protocol SelfReturningSubscript {
435435
subscript(b: Int) -> Self { get }

test/SILGen/reabstract-tuple.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// RUN: %target-swift-emit-silgen -verify %s | %FileCheck %s
33

4-
// SR-3090:
4+
// https://github.com/apple/swift/issues/45680
55

66
class Box<T> {
77
public let value: T

test/SILGen/subscripts.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ do {
103103
inoutFunc(&b[(1,2),(2,3)])
104104
}
105105

106-
// https://bugs.swift.org/browse/SR-1816
106+
// https://github.com/apple/swift/issues/44425
107+
107108
public struct Flags: OptionSet {
108109
public var rawValue: Int
109110
public init(rawValue: Int) { self.rawValue = rawValue }

test/SILGen/super.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ public class ChildToFixedParent : OutsideParent {
171171
// CHECK: } // end sil function '$s5super18ChildToFixedParentC11returnsSelfACXDyFZ'
172172
}
173173

174-
// https://bugs.swift.org/browse/SR-10260 - super.foo() call across a module
175-
// boundary from a subclass that does not override foo().
174+
// https://github.com/apple/swift/issues/52660
175+
// 'super.foo()' call across a module boundary from a subclass that does
176+
// not override 'foo()'.
177+
176178
public class SuperCallToNonOverriddenMethod : OutsideParent {
177179
public func newMethod() {
178180
super.method()

test/SILGen/switch.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,8 @@ func testOptionalEnumMixWithNil(_ a : Int?) -> Int {
10501050
}
10511051
}
10521052

1053-
// SR-3518
1053+
// https://github.com/apple/swift/issues/46106
1054+
//
10541055
// CHECK-LABEL: sil hidden [ossa] @$s6switch43testMultiPatternsWithOuterScopeSameNamedVar4base6filterySiSg_AEtF
10551056
func testMultiPatternsWithOuterScopeSameNamedVar(base: Int?, filter: Int?) {
10561057
switch(base, filter) {
@@ -1288,10 +1289,11 @@ func partial_address_only_tuple_dispatch_with_fail_case(_ name: Klass, _ value:
12881289
}
12891290

12901291
// This was crashing the ownership verifier at some point and was reported in
1291-
// SR-6664. Just make sure that we still pass the ownership verifier.
1292-
1292+
// https://github.com/apple/swift/issues/49213. Just make sure that we still
1293+
// pass the ownership verifier.
1294+
//
12931295
// `indirect` is necessary; generic parameter is necessary.
1294-
indirect enum SR6664_Base<Element> {
1296+
indirect enum IndirectGenericEnum<Element> {
12951297
// Tuple associated value is necessary; one element must be a function,
12961298
// the other must be a non-function using the generic parameter.
12971299
// (The original associated value was `(where: (Element) -> Bool, of: Element?)`,

test/SILGen/type_lowering_subst_function_type_caseiterable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
22

3-
// This is a GenericSignatureBuilder bug fixed with the Requirement Machine, from
4-
// https://bugs.swift.org/browse/SR-15917.
3+
// This is a GenericSignatureBuilder bug fixed with the Requirement Machine,
4+
// from https://github.com/apple/swift/issues/58178.
55

66
public struct Foo<Unused: CaseIterable> {
77
public struct Nested {}

test/SILGen/unreachable_code.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ func testUnreachableCase5(a : Tree) {
109109
}
110110
}
111111

112+
// https://github.com/apple/swift/issues/48333
112113
func testOptionalEvaluationBreak(a : Tree) {
113-
class SR5763 { func foo() {} }
114-
func createOptional() -> SR5763? { return SR5763() }
114+
class C { func foo() {} }
115+
func createOptional() -> C? { return C() }
115116
switch a {
116117
case _:
117118
break
@@ -130,7 +131,8 @@ class TestThrowInInit {
130131
}
131132
}
132133

133-
func sr6141() {
134+
// https://github.com/apple/swift/issues/48696
135+
func f_48696() {
134136
var bar: String? = ""
135137
return;
136138
bar?.append("x") // expected-warning{{code after 'return' will never be executed}}
@@ -147,11 +149,12 @@ func testUnreachableCatchClause() {
147149
}
148150
}
149151

150-
func sr13639() -> Int {
152+
// https://github.com/apple/swift/issues/56075
153+
func f_56075() -> Int {
151154
return Foo.bar
152155
struct Foo { // no-warning
153156
static var bar = 0
154-
// CHECK: sil private @$s16unreachable_code7sr13639SiyF3FooL_V7fooFuncyyF : $@convention(method) (Foo) -> ()
157+
// CHECK: sil private @$s16unreachable_code7f_56075SiyF3FooL_V7fooFuncyyF : $@convention(method) (Foo) -> ()
155158
func fooFunc() {}
156159
}
157160
func appendix() {} // no-warning

0 commit comments

Comments
 (0)