@@ -15,7 +15,13 @@ import CountedByLifetimeboundClang
15
15
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
16
16
// CHECK-NEXT: @lifetime(copy p)
17
17
// CHECK-NEXT: @lifetime(p: copy p)
18
- // CHECK-NEXT: @_alwaysEmitIntoClient public func complexExpr(_ len: Int32, _ offset: Int32, _ len2: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
18
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func complexExpr(_ len: Int32, _ offset: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
19
+
20
+ // CHECK: /// This is an auto-generated wrapper for safer interop
21
+ // CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
22
+ // CHECK-NEXT: @lifetime(copy p)
23
+ // CHECK-NEXT: @lifetime(p: copy p)
24
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func constant(_ p: inout MutableSpan<Int32>?) -> MutableSpan<Int32>?
19
25
20
26
// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
21
27
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
@@ -26,37 +32,37 @@ import CountedByLifetimeboundClang
26
32
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
27
33
// CHECK-NEXT: @lifetime(copy p)
28
34
// CHECK-NEXT: @lifetime(p: copy p)
29
- // CHECK-NEXT: @_alwaysEmitIntoClient public func nonnull(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
35
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func nonnull(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
30
36
31
37
// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
32
38
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
33
39
// CHECK-NEXT: @lifetime(copy p)
34
40
// CHECK-NEXT: @lifetime(p: copy p)
35
- // CHECK-NEXT: @_alwaysEmitIntoClient public func nullUnspecified(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
41
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func nullUnspecified(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
36
42
37
43
// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
38
44
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
39
45
// CHECK-NEXT: @lifetime(copy p)
40
46
// CHECK-NEXT: @lifetime(p: copy p)
41
- // CHECK-NEXT: @_alwaysEmitIntoClient public func nullable(_ len: Int32, _ p: inout MutableSpan<Int32>?) -> MutableSpan<Int32>?
47
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func nullable(_ len: Int32, _ p: inout MutableSpan<Int32>?) -> MutableSpan<Int32>?
42
48
43
49
// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
44
50
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
45
51
// CHECK-NEXT: @lifetime(copy p)
46
52
// CHECK-NEXT: @lifetime(p: copy p)
47
- // CHECK-NEXT: @_alwaysEmitIntoClient public func shared(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
53
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func shared(_ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
48
54
49
55
// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
50
56
// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
51
57
// CHECK-NEXT: @lifetime(copy p)
52
58
// CHECK-NEXT: @lifetime(p: copy p)
53
- // CHECK-NEXT: @_alwaysEmitIntoClient public func simple(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
59
+ // CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public func simple(_ len: Int32, _ p: inout MutableSpan<Int32>) -> MutableSpan<Int32>
54
60
55
61
56
62
@available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
57
63
@inlinable
58
64
public func callComplexExpr( _ p: inout MutableSpan < CInt > ) {
59
- let _: MutableSpan < CInt > = complexExpr ( 73 , 37 , 42 , & p)
65
+ let _: MutableSpan < CInt > = complexExpr ( 73 , 37 , & p)
60
66
}
61
67
62
68
@available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
@@ -80,7 +86,7 @@ public func callNullable(_ p: inout MutableSpan<CInt>?) {
80
86
@available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
81
87
@inlinable
82
88
public func callShared( _ p: inout MutableSpan < CInt > ) {
83
- let _: MutableSpan < CInt > = shared ( CInt ( p . count ) , & p)
89
+ let _: MutableSpan < CInt > = shared ( & p)
84
90
}
85
91
86
92
@available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
@@ -94,3 +100,9 @@ public func callSimple(_ p: inout MutableSpan<CInt>) {
94
100
public func callNoncountedLifetime( _ p: UnsafeMutablePointer < CInt > ) {
95
101
let _: MutableSpan < CInt > = noncountedLifetime ( 73 , p)
96
102
}
103
+
104
+ @available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
105
+ @inlinable
106
+ public func callConstant( _ p: inout MutableSpan < CInt > ? ) {
107
+ let _: MutableSpan < CInt > ? = constant ( & p)
108
+ }
0 commit comments