@@ -15,7 +15,13 @@ import CountedByLifetimeboundClang
1515// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
1616// CHECK-NEXT: @lifetime(copy p)
1717// 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>?
1925
2026// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
2127// 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
2632// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
2733// CHECK-NEXT: @lifetime(copy p)
2834// 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>
3036
3137// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
3238// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
3339// CHECK-NEXT: @lifetime(copy p)
3440// 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>
3642
3743// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
3844// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
3945// CHECK-NEXT: @lifetime(copy p)
4046// 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>?
4248
4349// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
4450// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
4551// CHECK-NEXT: @lifetime(copy p)
4652// 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>
4854
4955// CHECK-NEXT: /// This is an auto-generated wrapper for safer interop
5056// CHECK-NEXT: @available(visionOS 1.1, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *)
5157// CHECK-NEXT: @lifetime(copy p)
5258// 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>
5460
5561
5662@available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
5763@inlinable
5864public func callComplexExpr( _ p: inout MutableSpan < CInt > ) {
59- let _: MutableSpan < CInt > = complexExpr ( 73 , 37 , 42 , & p)
65+ let _: MutableSpan < CInt > = complexExpr ( 73 , 37 , & p)
6066}
6167
6268@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>?) {
8086@available ( visionOS 1 . 1 , tvOS 12 . 2 , watchOS 5 . 2 , iOS 12 . 2 , macOS 10 . 14 . 4 , * )
8187@inlinable
8288public func callShared( _ p: inout MutableSpan < CInt > ) {
83- let _: MutableSpan < CInt > = shared ( CInt ( p . count ) , & p)
89+ let _: MutableSpan < CInt > = shared ( & p)
8490}
8591
8692@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>) {
94100public func callNoncountedLifetime( _ p: UnsafeMutablePointer < CInt > ) {
95101 let _: MutableSpan < CInt > = noncountedLifetime ( 73 , p)
96102}
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