File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,14 @@ inline ConstSpanOfInt funcWithSafeWrapper2(ConstSpanOfInt s
68
68
[[clang::lifetimebound]]) {
69
69
return s;
70
70
}
71
+
71
72
inline ConstSpanOfInt funcWithSafeWrapper3 (const VecOfInt &v
72
73
[[clang::lifetimebound]]) {
73
74
return ConstSpanOfInt (v.data (), v.size ());
74
75
}
75
76
77
+ struct X {
78
+ inline void methodWithSafeWrapper (ConstSpanOfInt s [[clang::noescape]]) {}
79
+ };
80
+
76
81
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_STD_SPAN_H
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ import CxxStdlib
22
22
// CHECK: func funcWithSafeWrapper(_ s: ConstSpanOfInt)
23
23
// CHECK-NEXT: func funcWithSafeWrapper2(_ s: borrowing ConstSpanOfInt) -> ConstSpanOfInt
24
24
// CHECK-NEXT: func funcWithSafeWrapper3(_ v: borrowing VecOfInt) -> ConstSpanOfInt
25
+ // CHECK: struct X {
26
+ // CHECK-NEXT: init()
27
+ // CHECK-NEXT: @_alwaysEmitIntoClient public mutating func methodWithSafeWrapper(_ s: Span<CInt>)
28
+ // CHECK-NEXT: mutating func methodWithSafeWrapper(_ s: ConstSpanOfInt)
29
+ // CHECK-NEXT: }
25
30
// CHECK-NEXT: @_alwaysEmitIntoClient public func funcWithSafeWrapper(_ s: Span<CInt>)
26
31
// CHECK-NEXT: @lifetime(s)
27
32
// CHECK-NEXT: @_alwaysEmitIntoClient public func funcWithSafeWrapper2(_ s: borrowing Span<CInt>) -> Span<CInt>
You can’t perform that action at this time.
0 commit comments