mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 18:40:29 +00:00
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:
1 parent
c6d35e1c4a
commit
afef6cd940
15 files changed
+622
-576
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/check/handle.h"
|
||||
#include "toolchain/check/interface.h"
|
||||
#include "toolchain/check/name_lookup.h"
|
||||
#include "toolchain/check/return.h"
|
||||
#include "toolchain/check/subpattern.h"
|
||||
#include "toolchain/check/type_completion.h"
|
||||
@@ -226,7 +227,7 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
|
||||
break;
|
||||
}
|
||||
if (had_error) {
|
||||
context.AddNameToLookup(name_id, SemIR::ErrorInst::SingletonInstId);
|
||||
AddNameToLookup(context, name_id, SemIR::ErrorInst::SingletonInstId);
|
||||
// Replace the parameter with `ErrorInst` so that we don't try
|
||||
// constructing a generic based on it.
|
||||
param_pattern_id = SemIR::ErrorInst::SingletonInstId;
|
||||
|
||||
Reference in new issue
Block a user