AST: Stop passing around a LazyResolver in name lookup

Note that in all cases it was either nullptr or ctx.getLazyResolver().
While passing in nullptr might appear at first glance to mean something
("don't type check anything"), in practice we would check for a nullptr
value and pull out ctx.getLazyResolver() instead. Furthermore, with
the lazy resolver going away (at least for resolveDeclSignature() calls),
it won't make sense to do that anymore anyway.
This commit is contained in:
Slava Pestov
2019-08-19 15:03:39 -04:00
parent 94c5a35bf2
commit 80ccbe5116
24 changed files with 120 additions and 187 deletions

View File

@@ -493,9 +493,7 @@ void walkRelatedDecls(const ValueDecl *VD, const FnTy &Fn) {
// if VD is an initializer, we should extract other initializers etc.
// For now we use UnqualifiedLookup to fetch other declarations with the same
// base name.
auto TypeResolver = VD->getASTContext().getLazyResolver();
UnqualifiedLookup Lookup(VD->getBaseName(), VD->getDeclContext(),
TypeResolver);
UnqualifiedLookup Lookup(VD->getBaseName(), VD->getDeclContext());
for (auto result : Lookup.Results) {
ValueDecl *RelatedVD = result.getValueDecl();
if (RelatedVD->getAttrs().isUnavailable(VD->getASTContext()))