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 @@ -62,9 +62,14 @@ inline ConstSpanOfInt funcWithSafeWrapper2(ConstSpanOfInt s
62
62
[[clang::lifetimebound]]) {
63
63
return s;
64
64
}
65
+
65
66
inline ConstSpanOfInt funcWithSafeWrapper3 (const VecOfInt &v
66
67
[[clang::lifetimebound]]) {
67
68
return ConstSpanOfInt (v.data (), v.size ());
68
69
}
69
70
71
+ struct X {
72
+ inline void methodWithSafeWrapper (ConstSpanOfInt s [[clang::noescape]]) {}
73
+ };
74
+
70
75
#endif // TEST_INTEROP_CXX_STDLIB_INPUTS_STD_SPAN_H
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ import CxxStdlib
17
17
// CHECK: func funcWithSafeWrapper(_ s: ConstSpanOfInt)
18
18
// CHECK-NEXT: func funcWithSafeWrapper2(_ s: borrowing ConstSpanOfInt) -> ConstSpanOfInt
19
19
// CHECK-NEXT: func funcWithSafeWrapper3(_ v: borrowing VecOfInt) -> ConstSpanOfInt
20
+ // CHECK: struct X {
21
+ // CHECK-NEXT: init()
22
+ // CHECK-NEXT: @_alwaysEmitIntoClient public mutating func methodWithSafeWrapper(_ s: Span<CInt>)
23
+ // CHECK-NEXT: mutating func methodWithSafeWrapper(_ s: ConstSpanOfInt)
24
+ // CHECK-NEXT: }
20
25
// CHECK-NEXT: @_alwaysEmitIntoClient public func funcWithSafeWrapper(_ s: Span<CInt>)
21
26
// CHECK-NEXT: @lifetime(s)
22
27
// CHECK-NEXT: @_alwaysEmitIntoClient public func funcWithSafeWrapper2(_ s: borrowing Span<CInt>) -> Span<CInt>
You can’t perform that action at this time.
0 commit comments