Skip to content

Commit 91bf80f

Browse files
committed
Update tests based on review feedback.
1 parent b44ddf5 commit 91bf80f

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

test/SILGen/initializers.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ class FailableBaseClass {
369369
// CHECK: br bb2([[RESULT]] : $Optional<FailableBaseClass>)
370370
// CHECK: bb2([[RESULT:%.*]] : @owned $Optional<FailableBaseClass>):
371371
// CHECK: return [[RESULT]]
372+
// CHECK-NEXT: }
372373
convenience init?(failAfterDelegation: ()) {
373374
self.init(noFail: ())
374375
return nil
@@ -429,6 +430,7 @@ class FailableBaseClass {
429430
//
430431
// CHECK: [[EPILOG_BB]]([[WRAPPED_RESULT:%.*]] : @owned $Optional<FailableBaseClass>):
431432
// CHECK: return [[WRAPPED_RESULT]]
433+
// CHECK-NEXT: }
432434
convenience init!(failDuringDelegation2: ()) {
433435
self.init(failBeforeFullInitialization: ())! // unnecessary-but-correct '!'
434436
}

test/SILGen/objc_factory_init.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ extension Hive {
3838
//
3939
// CHECK: [[SOME_BB]]([[NEW_HIVE:%.*]] : @owned $Hive):
4040
// CHECK: assign [[NEW_HIVE]] to [[PB_BOX]]
41+
// CHECK: } // end sil function '$SSo4HiveC17objc_factory_initE10otherQueenABSo3BeeC_tcfC'
4142
convenience init(otherQueen other: Bee) {
4243
self.init(queen: other)
4344
}
@@ -66,6 +67,7 @@ class SubHive : Hive {
6667
// CHECK: [[HIVE_INIT_FN:%.*]] = objc_method [[OBJC_METATYPE]] : $@objc_metatype Hive.Type, #Hive.init!allocator.1.foreign
6768
// CHECK: apply [[HIVE_INIT_FN]]([[QUEEN]], [[OBJC_METATYPE]]) : $@convention(objc_method) (Optional<Bee>, @objc_metatype Hive.Type) -> @autoreleased Optional<Hive>
6869
// CHECK: destroy_value [[QUEEN]]
70+
// CHECK: } // end sil function '$S17objc_factory_init7SubHiveC20delegatesToInheritedACyt_tcfC'
6971
convenience init(delegatesToInherited: ()) {
7072
self.init(queen: Bee())
7173
}

test/SILOptimizer/definite_init_diagnostics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class DelegatingCtorClass {
433433

434434
convenience init(x: EmptyStruct, y: EmptyStruct) {
435435
_ = ivar // expected-error {{'self' used before 'self.init' call}}
436-
ivar = x // expected-error* {{'self' used before 'self.init' call}}
436+
ivar = x // expected-error {{'self' used before 'self.init' call}}
437437
self.init()
438438
}
439439

@@ -443,7 +443,7 @@ class DelegatingCtorClass {
443443
}
444444

445445
convenience init(x: (EmptyStruct, EmptyStruct)) {
446-
method() // expected-error* {{'self' used before 'self.init' call}}
446+
method() // expected-error {{'self' used before 'self.init' call}}
447447
self.init()
448448
}
449449

test/SILOptimizer/definite_init_failable_initializers_diagnostics.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,16 @@ class ErrantClass : ErrantBaseClass {
128128
do {
129129
try self.init()
130130
} catch let e {
131-
something(x) // expected-error* {{'self' used before 'self.init'}}
132-
something(self.x) // expected-error* {{'self' used before 'self.init'}}
131+
something(x) // expected-error {{'self' used before 'self.init'}}
132+
something(self.x) // expected-error {{'self' used before 'self.init'}}
133133

134-
something(y) // expected-error* {{'self' used before 'self.init'}}
135-
something(self.y) // expected-error* {{'self' used before 'self.init'}}
134+
something(y) // expected-error {{'self' used before 'self.init'}}
135+
something(self.y) // expected-error {{'self' used before 'self.init'}}
136136

137-
something(&y) // expected-error* {{'self' used before 'self.init'}}
138-
something(&self.y) // expected-error* {{'self' used before 'self.init'}}
137+
something(&y) // expected-error {{'self' used before 'self.init'}}
138+
something(&self.y) // expected-error {{'self' used before 'self.init'}}
139139

140-
something(self) // expected-error* {{'self' used before 'self.init'}}
140+
something(self) // expected-error {{'self' used before 'self.init'}}
141141

142142
something(type(of: self))
143143

test/Serialization/Recovery/typedefs.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ open class User {
181181
// 20 CHECK-VTABLE-NEXT: #User.subscript!getter.1:
182182
// 21 CHECK-VTABLE-NEXT: #User.subscript!getter.1:
183183
// 22 CHECK-VTABLE-NEXT: #User.init!allocator.1:
184-
// 26 CHECK-VTABLE-NEXT: #User.init!allocator.1:
185-
// 27 CHECK-VTABLE-NEXT: #User.init!allocator.1:
186-
// 28 CHECK-VTABLE-NEXT: #User.init!allocator.1:
187-
// 30 CHECK-VTABLE-NEXT: #User.lastMethod!1:
184+
// 23 CHECK-VTABLE-NEXT: #User.init!allocator.1:
185+
// 24 CHECK-VTABLE-NEXT: #User.init!allocator.1:
186+
// 25 CHECK-VTABLE-NEXT: #User.init!allocator.1:
187+
// 26 CHECK-VTABLE-NEXT: #User.lastMethod!1:
188188
// CHECK-VTABLE: }
189189

190190

0 commit comments

Comments
 (0)