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
6868 [[clang::lifetimebound]]) {
6969 return s;
7070}
71+
7172inline ConstSpanOfInt funcWithSafeWrapper3 (const VecOfInt &v
7273 [[clang::lifetimebound]]) {
7374 return ConstSpanOfInt (v.data (), v.size ());
7475}
7576
77+ struct X {
78+ inline void methodWithSafeWrapper (ConstSpanOfInt s [[clang::noescape]]) {}
79+ };
80+
7681#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
2222// CHECK: func funcWithSafeWrapper(_ s: ConstSpanOfInt)
2323// CHECK-NEXT: func funcWithSafeWrapper2(_ s: borrowing ConstSpanOfInt) -> ConstSpanOfInt
2424// 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: }
2530// CHECK-NEXT: @_alwaysEmitIntoClient public func funcWithSafeWrapper(_ s: Span<CInt>)
2631// CHECK-NEXT: @lifetime(s)
2732// CHECK-NEXT: @_alwaysEmitIntoClient public func funcWithSafeWrapper2(_ s: borrowing Span<CInt>) -> Span<CInt>
You can’t perform that action at this time.
0 commit comments