mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user