Skip to content

Commit bc4998d

Browse files
committed
ClangImporter: Use VariadicSequenceType instead of ArrayType for vararg parameters
1 parent a5f4b1f commit bc4998d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/ClangImporter/ImportType.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,9 +2410,8 @@ ParameterList *ClangImporter::Implementation::importFunctionParameterList(
24102410

24112411
// Append an additional argument to represent varargs.
24122412
if (isVariadic) {
2413-
auto paramTy =
2414-
BoundGenericType::get(SwiftContext.getArrayDecl(), Type(),
2415-
{SwiftContext.getAnyExistentialType()});
2413+
auto paramTy = VariadicSequenceType::get(
2414+
SwiftContext.getAnyExistentialType());
24162415
auto name = SwiftContext.getIdentifier("varargs");
24172416
auto param = new (SwiftContext) ParamDecl(SourceLoc(), SourceLoc(),
24182417
Identifier(), SourceLoc(),

0 commit comments

Comments
 (0)