[AST] Explicitly track things marked __owned.

This commit is contained in:
Huon Wilson
2018-02-27 17:50:11 -08:00
parent ae0027a225
commit e307e54098
48 changed files with 358 additions and 141 deletions

View File

@@ -591,10 +591,10 @@ deriveEquatable_eq(TypeChecker &tc, Decl *parentDecl, NominalTypeDecl *typeDecl,
auto enumTy = parentDC->getDeclaredTypeInContext();
auto enumIfaceTy = parentDC->getDeclaredInterfaceType();
auto getParamDecl = [&](StringRef s) -> ParamDecl* {
auto *param = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(), SourceLoc(),
Identifier(), SourceLoc(), C.getIdentifier(s),
enumTy, parentDC);
auto getParamDecl = [&](StringRef s) -> ParamDecl * {
auto *param = new (C) ParamDecl(VarDecl::Specifier::Default, SourceLoc(),
SourceLoc(), Identifier(), SourceLoc(),
C.getIdentifier(s), enumTy, parentDC);
param->setInterfaceType(enumIfaceTy);
return param;
};