Refactor name lookup logic out of Context (#4930)

This is a pretty straight move of name lookup functionality to
name_lookup.*
This commit is contained in:
Jon Ross-Perkins
2025-02-12 22:03:08 +00:00
committed by GitHub
parent c6d35e1c4a
commit afef6cd940
15 changed files with 622 additions and 576 deletions
+2 -1
View File
@@ -10,6 +10,7 @@
#include "toolchain/check/impl.h"
#include "toolchain/check/merge.h"
#include "toolchain/check/modifiers.h"
#include "toolchain/check/name_lookup.h"
#include "toolchain/check/pattern_match.h"
#include "toolchain/parse/typed_nodes.h"
#include "toolchain/sem_ir/generic.h"
@@ -65,7 +66,7 @@ auto HandleParseNode(Context& context, Parse::TypeImplAsId node_id) -> bool {
// to the `NameScopeId` of the `impl`, because this happens before we enter
// the `impl` scope or even identify which `impl` we're declaring.
// TODO: Revisit this once #3714 is resolved.
context.AddNameToLookup(SemIR::NameId::SelfType, self_id);
AddNameToLookup(context, SemIR::NameId::SelfType, self_id);
return true;
}