@@ -2440,7 +2440,6 @@ namespace {
2440
2440
auto structDecl = Impl.createDeclWithClangNode <StructDecl>(decl,
2441
2441
AccessLevel::Public, Loc, name, Loc, None, nullptr , dc);
2442
2442
structDecl->computeType ();
2443
- structDecl->setValidationStarted ();
2444
2443
structDecl->setCheckedInheritanceClause ();
2445
2444
2446
2445
auto options = getDefaultMakeStructRawValuedOptions ();
@@ -2544,7 +2543,6 @@ namespace {
2544
2543
decl, AccessLevel::Public, loc, enumName,
2545
2544
Impl.importSourceLoc (decl->getLocation ()), None, nullptr , enumDC);
2546
2545
enumDecl->computeType ();
2547
- enumDecl->setValidationStarted ();
2548
2546
2549
2547
// Set up the C underlying type as its Swift raw type.
2550
2548
enumDecl->setRawType (underlyingType);
@@ -2883,7 +2881,6 @@ namespace {
2883
2881
Impl.importSourceLoc (decl->getLocation ()),
2884
2882
None, nullptr , dc);
2885
2883
result->computeType ();
2886
- result->setValidationStarted ();
2887
2884
Impl.ImportedDecls [{decl->getCanonicalDecl (), getVersion ()}] = result;
2888
2885
2889
2886
// FIXME: Figure out what to do with superclasses in C++. One possible
@@ -3203,7 +3200,6 @@ namespace {
3203
3200
Impl.importSourceLoc (decl->getLocStart ()),
3204
3201
name, dc->mapTypeIntoContext (type), dc);
3205
3202
result->setInterfaceType (type);
3206
- result->setValidationStarted ();
3207
3203
3208
3204
// If this is a compatibility stub, mark is as such.
3209
3205
if (correctSwiftName)
@@ -3427,7 +3423,6 @@ namespace {
3427
3423
Impl.importSourceLoc (decl->getLocation ()),
3428
3424
name, dc->mapTypeIntoContext (type), dc);
3429
3425
result->setInterfaceType (type);
3430
- result->setValidationStarted ();
3431
3426
3432
3427
// Handle attributes.
3433
3428
if (decl->hasAttr <clang::IBOutletAttr>())
@@ -3507,7 +3502,6 @@ namespace {
3507
3502
Impl.importSourceLoc (decl->getLocation ()),
3508
3503
name, dc->mapTypeIntoContext (type), dc);
3509
3504
result->setInterfaceType (type);
3510
- result->setValidationStarted ();
3511
3505
3512
3506
// If imported as member, the member should be final.
3513
3507
if (dc->getAsClassOrClassExtensionContext ())
@@ -4190,7 +4184,6 @@ namespace {
4190
4184
Impl.importSourceLoc (decl->getLocation ()), name, None,
4191
4185
/* TrailingWhere=*/ nullptr );
4192
4186
result->computeType ();
4193
- result->setValidationStarted ();
4194
4187
4195
4188
// FIXME: Kind of awkward that we have to do this here
4196
4189
result->getGenericParams ()->getParams ()[0 ]->setDepth (0 );
@@ -4253,7 +4246,6 @@ namespace {
4253
4246
SourceLoc (), None,
4254
4247
nullptr , dc);
4255
4248
result->computeType ();
4256
- result->setValidationStarted ();
4257
4249
Impl.ImportedDecls [{decl->getCanonicalDecl (), getVersion ()}] = result;
4258
4250
result->setCircularityCheck (CircularityCheck::Checked);
4259
4251
result->setSuperclass (Type ());
@@ -4354,7 +4346,6 @@ namespace {
4354
4346
}
4355
4347
4356
4348
result->computeType ();
4357
- result->setValidationStarted ();
4358
4349
4359
4350
Impl.ImportedDecls [{decl->getCanonicalDecl (), getVersion ()}] = result;
4360
4351
result->setCircularityCheck (CircularityCheck::Checked);
@@ -4595,7 +4586,6 @@ namespace {
4595
4586
/* IsCaptureList*/ false , Impl.importSourceLoc (decl->getLocation ()),
4596
4587
name, dc->mapTypeIntoContext (type), dc);
4597
4588
result->setInterfaceType (type);
4598
- result->setValidationStarted ();
4599
4589
4600
4590
// Turn this into a computed property.
4601
4591
// FIXME: Fake locations for '{' and '}'?
@@ -4812,7 +4802,6 @@ SwiftDeclConverter::importCFClassType(const clang::TypedefNameDecl *decl,
4812
4802
decl, AccessLevel::Public, SourceLoc (), className, SourceLoc (), None,
4813
4803
nullptr , dc);
4814
4804
theClass->computeType ();
4815
- theClass->setValidationStarted ();
4816
4805
theClass->setCircularityCheck (CircularityCheck::Checked);
4817
4806
theClass->setSuperclass (superclass);
4818
4807
theClass->setAddedImplicitInitializers (); // suppress all initializers
@@ -4988,7 +4977,6 @@ SwiftDeclConverter::importSwiftNewtype(const clang::TypedefNameDecl *decl,
4988
4977
auto structDecl = Impl.createDeclWithClangNode <StructDecl>(
4989
4978
decl, AccessLevel::Public, Loc, name, Loc, None, nullptr , dc);
4990
4979
structDecl->computeType ();
4991
- structDecl->setValidationStarted ();
4992
4980
structDecl->setCheckedInheritanceClause ();
4993
4981
4994
4982
// Import the type of the underlying storage
@@ -5146,7 +5134,6 @@ Decl *SwiftDeclConverter::importEnumCase(const clang::EnumConstantDecl *decl,
5146
5134
5147
5135
// Give the enum element the appropriate type.
5148
5136
element->computeType ();
5149
- element->setValidationStarted ();
5150
5137
5151
5138
Impl.importAttributes (decl, element);
5152
5139
@@ -5238,7 +5225,6 @@ SwiftDeclConverter::importAsOptionSetType(DeclContext *dc, Identifier name,
5238
5225
auto structDecl = Impl.createDeclWithClangNode <StructDecl>(
5239
5226
decl, AccessLevel::Public, Loc, name, Loc, None, nullptr , dc);
5240
5227
structDecl->computeType ();
5241
- structDecl->setValidationStarted ();
5242
5228
structDecl->setCheckedInheritanceClause ();
5243
5229
5244
5230
makeStructRawValued (Impl, structDecl, underlyingType,
@@ -5320,7 +5306,6 @@ Decl *SwiftDeclConverter::importGlobalAsInitializer(
5320
5306
Type selfMetaType = MetatypeType::get (selfType->getInOutObjectType ());
5321
5307
Type allocType = FunctionType::get (selfMetaType, fnType);
5322
5308
result->setInterfaceType (allocType);
5323
- result->setValidationStarted ();
5324
5309
5325
5310
finishFuncDecl (decl, result);
5326
5311
if (correctSwiftName)
@@ -5561,7 +5546,6 @@ SwiftDeclConverter::getImplicitProperty(ImportedName importedName,
5561
5546
VarDecl::Specifier::Var, /* IsCaptureList*/ false , SourceLoc (),
5562
5547
propertyName, dc->mapTypeIntoContext (swiftPropertyType), dc);
5563
5548
property->setInterfaceType (swiftPropertyType);
5564
- property->setValidationStarted ();
5565
5549
5566
5550
// Note that we've formed this property.
5567
5551
Impl.FunctionsAsProperties [getter] = property;
@@ -5937,7 +5921,6 @@ ConstructorDecl *SwiftDeclConverter::importConstructor(
5937
5921
result->setInitializerInterfaceType (interfaceInitType);
5938
5922
result->setInterfaceType (interfaceAllocType);
5939
5923
result->setGenericEnvironment (dc->getGenericEnvironmentOfContext ());
5940
- result->setValidationStarted ();
5941
5924
5942
5925
if (implicit)
5943
5926
result->setImplicit ();
@@ -6335,7 +6318,6 @@ SwiftDeclConverter::importSubscript(Decl *decl,
6335
6318
else
6336
6319
fnType = FunctionType::get (indicesType, elementTy);
6337
6320
subscript->setInterfaceType (fnType);
6338
- subscript->setValidationStarted ();
6339
6321
6340
6322
addObjCAttribute (subscript, None);
6341
6323
@@ -7897,10 +7879,10 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
7897
7879
var = new (SwiftContext)
7898
7880
VarDecl (/* IsStatic*/ isStatic, VarDecl::Specifier::Var, /* IsCaptureList*/ false ,
7899
7881
SourceLoc (), name, dc->mapTypeIntoContext (type), dc);
7882
+ var->setValidationStarted ();
7900
7883
}
7901
7884
7902
7885
var->setInterfaceType (type);
7903
- var->setValidationStarted ();
7904
7886
7905
7887
// Form the argument patterns.
7906
7888
SmallVector<ParameterList*, 3 > getterArgs;
@@ -8008,7 +7990,6 @@ createUnavailableDecl(Identifier name, DeclContext *dc, Type type,
8008
7990
/* IsCaptureList*/ false ,
8009
7991
SourceLoc (), name, type, dc);
8010
7992
var->setInterfaceType (type);
8011
- var->setValidationStarted ();
8012
7993
markUnavailable (var, UnavailableMessage);
8013
7994
8014
7995
return var;
0 commit comments