mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Switch a pile of VarDecl::Specifier::Owneds to ::Default.
A lot of these probably should be Owned, but deciding that is work for another time.
This commit is contained in:
@@ -484,9 +484,9 @@ static CallExpr *createContainerKeyedByCall(ASTContext &C, DeclContext *DC,
|
||||
Expr *base, Type returnType,
|
||||
NominalTypeDecl *param) {
|
||||
// (keyedBy:)
|
||||
auto *keyedByDecl = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(),
|
||||
SourceLoc(), C.Id_keyedBy, SourceLoc(),
|
||||
C.Id_keyedBy, returnType, DC);
|
||||
auto *keyedByDecl = new (C)
|
||||
ParamDecl(VarDecl::Specifier::Default, SourceLoc(), SourceLoc(),
|
||||
C.Id_keyedBy, SourceLoc(), C.Id_keyedBy, returnType, DC);
|
||||
keyedByDecl->setImplicit();
|
||||
keyedByDecl->setInterfaceType(returnType);
|
||||
|
||||
@@ -727,9 +727,9 @@ static FuncDecl *deriveEncodable_encode(TypeChecker &tc, Decl *parentDecl,
|
||||
|
||||
// Params: (self [implicit], Encoder)
|
||||
auto *selfDecl = ParamDecl::createSelf(SourceLoc(), target);
|
||||
auto *encoderParam = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(),
|
||||
SourceLoc(), C.Id_to, SourceLoc(),
|
||||
C.Id_encoder, encoderType, target);
|
||||
auto *encoderParam = new (C)
|
||||
ParamDecl(VarDecl::Specifier::Default, SourceLoc(), SourceLoc(), C.Id_to,
|
||||
SourceLoc(), C.Id_encoder, encoderType, target);
|
||||
encoderParam->setInterfaceType(encoderType);
|
||||
|
||||
ParameterList *params[] = {ParameterList::createWithoutLoc(selfDecl),
|
||||
@@ -1065,11 +1065,9 @@ static ValueDecl *deriveDecodable_init(TypeChecker &tc, Decl *parentDecl,
|
||||
auto *selfDecl = ParamDecl::createSelf(SourceLoc(), target,
|
||||
/*isStatic=*/false,
|
||||
/*isInOut=*/inOut);
|
||||
auto *decoderParamDecl = new (C) ParamDecl(VarDecl::Specifier::Owned,
|
||||
SourceLoc(),
|
||||
SourceLoc(), C.Id_from,
|
||||
SourceLoc(), C.Id_decoder,
|
||||
decoderType, target);
|
||||
auto *decoderParamDecl = new (C)
|
||||
ParamDecl(VarDecl::Specifier::Default, SourceLoc(), SourceLoc(),
|
||||
C.Id_from, SourceLoc(), C.Id_decoder, decoderType, target);
|
||||
decoderParamDecl->setImplicit();
|
||||
decoderParamDecl->setInterfaceType(decoderType);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user