File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
test/Interop/SwiftToCxx/unsupported Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,8 @@ void LoweredFunctionSignature::visitParameterList(
302
302
for (auto param : *FD->getParameters ()) {
303
303
// FIXME: tuples map to more than one sil param (but they're not yet
304
304
// representable by the consumer).
305
- silParamMapping.push_back (param);
305
+ if (!param->getInterfaceType ()->isVoid ())
306
+ silParamMapping.push_back (param);
306
307
}
307
308
size_t currentSilParam = 0 ;
308
309
for (const auto &abiParam : abiDetails.parameters ) {
Original file line number Diff line number Diff line change @@ -211,6 +211,9 @@ class CFunctionSignatureTypePrinter
211
211
if (TT->getNumElements () > 0 )
212
212
// FIXME: Handle non-void type.
213
213
return ClangRepresentation::unsupported;
214
+ // FIXME: how to support `()` parameters.
215
+ if (typeUseKind != FunctionSignatureTypeUse::ReturnType)
216
+ return ClangRepresentation::unsupported;
214
217
os << " void" ;
215
218
return ClangRepresentation::representable;
216
219
}
Original file line number Diff line number Diff line change 4
4
5
5
// RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
6
6
7
- // CHECK: takesFloat
8
- // CHECK-NOT: takesTuple
7
+ // CHECK: takeFloat
8
+ // CHECK-NOT: takes
9
9
10
- public func takesFloat ( _ x: Float ) { }
10
+ public func takeFloat ( _ x: Float ) { }
11
11
12
12
public func takesTuple( _ x: ( Float , Float ) ) { }
13
+
14
+ public func takesVoid( _ x: ( ) ) { }
You can’t perform that action at this time.
0 commit comments