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:
Huon Wilson
2018-03-07 13:15:12 +11:00
parent 38029bab2a
commit b1115af1eb
9 changed files with 48 additions and 60 deletions

View File

@@ -74,10 +74,9 @@ static void deriveRawValueInit(AbstractFunctionDecl *initDecl) {
DeclNameLoc(), /*Implicit=*/true);
// rawValue param to init(rawValue:)
auto *rawValueDecl = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(),
SourceLoc(), C.Id_rawValue,
SourceLoc(), C.Id_rawValue,
valueParam->getType(), parentDC);
auto *rawValueDecl = new (C) ParamDecl(
VarDecl::Specifier::Default, SourceLoc(), SourceLoc(), C.Id_rawValue,
SourceLoc(), C.Id_rawValue, valueParam->getType(), parentDC);
rawValueDecl->setInterfaceType(C.getIntDecl()->getDeclaredType());
rawValueDecl->setImplicit();
auto *paramList = ParameterList::createWithoutLoc(rawValueDecl);
@@ -124,9 +123,9 @@ static ValueDecl *deriveInitDecl(TypeChecker &tc, Decl *parentDecl,
auto *parentDC = cast<DeclContext>(parentDecl);
// rawValue
auto *rawDecl = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(), SourceLoc(),
paramName, SourceLoc(), paramName,
paramType, parentDC);
auto *rawDecl =
new (C) ParamDecl(VarDecl::Specifier::Default, SourceLoc(), SourceLoc(),
paramName, SourceLoc(), paramName, paramType, parentDC);
rawDecl->setInterfaceType(paramType);
rawDecl->setImplicit();