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(
302302 for (auto param : *FD->getParameters ()) {
303303 // FIXME: tuples map to more than one sil param (but they're not yet
304304 // representable by the consumer).
305- silParamMapping.push_back (param);
305+ if (!param->getInterfaceType ()->isVoid ())
306+ silParamMapping.push_back (param);
306307 }
307308 size_t currentSilParam = 0 ;
308309 for (const auto &abiParam : abiDetails.parameters ) {
Original file line number Diff line number Diff line change @@ -211,6 +211,9 @@ class CFunctionSignatureTypePrinter
211211 if (TT->getNumElements () > 0 )
212212 // FIXME: Handle non-void type.
213213 return ClangRepresentation::unsupported;
214+ // FIXME: how to support `()` parameters.
215+ if (typeUseKind != FunctionSignatureTypeUse::ReturnType)
216+ return ClangRepresentation::unsupported;
214217 os << " void" ;
215218 return ClangRepresentation::representable;
216219 }
Original file line number Diff line number Diff line change 44
55// RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
66
7- // CHECK: takesFloat
8- // CHECK-NOT: takesTuple
7+ // CHECK: takeFloat
8+ // CHECK-NOT: takes
99
10- public func takesFloat ( _ x: Float ) { }
10+ public func takeFloat ( _ x: Float ) { }
1111
1212public func takesTuple( _ x: ( Float , Float ) ) { }
13+
14+ public func takesVoid( _ x: ( ) ) { }
You can’t perform that action at this time.
0 commit comments