Skip to content

Commit ed4f058

Browse files
authored
Merge pull request #84507 from hnrklssn/swiftify-import-as-method
[Swiftify] Add support for free functions imported as instance methods
2 parents 08eaf82 + 0c3db50 commit ed4f058

File tree

14 files changed

+593
-32
lines changed

14 files changed

+593
-32
lines changed

include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ GROUPED_WARNING(clang_ignored_sendable_attr, ClangDeclarationImport, none,
105105
"cannot be added to it",
106106
(Type))
107107

108+
GROUPED_WARNING(warn_clang_ignored_bounds_on_self, ClangDeclarationImport, none,
109+
"bounds attribute '%0' ignored on parameter mapped to 'self'",
110+
(StringRef))
111+
NOTE(note_swift_name_instance_method, none,
112+
"swift_name maps free function to instance method here", ())
113+
108114
WARNING(implicit_bridging_header_imported_from_module,none,
109115
"implicit import of bridging header '%0' via module %1 "
110116
"is deprecated and will be removed in a later version of Swift",

lib/ClangImporter/ImportDecl.cpp

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9461,6 +9461,22 @@ void ClangImporter::Implementation::addOptionSetTypealiases(
94619461

94629462
#define SIW_DBG(x) DEBUG_WITH_TYPE("safe-interop-wrappers", llvm::dbgs() << x)
94639463

9464+
// until CountAttributedType::getAttributeName lands in our LLVM branch
9465+
static StringRef getAttributeName(const clang::CountAttributedType *CAT) {
9466+
switch (CAT->getKind()) {
9467+
case clang::CountAttributedType::CountedBy:
9468+
return "__counted_by";
9469+
case clang::CountAttributedType::CountedByOrNull:
9470+
return "__counted_by_or_null";
9471+
case clang::CountAttributedType::SizedBy:
9472+
return "__sized_by";
9473+
case clang::CountAttributedType::SizedByOrNull:
9474+
return "__sized_by_or_null";
9475+
case clang::CountAttributedType::EndedBy:
9476+
llvm_unreachable("CountAttributedType cannot be ended_by");
9477+
}
9478+
}
9479+
94649480
void ClangImporter::Implementation::swiftify(AbstractFunctionDecl *MappedDecl) {
94659481
if (!SwiftContext.LangOpts.hasFeature(Feature::SafeInteropWrappers))
94669482
return;
@@ -9476,9 +9492,6 @@ void ClangImporter::Implementation::swiftify(AbstractFunctionDecl *MappedDecl) {
94769492
ClangDecl->getAccess() == clang::AS_private)
94779493
return;
94789494

9479-
if (ClangDecl->getNumParams() != MappedDecl->getParameters()->size())
9480-
return;
9481-
94829495
MacroDecl *SwiftifyImportDecl = dyn_cast_or_null<MacroDecl>(getKnownSingleDecl(SwiftContext, "_SwiftifyImport"));
94839496
if (!SwiftifyImportDecl)
94849497
return;
@@ -9535,14 +9548,44 @@ void ClangImporter::Implementation::swiftify(AbstractFunctionDecl *MappedDecl) {
95359548
true);
95369549
returnHasLifetimeInfo = true;
95379550
}
9551+
9552+
bool isClangInstanceMethod =
9553+
isa<clang::CXXMethodDecl>(ClangDecl) &&
9554+
!isa<clang::CXXConstructorDecl>(ClangDecl) &&
9555+
cast<clang::CXXMethodDecl>(ClangDecl)->isInstance();
9556+
size_t swiftNumParams = MappedDecl->getParameters()->size() -
9557+
(ClangDecl->isVariadic() ? 1 : 0);
9558+
ASSERT((MappedDecl->isImportAsInstanceMember() == isClangInstanceMethod) ==
9559+
(ClangDecl->getNumParams() == swiftNumParams));
9560+
9561+
size_t selfParamIndex = MappedDecl->isImportAsInstanceMember()
9562+
? MappedDecl->getSelfIndex()
9563+
: ClangDecl->getNumParams();
95389564
for (auto [index, clangParam] : llvm::enumerate(ClangDecl->parameters())) {
95399565
auto clangParamTy = clangParam->getType();
9540-
auto swiftParam = MappedDecl->getParameters()->get(index);
9566+
int mappedIndex = index < selfParamIndex ? index :
9567+
index > selfParamIndex ? index - 1 :
9568+
SwiftifyInfoPrinter::SELF_PARAM_INDEX;
9569+
ParamDecl *swiftParam = nullptr;
9570+
if (mappedIndex == SwiftifyInfoPrinter::SELF_PARAM_INDEX) {
9571+
swiftParam = MappedDecl->getImplicitSelfDecl(/*createIfNeeded*/true);
9572+
} else {
9573+
swiftParam = MappedDecl->getParameters()->get(mappedIndex);
9574+
}
9575+
ASSERT(swiftParam);
95419576
Type swiftParamTy = swiftParam->getInterfaceType();
95429577
bool paramHasBoundsInfo = false;
95439578
auto *CAT = clangParamTy->getAs<clang::CountAttributedType>();
9544-
if (SwiftifiableCAT(getClangASTContext(), CAT, swiftParamTy)) {
9545-
printer.printCountedBy(CAT, index);
9579+
if (CAT && mappedIndex == SwiftifyInfoPrinter::SELF_PARAM_INDEX) {
9580+
diagnose(HeaderLoc(clangParam->getLocation()),
9581+
diag::warn_clang_ignored_bounds_on_self, getAttributeName(CAT));
9582+
auto swiftName = ClangDecl->getAttr<clang::SwiftNameAttr>();
9583+
ASSERT(swiftName &&
9584+
"free function mapped to instance method without swift_name??");
9585+
diagnose(HeaderLoc(swiftName->getLocation()),
9586+
diag::note_swift_name_instance_method);
9587+
} else if (SwiftifiableCAT(getClangASTContext(), CAT, swiftParamTy)) {
9588+
printer.printCountedBy(CAT, mappedIndex);
95469589
SIW_DBG(" Found bounds info '" << clangParamTy
95479590
<< "' on parameter '" << *clangParam << "'\n");
95489591
attachMacro = paramHasBoundsInfo = true;
@@ -9554,16 +9597,18 @@ void ClangImporter::Implementation::swiftify(AbstractFunctionDecl *MappedDecl) {
95549597
bool paramHasLifetimeInfo = false;
95559598
if (clangParam->hasAttr<clang::NoEscapeAttr>()) {
95569599
SIW_DBG(" Found noescape attribute on parameter '" << *clangParam << "'\n");
9557-
printer.printNonEscaping(index);
9600+
printer.printNonEscaping(mappedIndex);
95589601
paramHasLifetimeInfo = true;
95599602
}
95609603
if (clangParam->hasAttr<clang::LifetimeBoundAttr>()) {
95619604
SIW_DBG(" Found lifetimebound attribute on parameter '"
95629605
<< *clangParam << "'\n");
95639606
// If this parameter has bounds info we will tranform it into a Span,
95649607
// so then it will no longer be Escapable.
9565-
bool willBeEscapable = swiftParamTy->isEscapable() && !paramHasBoundsInfo;
9566-
printer.printLifetimeboundReturn(index, willBeEscapable);
9608+
bool willBeEscapable = swiftParamTy->isEscapable() &&
9609+
(!paramHasBoundsInfo ||
9610+
mappedIndex == SwiftifyInfoPrinter::SELF_PARAM_INDEX);
9611+
printer.printLifetimeboundReturn(mappedIndex, willBeEscapable);
95679612
paramHasLifetimeInfo = true;
95689613
returnHasLifetimeInfo = true;
95699614
}
@@ -9579,7 +9624,6 @@ void ClangImporter::Implementation::swiftify(AbstractFunctionDecl *MappedDecl) {
95799624
}
95809625
printer.printAvailability();
95819626
printer.printTypeMapping(typeMapping);
9582-
95839627
}
95849628

95859629
if (attachMacro) {

lib/Macros/Sources/SwiftMacros/SwiftifyImportMacro.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,14 @@ struct FunctionCallBuilder: BoundsCheckedThunkBuilder {
468468
let functionRef = DeclReferenceExprSyntax(baseName: base.name)
469469
let args: [ExprSyntax] = base.signature.parameterClause.parameters.enumerated()
470470
.map { (i: Int, param: FunctionParameterSyntax) in
471-
return pointerArgs[i] ?? ExprSyntax("\(param.name)")
471+
if let overrideArg = pointerArgs[i] {
472+
return overrideArg
473+
}
474+
if isInout(getParam(base.signature, i).type) {
475+
return ExprSyntax("&\(param.name)")
476+
} else {
477+
return ExprSyntax("\(param.name)")
478+
}
472479
}
473480
let labels: [TokenSyntax?] = base.signature.parameterClause.parameters.map { param in
474481
let firstName = param.firstName.trimmed

stdlib/public/Cxx/libstdcxx/libstdcxx.modulemap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module std {
4242
header "ostream"
4343
header "queue"
4444
header "set"
45+
header "span"
4546
header "sstream"
4647
header "stack"
4748
header "stdexcept"
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
// REQUIRES: swift_feature_SafeInteropWrappers
2+
3+
// RUN: %empty-directory(%t)
4+
// RUN: split-file %s %t
5+
6+
// RUN: %target-swift-frontend -emit-module -plugin-path %swift-plugin-dir -o %t/Test.swiftmodule -I %t%{fs-sep}Inputs -enable-experimental-feature SafeInteropWrappers -strict-memory-safety -verify -verify-additional-file %t%{fs-sep}Inputs%{fs-sep}instance.h %t/test.swift -I %bridging-path -DVERIFY
7+
// RUN: env SWIFT_BACKTRACE="" %target-swift-frontend -emit-module -plugin-path %swift-plugin-dir -o %t/Test.swiftmodule -I %t/Inputs -enable-experimental-feature SafeInteropWrappers -strict-memory-safety -warnings-as-errors -Xcc -Werror %t/test.swift -dump-macro-expansions -I %bridging-path 2> %t/out.txt
8+
// RUN: diff --strip-trailing-cr %t/out.txt %t/out.expected
9+
10+
//--- test.swift
11+
import Instance
12+
13+
@available(macOS 13.3.0, *)
14+
func foo(_ p: inout MutableSpan<CInt>, a: A, aa: inout A, c: C, b: B, bb: inout B) {
15+
aa.basic(&p)
16+
aa.bar(&p)
17+
a.constSelf(&p)
18+
a.valSelf(&p)
19+
let _: MutableSpan<CInt> = a.lifetimeBoundSelf(3)
20+
c.refSelf(&p)
21+
b.nonescaping(&p)
22+
let _: MutableSpan<CInt> = bb.nonescapingLifetimebound(73)
23+
24+
#if VERIFY
25+
aa.countedSelf(&p)
26+
a.basic(&p) // expected-error{{cannot use mutating member on immutable value: 'a' is a 'let' constant}}
27+
#endif
28+
}
29+
30+
//--- Inputs/instance.h
31+
#include <ptrcheck.h>
32+
#include <lifetimebound.h>
33+
#include <swift/bridging>
34+
35+
struct A {};
36+
struct SWIFT_NONESCAPABLE B {};
37+
struct SWIFT_IMMORTAL_REFERENCE C {};
38+
39+
void basic(struct A *a, int * __counted_by(len) p __noescape, int len) __attribute__((swift_name("A.basic(self:_:_:)")));
40+
41+
void renamed(struct A *a, int * __counted_by(len) p __noescape, int len) __attribute__((swift_name("A.bar(self:_:_:)")));
42+
43+
void countedSelf(struct A * __counted_by(len)
44+
a, // expected-warning{{bounds attribute '__counted_by' ignored on parameter mapped to 'self'}}
45+
int * __counted_by(len) p __noescape, int len)
46+
__attribute__((
47+
swift_name // expected-note{{swift_name maps free function to instance method here}}
48+
("A.countedSelf(self:_:_:)")));
49+
50+
void constSelf(const struct A *a, int * __counted_by(len) p __noescape, int len) __attribute__((swift_name("A.constSelf(self:_:_:)")));
51+
52+
void valSelf(struct A a, int * __counted_by(len) p __noescape, int len) __attribute__((swift_name("A.valSelf(self:_:_:)")));
53+
54+
void refSelf(struct C *c, int * __counted_by(len) p __noescape, int len) __attribute__((swift_name("C.refSelf(self:_:_:)")));
55+
56+
int * __counted_by(len) lifetimeBoundSelf(struct A a __lifetimebound, int len) __attribute__((swift_name("A.lifetimeBoundSelf(self:_:)")));
57+
58+
void nonescaping(const struct B *d, int * __counted_by(len) p __noescape, int len) __attribute__((swift_name("B.nonescaping(self:_:_:)")));
59+
60+
int * __counted_by(len) nonescapingLifetimebound(struct B *d __lifetimebound, int len) __attribute__((swift_name("B.nonescapingLifetimebound(self:_:)")));
61+
62+
//--- Inputs/module.modulemap
63+
module Instance {
64+
header "instance.h"
65+
}
66+
67+
//--- out.expected
68+
@__swiftmacro_So1AV5basic15_SwiftifyImportfMp_.swift
69+
------------------------------
70+
/// This is an auto-generated wrapper for safer interop
71+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
72+
public mutating func basic(_ p: inout MutableSpan<Int32>) {
73+
let len = Int32(exactly: p.count)!
74+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
75+
return unsafe basic(_pPtr.baseAddress!, len)
76+
}
77+
}
78+
------------------------------
79+
@__swiftmacro_So5basic15_SwiftifyImportfMp_.swift
80+
------------------------------
81+
/// This is an auto-generated wrapper for safer interop
82+
@available(swift, obsoleted: 3, renamed: "A.basic(self:_:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
83+
public func basic(_ a: UnsafeMutablePointer<A>!, _ p: inout MutableSpan<Int32>) {
84+
let len = Int32(exactly: p.count)!
85+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
86+
return unsafe basic(a, _pPtr.baseAddress!, len)
87+
}
88+
}
89+
------------------------------
90+
@__swiftmacro_So1AV3bar15_SwiftifyImportfMp_.swift
91+
------------------------------
92+
/// This is an auto-generated wrapper for safer interop
93+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
94+
public mutating func bar(_ p: inout MutableSpan<Int32>) {
95+
let len = Int32(exactly: p.count)!
96+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
97+
return unsafe bar(_pPtr.baseAddress!, len)
98+
}
99+
}
100+
------------------------------
101+
@__swiftmacro_So7renamed15_SwiftifyImportfMp_.swift
102+
------------------------------
103+
/// This is an auto-generated wrapper for safer interop
104+
@available(swift, obsoleted: 3, renamed: "A.bar(self:_:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
105+
public func renamed(_ a: UnsafeMutablePointer<A>!, _ p: inout MutableSpan<Int32>) {
106+
let len = Int32(exactly: p.count)!
107+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
108+
return unsafe renamed(a, _pPtr.baseAddress!, len)
109+
}
110+
}
111+
------------------------------
112+
@__swiftmacro_So1AV9constSelf15_SwiftifyImportfMp_.swift
113+
------------------------------
114+
/// This is an auto-generated wrapper for safer interop
115+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
116+
public func constSelf(_ p: inout MutableSpan<Int32>) {
117+
let len = Int32(exactly: p.count)!
118+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
119+
return unsafe constSelf(_pPtr.baseAddress!, len)
120+
}
121+
}
122+
------------------------------
123+
@__swiftmacro_So9constSelf15_SwiftifyImportfMp_.swift
124+
------------------------------
125+
/// This is an auto-generated wrapper for safer interop
126+
@available(swift, obsoleted: 3, renamed: "A.constSelf(self:_:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
127+
public func constSelf(_ a: UnsafePointer<A>!, _ p: inout MutableSpan<Int32>) {
128+
let len = Int32(exactly: p.count)!
129+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
130+
return unsafe constSelf(a, _pPtr.baseAddress!, len)
131+
}
132+
}
133+
------------------------------
134+
@__swiftmacro_So1AV7valSelf15_SwiftifyImportfMp_.swift
135+
------------------------------
136+
/// This is an auto-generated wrapper for safer interop
137+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
138+
public func valSelf(_ p: inout MutableSpan<Int32>) {
139+
let len = Int32(exactly: p.count)!
140+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
141+
return unsafe valSelf(_pPtr.baseAddress!, len)
142+
}
143+
}
144+
------------------------------
145+
@__swiftmacro_So7valSelf15_SwiftifyImportfMp_.swift
146+
------------------------------
147+
/// This is an auto-generated wrapper for safer interop
148+
@available(swift, obsoleted: 3, renamed: "A.valSelf(self:_:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
149+
public func valSelf(_ a: A, _ p: inout MutableSpan<Int32>) {
150+
let len = Int32(exactly: p.count)!
151+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
152+
return unsafe valSelf(a, _pPtr.baseAddress!, len)
153+
}
154+
}
155+
------------------------------
156+
@__swiftmacro_So1AV17lifetimeBoundSelf15_SwiftifyImportfMp_.swift
157+
------------------------------
158+
/// This is an auto-generated wrapper for safer interop
159+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(borrow self) @_disfavoredOverload
160+
public func lifetimeBoundSelf(_ len: Int32) -> MutableSpan<Int32> {
161+
return unsafe _swiftifyOverrideLifetime(MutableSpan<Int32>(_unsafeStart: unsafe lifetimeBoundSelf(len), count: Int(len)), copying: ())
162+
}
163+
------------------------------
164+
@__swiftmacro_So17lifetimeBoundSelf15_SwiftifyImportfMp_.swift
165+
------------------------------
166+
/// This is an auto-generated wrapper for safer interop
167+
@available(swift, obsoleted: 3, renamed: "A.lifetimeBoundSelf(self:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(borrow a) @_disfavoredOverload
168+
public func lifetimeBoundSelf(_ a: A, _ len: Int32) -> MutableSpan<Int32> {
169+
return unsafe _swiftifyOverrideLifetime(MutableSpan<Int32>(_unsafeStart: unsafe lifetimeBoundSelf(a, len), count: Int(len)), copying: ())
170+
}
171+
------------------------------
172+
@__swiftmacro_So1CV7refSelf15_SwiftifyImportfMp_.swift
173+
------------------------------
174+
/// This is an auto-generated wrapper for safer interop
175+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
176+
public func refSelf(_ p: inout MutableSpan<Int32>) {
177+
let len = Int32(exactly: p.count)!
178+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
179+
return unsafe refSelf(_pPtr.baseAddress!, len)
180+
}
181+
}
182+
------------------------------
183+
@__swiftmacro_So7refSelf15_SwiftifyImportfMp_.swift
184+
------------------------------
185+
/// This is an auto-generated wrapper for safer interop
186+
@available(swift, obsoleted: 3, renamed: "C.refSelf(self:_:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
187+
public func refSelf(_ c: C!, _ p: inout MutableSpan<Int32>) {
188+
let len = Int32(exactly: p.count)!
189+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
190+
return unsafe refSelf(c, _pPtr.baseAddress!, len)
191+
}
192+
}
193+
------------------------------
194+
@__swiftmacro_So1BV11nonescaping15_SwiftifyImportfMp_.swift
195+
------------------------------
196+
/// This is an auto-generated wrapper for safer interop
197+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload
198+
public func nonescaping(_ p: inout MutableSpan<Int32>) {
199+
let len = Int32(exactly: p.count)!
200+
return unsafe p.withUnsafeMutableBufferPointer { _pPtr in
201+
return unsafe nonescaping(_pPtr.baseAddress!, len)
202+
}
203+
}
204+
------------------------------
205+
@__swiftmacro_So1BV24nonescapingLifetimebound15_SwiftifyImportfMp_.swift
206+
------------------------------
207+
/// This is an auto-generated wrapper for safer interop
208+
@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(copy self) @_disfavoredOverload
209+
public mutating func nonescapingLifetimebound(_ len: Int32) -> MutableSpan<Int32> {
210+
return unsafe _swiftifyOverrideLifetime(MutableSpan<Int32>(_unsafeStart: unsafe nonescapingLifetimebound(len), count: Int(len)), copying: ())
211+
}
212+
------------------------------

test/Interop/Cxx/class/access/swiftify-private-fileid.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
// REQUIRES: swift_feature_SafeInteropWrappers
77

8-
// FIXME swift-ci linux tests do not support std::span
9-
// UNSUPPORTED: OS=linux-gnu, OS=linux-android, OS=linux-androideabi
10-
118
//--- Inputs/swiftify-non-public.h
129
#pragma once
1310

test/Interop/Cxx/stdlib/std-span-interface.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
// REQUIRES: swift_feature_SafeInteropWrappers
99
// REQUIRES: swift_feature_Lifetimes
1010

11-
// FIXME swift-ci linux tests do not support std::span
12-
// UNSUPPORTED: OS=linux-gnu, OS=linux-android, OS=linux-androideabi
13-
1411
#if !BRIDGING_HEADER
1512
import StdSpan
1613
#endif

test/Interop/Cxx/stdlib/std-span-transformed-execution.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-run-simple-swift(-plugin-path %swift-plugin-dir -I %S/Inputs -Xfrontend -enable-experimental-cxx-interop -swift-version 6 -Xfrontend -disable-availability-checking -Xcc -std=c++20 -enable-experimental-feature LifetimeDependence -enable-experimental-feature SafeInteropWrappers)
22

3-
// FIXME swift-ci linux tests do not support std::span
4-
// UNSUPPORTED: OS=linux-gnu
5-
63
// TODO: test failed in Windows PR testing: rdar://144384453
74
// UNSUPPORTED: OS=windows-msvc
85

test/Interop/Cxx/stdlib/use-std-span-typechecker.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// RUN: %target-typecheck-verify-swift -I %S/Inputs -enable-experimental-cxx-interop -Xcc -std=c++20 2>&1
22

3-
// FIXME swift-ci linux tests do not support std::span
4-
// UNSUPPORTED: OS=linux-gnu
5-
63
import StdSpan
74

85
let arr: [Int32] = [1, 2, 3]

0 commit comments

Comments
 (0)