@@ -16,15 +16,6 @@ struct SWIFT_NONESCAPABLE View {
16
16
View ( ) : member( nullptr) { }
17
17
View ( const int * p [ [ clang: : lifetimebound] ] ) : member( p) { }
18
18
View ( const View& ) = default;
19
- private:
20
- const int * member;
21
- friend struct OtherView;
22
- } ;
23
-
24
- struct SWIFT_NONESCAPABLE OtherView {
25
- OtherView ( ) : member( nullptr) { }
26
- OtherView ( View v [ [ clang: : lifetimebound] ] ) : member( v. member) { }
27
- OtherView ( const OtherView& ) = default;
28
19
private:
29
20
const int * member;
30
21
} ;
@@ -77,15 +68,14 @@ private:
77
68
const int * member;
78
69
} ;
79
70
80
- // CHECK: sil [clang makeOwner] {{.*}} : $@convention(c) () -> Owner
71
+ // CHECK: sil [clang makeOwner] {{.*}}: $@convention(c) () -> Owner
81
72
// CHECK: sil [clang getView] {{.*}} : $@convention(c) (@in_guaranteed Owner) -> _scope(0) @autoreleased View
82
73
// CHECK: sil [clang getViewFromFirst] {{.*}} : $@convention(c) (@in_guaranteed Owner, @in_guaranteed Owner) -> _scope(0) @autoreleased View
83
74
// CHECK: sil [clang getViewFromEither] {{.*}} : $@convention(c) (@in_guaranteed Owner, @in_guaranteed Owner) -> _scope(0, 1) @autoreleased View
84
75
// CHECK: sil [clang Owner.handOutView] {{.*}} : $@convention(cxx_method) (@in_guaranteed Owner) -> _scope(0) @autoreleased View
85
76
// CHECK: sil [clang Owner.handOutView2] {{.*}} : $@convention(cxx_method) (View, @in_guaranteed Owner) -> _scope(1) @autoreleased View
86
77
// CHECK: sil [clang getViewFromEither] {{.*}} : $@convention(c) (@guaranteed View, @guaranteed View) -> _inherit(0, 1) @autoreleased View
87
78
// CHECK: sil [clang View.init] {{.*}} : $@convention(c) () -> @out View
88
- // CHECK: sil [clang OtherView.init] {{.*}} : $@convention(c) (@guaranteed View) -> _inherit(0) @out OtherView
89
79
90
80
//--- test.swift
91
81
@@ -101,5 +91,4 @@ public func test() {
101
91
let _ = o. handOutView2 ( v1)
102
92
let _ = getViewFromEither ( v1, v2)
103
93
let defaultView = View ( )
104
- let _ = OtherView ( defaultView)
105
94
}
0 commit comments