Skip to content

Commit e71d03c

Browse files
committed
SILGen: explicitly state the constructor in use (NFC)
MSVC found the constructor to be ambiguous here: error C2668: 'swift::Lowering::PreparedArguments::PreparedArguments': ambiguous call to overloaded function note: could be 'swift::Lowering::PreparedArguments::PreparedArguments(swift::Lowering::PreparedArguments &&)' note: or 'swift::Lowering::PreparedArguments::PreparedArguments(llvm::ArrayRef<swift::AnyFunctionType::Param>)' note: while trying to match the argument list '(initializer list)' Explicitly state the constructor in use.
1 parent 27801ce commit e71d03c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILGen/SILGenApply.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ static PreparedArguments emitStringLiteral(SILGenFunction &SGF, Expr *E,
16681668
unicode::extractFirstUnicodeScalar(Str));
16691669

16701670
AnyFunctionType::Param param(Int32Ty.getASTType());
1671-
PreparedArguments args({param});
1671+
PreparedArguments args(llvm::ArrayRef<AnyFunctionType::Param>{param});
16721672
args.add(E, RValue(SGF, E, Int32Ty.getASTType(),
16731673
ManagedValue::forUnmanaged(UnicodeScalarValue)));
16741674
return args;
@@ -4104,7 +4104,7 @@ class CallEmission {
41044104
ArgumentSource &&selfArg,
41054105
AnyFunctionType::Param selfParam,
41064106
CanType methodType) {
4107-
PreparedArguments preparedSelf({selfParam});
4107+
PreparedArguments preparedSelf(llvm::ArrayRef<AnyFunctionType::Param>{selfParam});
41084108
preparedSelf.addArbitrary(std::move(selfArg));
41094109

41104110
addCallSite(loc, std::move(preparedSelf), methodType,

0 commit comments

Comments
 (0)