Skip to content

Commit 768ac78

Browse files
authored
Merge pull request #27295 from CodaFi/sign-on-the-dotted-line
[NFC] Remove unnecessary validation noise
2 parents 7f036f4 + aad82fd commit 768ac78

File tree

5 files changed

+1
-30
lines changed

5 files changed

+1
-30
lines changed

lib/AST/ConformanceLookupTable.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -795,16 +795,6 @@ ConformanceLookupTable::getConformance(NominalTypeDecl *nominal,
795795
if (!conformingDC)
796796
return nullptr;
797797

798-
// Everything about this conformance is nailed down, so we can now ensure that
799-
// the extension is fully resolved.
800-
if (auto resolver = nominal->getASTContext().getLazyResolver()) {
801-
if (auto ext = dyn_cast<ExtensionDecl>(conformingDC)) {
802-
resolver->resolveDeclSignature(ext->getExtendedNominal());
803-
} else {
804-
resolver->resolveDeclSignature(cast<NominalTypeDecl>(conformingDC));
805-
}
806-
}
807-
808798
auto *conformingNominal = conformingDC->getSelfNominalTypeDecl();
809799

810800
// Form the conformance.

lib/IRGen/GenProto.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,11 +2959,6 @@ NecessaryBindings::forFunctionInvocations(IRGenModule &IGM,
29592959
GenericTypeRequirements::GenericTypeRequirements(IRGenModule &IGM,
29602960
NominalTypeDecl *typeDecl)
29612961
: TheDecl(typeDecl) {
2962-
2963-
// FIXME: Remove this once getGenericSignature() is a request.
2964-
if (!typeDecl->hasInterfaceType())
2965-
IGM.Context.getLazyResolver()->resolveDeclSignature(typeDecl);
2966-
29672962
// We only need to do something here if the declaration context is
29682963
// somehow generic.
29692964
auto ncGenerics = typeDecl->getGenericSignatureOfContext();

lib/Sema/CodeSynthesis.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,11 +1079,6 @@ static void addImplicitConstructorsToClass(ClassDecl *decl, ASTContext &ctx) {
10791079
? DesignatedInitKind::Chaining
10801080
: DesignatedInitKind::Stub;
10811081

1082-
// We have a designated initializer. Create an override of it.
1083-
// FIXME: Validation makes sure we get a generic signature here.
1084-
if (!decl->hasInterfaceType())
1085-
ctx.getLazyResolver()->resolveDeclSignature(decl);
1086-
10871082
if (auto ctor = createDesignatedInitOverride(
10881083
decl, superclassCtor, kind, ctx)) {
10891084
decl->addMember(ctor);

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,11 +2205,7 @@ ConformanceChecker::ConformanceChecker(
22052205
Conformance(conformance), Loc(conformance->getLoc()),
22062206
GlobalMissingWitnesses(GlobalMissingWitnesses),
22072207
LocalMissingWitnessesStartIndex(GlobalMissingWitnesses.size()),
2208-
SuppressDiagnostics(suppressDiagnostics) {
2209-
// The protocol may have only been validatedDeclForNameLookup'd until
2210-
// here, so fill in any information that's missing.
2211-
tc.validateDecl(conformance->getProtocol());
2212-
}
2208+
SuppressDiagnostics(suppressDiagnostics) { }
22132209

22142210
ArrayRef<AssociatedTypeDecl *>
22152211
ConformanceChecker::getReferencedAssociatedTypes(ValueDecl *req) {

lib/Sema/TypeCheckProtocolInference.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,6 @@ AssociatedTypeInference::inferTypeWitnessesViaValueWitnesses(
189189
if (extendedNominal == nullptr)
190190
return true;
191191

192-
// Validate the nominal type being extended.
193-
tc.validateDecl(extendedNominal);
194-
if (extendedNominal->isInvalid())
195-
return true;
196-
197192
// Assume unconstrained concrete extensions we found witnesses in are
198193
// always viable.
199194
if (!isa<ProtocolDecl>(extendedNominal))

0 commit comments

Comments
 (0)