Merge pull request #79396 from swiftlang/gaborh/fix-lifetime-errors-in-macros

[cxx-interop] Work around lifetime errors in SwiftifyImport generated code
This commit is contained in:
Gábor Horváth
2025-02-15 15:29:12 +00:00
committed by GitHub
6 changed files with 42 additions and 10 deletions

View File

@@ -15,8 +15,8 @@ import CxxStdlib
// CHECK: struct DependsOnSelf {
// CHECK: @lifetime(borrow self)
// CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public mutating func get() -> Span<CInt>
// CHECK-NEXT: mutating func get() -> ConstSpanOfInt
// CHECK-NEXT: @_alwaysEmitIntoClient @_disfavoredOverload public borrowing func get() -> Span<CInt>
// CHECK-NEXT: borrowing func get() -> ConstSpanOfInt
// CHECK: mutating func set(_ x: borrowing std.{{.*}}vector<CInt, std.{{.*}}allocator<CInt>>)
// CHECK: func funcWithSafeWrapper(_ s: ConstSpanOfInt)