@@ -137,7 +137,6 @@ createVarWithPattern(ASTContext &ctx, DeclContext *dc, Identifier name, Type ty,
137
137
if (isImplicit)
138
138
var->setImplicit ();
139
139
var->setInterfaceType (ty);
140
- var->setValidationToChecked ();
141
140
var->setAccess (access);
142
141
var->setSetterAccess (setterAccess);
143
142
@@ -528,7 +527,6 @@ makeEnumRawValueConstructor(ClangImporter::Implementation &Impl,
528
527
SourceLoc (), C.Id_rawValue ,
529
528
enumDecl);
530
529
param->setInterfaceType (rawTy);
531
- param->setValidationToChecked ();
532
530
533
531
auto paramPL = ParameterList::createWithoutLoc (param);
534
532
@@ -543,7 +541,6 @@ makeEnumRawValueConstructor(ClangImporter::Implementation &Impl,
543
541
ctorDecl->setAccess (AccessLevel::Public);
544
542
545
543
ctorDecl->computeType ();
546
- ctorDecl->setValidationToChecked ();
547
544
ctorDecl->setBodySynthesizer (synthesizeEnumRawValueConstructorBody, enumDecl);
548
545
return ctorDecl;
549
546
}
@@ -620,7 +617,6 @@ static void makeEnumRawValueGetter(ClangImporter::Implementation &Impl,
620
617
getterDecl->setIsTransparent (false );
621
618
622
619
getterDecl->computeType ();
623
- getterDecl->setValidationToChecked ();
624
620
625
621
getterDecl->setAccess (AccessLevel::Public);
626
622
getterDecl->setBodySynthesizer (synthesizeEnumRawValueGetterBody, enumDecl);
@@ -702,7 +698,6 @@ static AccessorDecl *makeStructRawValueGetter(
702
698
getterDecl->setIsTransparent (false );
703
699
704
700
getterDecl->computeType ();
705
- getterDecl->setValidationToChecked ();
706
701
707
702
getterDecl->setAccess (AccessLevel::Public);
708
703
getterDecl->setBodySynthesizer (synthesizeStructRawValueGetterBody, storedVar);
@@ -734,7 +729,6 @@ static AccessorDecl *makeFieldGetterDecl(ClangImporter::Implementation &Impl,
734
729
getterDecl->setIsDynamic (false );
735
730
736
731
getterDecl->computeType ();
737
- getterDecl->setValidationToChecked ();
738
732
739
733
return getterDecl;
740
734
}
@@ -771,7 +765,6 @@ static AccessorDecl *makeFieldSetterDecl(ClangImporter::Implementation &Impl,
771
765
setterDecl->setAccess (AccessLevel::Public);
772
766
773
767
setterDecl->computeType ();
774
- setterDecl->setValidationToChecked ();
775
768
776
769
return setterDecl;
777
770
}
@@ -1316,7 +1309,6 @@ createDefaultConstructor(ClangImporter::Implementation &Impl,
1316
1309
1317
1310
// Set the constructor's type.
1318
1311
constructor->computeType ();
1319
- constructor->setValidationToChecked ();
1320
1312
1321
1313
constructor->setAccess (AccessLevel::Public);
1322
1314
@@ -1429,7 +1421,6 @@ createValueConstructor(ClangImporter::Implementation &Impl,
1429
1421
ParamDecl (ParamDecl::Specifier::Default, SourceLoc (), SourceLoc (), argName,
1430
1422
SourceLoc (), var->getName (), structDecl);
1431
1423
param->setInterfaceType (var->getInterfaceType ());
1432
- param->setValidationToChecked ();
1433
1424
Impl.recordImplicitUnwrapForDecl (param, var->isImplicitlyUnwrappedOptional ());
1434
1425
valueParameters.push_back (param);
1435
1426
}
@@ -1446,7 +1437,6 @@ createValueConstructor(ClangImporter::Implementation &Impl,
1446
1437
1447
1438
// Set the constructor's type.
1448
1439
constructor->computeType ();
1449
- constructor->setValidationToChecked ();
1450
1440
1451
1441
constructor->setAccess (AccessLevel::Public);
1452
1442
@@ -1488,7 +1478,6 @@ static void addSynthesizedTypealias(NominalTypeDecl *nominal, Identifier name,
1488
1478
nullptr , nominal);
1489
1479
typealias->setUnderlyingType (underlyingType);
1490
1480
typealias->setAccess (AccessLevel::Public);
1491
- typealias->setValidationToChecked ();
1492
1481
typealias->setImplicit ();
1493
1482
typealias->computeType ();
1494
1483
@@ -1664,7 +1653,6 @@ static void makeStructRawValuedWithBridge(
1664
1653
computedVar->setImplicit ();
1665
1654
computedVar->setAccess (AccessLevel::Public);
1666
1655
computedVar->setSetterAccess (AccessLevel::Private);
1667
- computedVar->setValidationToChecked ();
1668
1656
1669
1657
// Create the getter for the computed value variable.
1670
1658
auto computedVarGetter = makeStructRawValueGetter (
@@ -1727,7 +1715,6 @@ buildSubscriptGetterDecl(ClangImporter::Implementation &Impl,
1727
1715
1728
1716
thunk->setGenericSignature (dc->getGenericSignatureOfContext ());
1729
1717
thunk->computeType ();
1730
- thunk->setValidationToChecked ();
1731
1718
1732
1719
thunk->setAccess (getOverridableAccessLevel (dc));
1733
1720
@@ -1762,7 +1749,6 @@ buildSubscriptSetterDecl(ClangImporter::Implementation &Impl,
1762
1749
new (C) ParamDecl (ParamDecl::Specifier::Default, SourceLoc (), SourceLoc (),
1763
1750
Identifier (), loc, valueIndex->get (0 )->getName (), dc);
1764
1751
paramVarDecl->setInterfaceType (elementInterfaceTy);
1765
- paramVarDecl->setValidationToChecked ();
1766
1752
1767
1753
auto valueIndicesPL = ParameterList::create (C, {paramVarDecl, index});
1768
1754
@@ -1782,7 +1768,6 @@ buildSubscriptSetterDecl(ClangImporter::Implementation &Impl,
1782
1768
setter->getClangNode ());
1783
1769
thunk->setGenericSignature (dc->getGenericSignatureOfContext ());
1784
1770
thunk->computeType ();
1785
- thunk->setValidationToChecked ();
1786
1771
1787
1772
thunk->setAccess (getOverridableAccessLevel (dc));
1788
1773
@@ -1951,7 +1936,6 @@ static bool addErrorDomain(NominalTypeDecl *swiftDecl,
1951
1936
/* IsStatic*/ isStatic, VarDecl::Introducer::Var, /* IsCaptureList*/ false ,
1952
1937
SourceLoc (), C.Id_errorDomain , swiftDecl);
1953
1938
errorDomainPropertyDecl->setInterfaceType (stringTy);
1954
- errorDomainPropertyDecl->setValidationToChecked ();
1955
1939
errorDomainPropertyDecl->setAccess (AccessLevel::Public);
1956
1940
1957
1941
auto *params = ParameterList::createEmpty (C);
@@ -1970,7 +1954,6 @@ static bool addErrorDomain(NominalTypeDecl *swiftDecl,
1970
1954
TypeLoc::withoutLoc (stringTy), swiftDecl);
1971
1955
getterDecl->setStatic (isStatic);
1972
1956
getterDecl->computeType ();
1973
- getterDecl->setValidationToChecked ();
1974
1957
getterDecl->setIsObjC (false );
1975
1958
getterDecl->setIsDynamic (false );
1976
1959
getterDecl->setIsTransparent (false );
@@ -2561,7 +2544,6 @@ namespace {
2561
2544
/* genericparams*/ nullptr , DC);
2562
2545
typealias->setUnderlyingType (
2563
2546
underlying->getDeclaredInterfaceType ());
2564
- typealias->setValidationToChecked ();
2565
2547
typealias->computeType ();
2566
2548
2567
2549
Impl.SpecialTypedefNames [Decl->getCanonicalDecl ()] =
@@ -2582,7 +2564,6 @@ namespace {
2582
2564
/* genericparams*/ nullptr , DC);
2583
2565
typealias->setUnderlyingType (
2584
2566
Impl.SwiftContext .getAnyObjectType ());
2585
- typealias->setValidationToChecked ();
2586
2567
typealias->computeType ();
2587
2568
2588
2569
Impl.SpecialTypedefNames [Decl->getCanonicalDecl ()] =
@@ -2651,7 +2632,6 @@ namespace {
2651
2632
Loc,
2652
2633
/* genericparams*/ nullptr , DC);
2653
2634
Result->setUnderlyingType (SwiftType);
2654
- Result->setValidationToChecked ();
2655
2635
Result->computeType ();
2656
2636
2657
2637
// Make Objective-C's 'id' unavailable.
@@ -2805,7 +2785,6 @@ namespace {
2805
2785
// Create the wrapper struct.
2806
2786
errorWrapper = new (C) StructDecl (loc, name, loc, None, nullptr , dc);
2807
2787
errorWrapper->computeType ();
2808
- errorWrapper->setValidationToChecked ();
2809
2788
errorWrapper->setAddedImplicitInitializers ();
2810
2789
errorWrapper->setAccess (AccessLevel::Public);
2811
2790
errorWrapper->getAttrs ().add (
@@ -2840,7 +2819,6 @@ namespace {
2840
2819
nsErrorProp->setImplicit ();
2841
2820
nsErrorProp->setAccess (AccessLevel::Public);
2842
2821
nsErrorProp->setInterfaceType (nsErrorType);
2843
- nsErrorProp->setValidationToChecked ();
2844
2822
2845
2823
// Create a pattern binding to describe the variable.
2846
2824
Pattern *nsErrorPattern = createTypedNamedPattern (nsErrorProp);
@@ -2918,7 +2896,6 @@ namespace {
2918
2896
rawValue->setAccess (AccessLevel::Public);
2919
2897
rawValue->setSetterAccess (AccessLevel::Private);
2920
2898
rawValue->setInterfaceType (underlyingType);
2921
- rawValue->setValidationToChecked ();
2922
2899
2923
2900
// Create a pattern binding to describe the variable.
2924
2901
Pattern *varPattern = createTypedNamedPattern (rawValue);
@@ -2947,7 +2924,6 @@ namespace {
2947
2924
C.Id_ErrorType , loc,
2948
2925
/* genericparams=*/ nullptr , enumDecl);
2949
2926
alias->setUnderlyingType (errorWrapper->getDeclaredInterfaceType ());
2950
- alias->setValidationToChecked ();
2951
2927
alias->computeType ();
2952
2928
enumDecl->addMember (alias);
2953
2929
@@ -3775,7 +3751,6 @@ namespace {
3775
3751
result->setIsObjC (false );
3776
3752
result->setIsDynamic (false );
3777
3753
result->computeType ();
3778
- result->setValidationToChecked ();
3779
3754
3780
3755
Impl.recordImplicitUnwrapForDecl (result,
3781
3756
importedType.isImplicitlyUnwrapped ());
@@ -4033,7 +4008,6 @@ namespace {
4033
4008
Loc,
4034
4009
/* genericparams*/ nullptr , DC);
4035
4010
Result->setUnderlyingType (SwiftTypeDecl->getDeclaredInterfaceType ());
4036
- Result->setValidationToChecked ();
4037
4011
Result->computeType ();
4038
4012
4039
4013
return Result;
@@ -4364,7 +4338,6 @@ namespace {
4364
4338
4365
4339
// Compute the interface type.
4366
4340
result->computeType ();
4367
- result->setValidationToChecked ();
4368
4341
4369
4342
Impl.recordImplicitUnwrapForDecl (result, isIUO);
4370
4343
@@ -4572,7 +4545,6 @@ namespace {
4572
4545
SmallVector<TypeLoc, 4 > inheritedTypes;
4573
4546
importObjCProtocols (result, decl->getReferencedProtocols (),
4574
4547
inheritedTypes);
4575
- result->setValidationToChecked ();
4576
4548
result->setInherited (Impl.SwiftContext .AllocateCopy (inheritedTypes));
4577
4549
result->setMemberLoader (&Impl, 0 );
4578
4550
@@ -5169,7 +5141,6 @@ namespace {
5169
5141
}
5170
5142
5171
5143
typealias->setUnderlyingType (typeDecl->getDeclaredInterfaceType ());
5172
- typealias->setValidationToChecked ();
5173
5144
typealias->computeType ();
5174
5145
return typealias;
5175
5146
}
@@ -5406,7 +5377,6 @@ Decl *SwiftDeclConverter::importCompatibilityTypeAlias(
5406
5377
}
5407
5378
5408
5379
alias->setUnderlyingType (typeDecl->getDeclaredInterfaceType ());
5409
- alias->setValidationToChecked ();
5410
5380
alias->computeType ();
5411
5381
5412
5382
// Record that this is the official version of this declaration.
@@ -5816,7 +5786,6 @@ Decl *SwiftDeclConverter::importGlobalAsInitializer(
5816
5786
ParamDecl::Specifier::Default, SourceLoc (), SourceLoc (), argNames.front (),
5817
5787
SourceLoc (), argNames.front (), dc);
5818
5788
paramDecl->setInterfaceType (Impl.SwiftContext .TheEmptyTupleType );
5819
- paramDecl->setValidationToChecked ();
5820
5789
5821
5790
parameterList = ParameterList::createWithoutLoc (paramDecl);
5822
5791
} else {
@@ -8138,7 +8107,6 @@ ClangImporter::Implementation::importDeclContextOf(
8138
8107
nominal->getDeclaredType ());
8139
8108
SwiftContext.evaluator .cacheOutput (ExtendedNominalRequest{ext},
8140
8109
std::move (nominal));
8141
- ext->setValidationToChecked ();
8142
8110
ext->setMemberLoader (this , reinterpret_cast <uintptr_t >(declSubmodule));
8143
8111
8144
8112
if (auto protoDecl = ext->getExtendedProtocolDecl ()) {
@@ -8384,7 +8352,6 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
8384
8352
var = new (SwiftContext)
8385
8353
VarDecl (/* IsStatic*/ isStatic, VarDecl::Introducer::Var,
8386
8354
/* IsCaptureList*/ false , SourceLoc (), name, dc);
8387
- var->setValidationToChecked ();
8388
8355
}
8389
8356
8390
8357
var->setInterfaceType (type);
@@ -8409,7 +8376,6 @@ ClangImporter::Implementation::createConstant(Identifier name, DeclContext *dc,
8409
8376
func->setStatic (isStatic);
8410
8377
func->computeType ();
8411
8378
func->setAccess (getOverridableAccessLevel (dc));
8412
- func->setValidationToChecked ();
8413
8379
func->setIsObjC (false );
8414
8380
func->setIsDynamic (false );
8415
8381
0 commit comments