@@ -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);
@@ -2980,7 +2984,8 @@ namespace {
29802984
29812985 auto result =
29822986 Impl.createDeclWithClangNode <VarDecl>(decl, Accessibility::Public,
2983- /* static*/ false , /* IsLet*/ false ,
2987+ /* IsStatic*/ false , /* IsLet*/ false ,
2988+ /* IsCaptureList*/ false ,
29842989 Impl.importSourceLoc (decl->getLocation ()),
29852990 name, type, dc);
29862991 result->setInterfaceType (type);
@@ -3053,8 +3058,10 @@ namespace {
30533058 isStatic = true ;
30543059
30553060 auto result = Impl.createDeclWithClangNode <VarDecl>(decl,
3056- Accessibility::Public, isStatic,
3057- Impl.shouldImportGlobalAsLet (decl->getType ()),
3061+ Accessibility::Public,
3062+ /* IsStatic*/ isStatic,
3063+ /* IsLet*/ Impl.shouldImportGlobalAsLet (decl->getType ()),
3064+ /* IsCaptureList*/ false ,
30583065 Impl.importSourceLoc (decl->getLocation ()),
30593066 name, type, dc);
30603067 result->setInterfaceType (type);
@@ -4113,8 +4120,8 @@ namespace {
41134120
41144121 auto result = Impl.createDeclWithClangNode <VarDecl>(decl,
41154122 getOverridableAccessibility (dc),
4116- decl->isClassProperty (), /* IsLet*/ false ,
4117- Impl.importSourceLoc (decl->getLocation ()),
4123+ /* IsStatic */ decl->isClassProperty (), /* IsLet*/ false ,
4124+ /* IsCaptureList */ false , Impl.importSourceLoc (decl->getLocation ()),
41184125 name, type, dc);
41194126 result->setInterfaceType (dc->mapTypeOutOfContext (type));
41204127
@@ -4987,8 +4994,8 @@ SwiftDeclConverter::getImplicitProperty(ImportedName importedName,
49874994 return nullptr ;
49884995
49894996 auto property = Impl.createDeclWithClangNode <VarDecl>(
4990- getter, Accessibility::Public, isStatic,
4991- /* isLet= */ false , SourceLoc (), propertyName, swiftPropertyType, dc);
4997+ getter, Accessibility::Public, /* IsStatic */ isStatic, /* isLet */ false ,
4998+ /* IsCaptureList */ false , SourceLoc (), propertyName, swiftPropertyType, dc);
49924999 property->setInterfaceType (swiftPropertyType);
49935000
49945001 // Note that we've formed this property.
@@ -7039,11 +7046,13 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
70397046 VarDecl *var = nullptr ;
70407047 if (ClangN) {
70417048 var = createDeclWithClangNode<VarDecl>(ClangN, Accessibility::Public,
7042- isStatic, /* IsLet*/ false ,
7043- SourceLoc (), name, type, dc);
7049+ /* IsStatic*/ isStatic, /* IsLet*/ false ,
7050+ /* IsCaptureList*/ false , SourceLoc (),
7051+ name, type, dc);
70447052 } else {
70457053 var = new (SwiftContext)
7046- VarDecl (isStatic, /* IsLet*/ false , SourceLoc (), name, type, dc);
7054+ VarDecl (/* IsStatic*/ isStatic, /* IsLet*/ false , /* IsCaptureList*/ false ,
7055+ SourceLoc (), name, type, dc);
70477056 }
70487057
70497058 var->setInterfaceType (type);
@@ -7147,7 +7156,9 @@ createUnavailableDecl(Identifier name, DeclContext *dc, Type type,
71477156
71487157 // Create a new VarDecl with dummy type.
71497158 auto var = createDeclWithClangNode<VarDecl>(ClangN, Accessibility::Public,
7150- isStatic, /* IsLet*/ false ,
7159+ /* IsStatic*/ isStatic,
7160+ /* IsLet*/ false ,
7161+ /* IsCaptureList*/ false ,
71517162 SourceLoc (), name, type, dc);
71527163 var->setInterfaceType (type);
71537164 markUnavailable (var, UnavailableMessage);
0 commit comments