@@ -123,8 +123,10 @@ createVarWithPattern(ASTContext &cxt, DeclContext *dc, Identifier name, Type ty,
123123 Accessibility setterAccessibility) {
124124 // Create a variable to store the underlying value.
125125 auto var = new (cxt) VarDecl (
126- /* static*/ false ,
127- /* IsLet*/ isLet, SourceLoc (), name, ty, dc);
126+ /* IsStatic*/ false ,
127+ /* IsLet*/ isLet,
128+ /* IsCaptureList*/ false ,
129+ SourceLoc (), name, ty, dc);
128130 if (isImplicit)
129131 var->setImplicit ();
130132 var->setInterfaceType (ty);
@@ -1191,8 +1193,8 @@ static void makeStructRawValuedWithBridge(
11911193 //
11921194 // Create a computed value variable
11931195 auto computedVar = new (cxt) VarDecl (
1194- /* static */ false ,
1195- /* IsLet */ false , SourceLoc (), computedVarName, bridgedType, structDecl);
1196+ /* IsStatic */ false , /* IsLet */ false , /* IsCaptureList */ false ,
1197+ SourceLoc (), computedVarName, bridgedType, structDecl);
11961198 computedVar->setInterfaceType (bridgedType);
11971199 computedVar->setImplicit ();
11981200 computedVar->setAccessibility (Accessibility::Public);
@@ -1496,8 +1498,8 @@ static bool addErrorDomain(NominalTypeDecl *swiftDecl,
14961498
14971499 // Make the property decl
14981500 auto errorDomainPropertyDecl = new (C) VarDecl (
1499- isStatic,
1500- /* IsLet= */ false , SourceLoc (), C.Id_nsErrorDomain , stringTy, swiftDecl);
1501+ /* IsStatic */ isStatic, /* IsLet */ false , /* IsCaptureList */ false ,
1502+ SourceLoc (), C.Id_nsErrorDomain , stringTy, swiftDecl);
15011503 errorDomainPropertyDecl->setInterfaceType (stringTy);
15021504 errorDomainPropertyDecl->setAccessibility (Accessibility::Public);
15031505
@@ -2195,7 +2197,8 @@ namespace {
21952197 // Create the _nsError member.
21962198 // public let _nsError: NSError
21972199 auto nsErrorType = nsErrorDecl->getDeclaredInterfaceType ();
2198- auto nsErrorProp = new (C) VarDecl (/* static*/ false , /* IsLet*/ true ,
2200+ auto nsErrorProp = new (C) VarDecl (/* IsStatic*/ false , /* IsLet*/ true ,
2201+ /* IsCaptureList*/ false ,
21992202 loc, C.Id_nsError , nsErrorType,
22002203 errorWrapper);
22012204 nsErrorProp->setImplicit ();
@@ -2261,10 +2264,10 @@ namespace {
22612264 auto rawValueConstructor = makeEnumRawValueConstructor (Impl, enumDecl);
22622265
22632266 auto varName = C.Id_rawValue ;
2264- auto rawValue = new (C) VarDecl (/* static */ false ,
2265- /* IsLet */ false ,
2266- SourceLoc (), varName,
2267- underlyingType, enumDecl);
2267+ auto rawValue = new (C) VarDecl (/* IsStatic */ false , /* IsLet */ false ,
2268+ /* IsCaptureList */ false ,
2269+ SourceLoc (), varName, underlyingType ,
2270+ enumDecl);
22682271 rawValue->setImplicit ();
22692272 rawValue->setAccessibility (Accessibility::Public);
22702273 rawValue->setSetterAccessibility (Accessibility::Private);
@@ -2789,7 +2792,8 @@ namespace {
27892792 // Map this indirect field to a Swift variable.
27902793 auto result = Impl.createDeclWithClangNode <VarDecl>(decl,
27912794 Accessibility::Public,
2792- /* static*/ false , /* IsLet*/ false ,
2795+ /* IsStatic*/ false , /* IsLet*/ false ,
2796+ /* IsCaptureList*/ false ,
27932797 Impl.importSourceLoc (decl->getLocStart ()),
27942798 name, type, dc);
27952799 result->setInterfaceType (type);
@@ -2982,7 +2986,8 @@ namespace {
29822986
29832987 auto result =
29842988 Impl.createDeclWithClangNode <VarDecl>(decl, Accessibility::Public,
2985- /* static*/ false , /* IsLet*/ false ,
2989+ /* IsStatic*/ false , /* IsLet*/ false ,
2990+ /* IsCaptureList*/ false ,
29862991 Impl.importSourceLoc (decl->getLocation ()),
29872992 name, type, dc);
29882993 result->setInterfaceType (type);
@@ -3055,8 +3060,10 @@ namespace {
30553060 isStatic = true ;
30563061
30573062 auto result = Impl.createDeclWithClangNode <VarDecl>(decl,
3058- Accessibility::Public, isStatic,
3059- Impl.shouldImportGlobalAsLet (decl->getType ()),
3063+ Accessibility::Public,
3064+ /* IsStatic*/ isStatic,
3065+ /* IsLet*/ Impl.shouldImportGlobalAsLet (decl->getType ()),
3066+ /* IsCaptureList*/ false ,
30603067 Impl.importSourceLoc (decl->getLocation ()),
30613068 name, type, dc);
30623069 result->setInterfaceType (type);
@@ -4115,8 +4122,8 @@ namespace {
41154122
41164123 auto result = Impl.createDeclWithClangNode <VarDecl>(decl,
41174124 getOverridableAccessibility (dc),
4118- decl->isClassProperty (), /* IsLet*/ false ,
4119- Impl.importSourceLoc (decl->getLocation ()),
4125+ /* IsStatic */ decl->isClassProperty (), /* IsLet*/ false ,
4126+ /* IsCaptureList */ false , Impl.importSourceLoc (decl->getLocation ()),
41204127 name, type, dc);
41214128 result->setInterfaceType (dc->mapTypeOutOfContext (type));
41224129
@@ -4989,8 +4996,8 @@ SwiftDeclConverter::getImplicitProperty(ImportedName importedName,
49894996 return nullptr ;
49904997
49914998 auto property = Impl.createDeclWithClangNode <VarDecl>(
4992- getter, Accessibility::Public, isStatic,
4993- /* isLet= */ false , SourceLoc (), propertyName, swiftPropertyType, dc);
4999+ getter, Accessibility::Public, /* IsStatic */ isStatic, /* isLet */ false ,
5000+ /* IsCaptureList */ false , SourceLoc (), propertyName, swiftPropertyType, dc);
49945001 property->setInterfaceType (swiftPropertyType);
49955002
49965003 // Note that we've formed this property.
@@ -7041,11 +7048,13 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
70417048 VarDecl *var = nullptr ;
70427049 if (ClangN) {
70437050 var = createDeclWithClangNode<VarDecl>(ClangN, Accessibility::Public,
7044- isStatic, /* IsLet*/ false ,
7045- SourceLoc (), name, type, dc);
7051+ /* IsStatic*/ isStatic, /* IsLet*/ false ,
7052+ /* IsCaptureList*/ false , SourceLoc (),
7053+ name, type, dc);
70467054 } else {
70477055 var = new (SwiftContext)
7048- VarDecl (isStatic, /* IsLet*/ false , SourceLoc (), name, type, dc);
7056+ VarDecl (/* IsStatic*/ isStatic, /* IsLet*/ false , /* IsCaptureList*/ false ,
7057+ SourceLoc (), name, type, dc);
70497058 }
70507059
70517060 var->setInterfaceType (type);
@@ -7149,7 +7158,9 @@ createUnavailableDecl(Identifier name, DeclContext *dc, Type type,
71497158
71507159 // Create a new VarDecl with dummy type.
71517160 auto var = createDeclWithClangNode<VarDecl>(ClangN, Accessibility::Public,
7152- isStatic, /* IsLet*/ false ,
7161+ /* IsStatic*/ isStatic,
7162+ /* IsLet*/ false ,
7163+ /* IsCaptureList*/ false ,
71537164 SourceLoc (), name, type, dc);
71547165 var->setInterfaceType (type);
71557166 markUnavailable (var, UnavailableMessage);
0 commit comments