@@ -1356,8 +1356,8 @@ static bool isAcceptableLookupResult(const DeclContext *dc,
13561356 return true ;
13571357}
13581358
1359- bool namelookup::finishLookup (const DeclContext *dc, NLOptions options,
1360- SmallVectorImpl<ValueDecl *> &decls) {
1359+ void namelookup::pruneLookupResultSet (const DeclContext *dc, NLOptions options,
1360+ SmallVectorImpl<ValueDecl *> &decls) {
13611361 // If we're supposed to remove overridden declarations, do so now.
13621362 if (options & NL_RemoveOverridden)
13631363 removeOverriddenDecls (decls);
@@ -1368,9 +1368,6 @@ bool namelookup::finishLookup(const DeclContext *dc, NLOptions options,
13681368 removeShadowedDecls (decls, M);
13691369
13701370 filterForDiscriminator (decls, M->getDebugClient ());
1371-
1372- // We're done. Report success/failure.
1373- return !decls.empty ();
13741371}
13751372
13761373// / Inspect the given type to determine which nominal type declarations it
@@ -1574,7 +1571,13 @@ bool DeclContext::lookupQualified(ArrayRef<NominalTypeDecl *> typeDecls,
15741571 }
15751572 }
15761573
1577- return finishLookup (this , options, decls);
1574+ pruneLookupResultSet (this , options, decls);
1575+ if (auto *debugClient = this ->getParentModule ()->getDebugClient ()) {
1576+ debugClient->finishLookupInNominals (this , typeDecls, member, options,
1577+ decls);
1578+ }
1579+ // We're done. Report success/failure.
1580+ return !decls.empty ();
15781581}
15791582
15801583bool DeclContext::lookupQualified (ModuleDecl *module , DeclName member,
@@ -1626,7 +1629,13 @@ bool DeclContext::lookupQualified(ModuleDecl *module, DeclName member,
16261629 return !knownDecls.insert (vd).second ;
16271630 }), decls.end ());
16281631
1629- return finishLookup (this , options, decls);
1632+ pruneLookupResultSet (this , options, decls);
1633+
1634+ if (auto *debugClient = this ->getParentModule ()->getDebugClient ()) {
1635+ debugClient->finishLookupInModule (this , module , member, options, decls);
1636+ }
1637+ // We're done. Report success/failure.
1638+ return !decls.empty ();
16301639}
16311640
16321641bool DeclContext::lookupAnyObject (DeclName member, NLOptions options,
@@ -1681,7 +1690,12 @@ bool DeclContext::lookupAnyObject(DeclName member, NLOptions options,
16811690 decls.push_back (decl);
16821691 }
16831692
1684- return finishLookup (this , options, decls);
1693+ pruneLookupResultSet (this , options, decls);
1694+ if (auto *debugClient = this ->getParentModule ()->getDebugClient ()) {
1695+ debugClient->finishLookupInAnyObject (this , member, options, decls);
1696+ }
1697+ // We're done. Report success/failure.
1698+ return !decls.empty ();
16851699}
16861700
16871701void DeclContext::lookupAllObjCMethods (
0 commit comments