mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Improve decl_name_stack comments (#4977)
Trying to make it clearer what these correspond to. Had suggested a small edit on https://github.com/carbon-language/carbon-lang/pull/4902/files#r1960682518, but since that was missed, suggesting an incrementally larger edit since `name_id` and `loc_id` are now more tied.
This commit is contained in:
@@ -255,10 +255,8 @@ auto DeclNameStack::ApplyNameQualifier(const NameComponent& name) -> void {
|
||||
auto DeclNameStack::ApplyAndLookupName(NameContext& name_context,
|
||||
SemIR::LocId loc_id,
|
||||
SemIR::NameId name_id) -> void {
|
||||
// The location of the name is the location of the last name token we've
|
||||
// processed so far.
|
||||
// Update the final name component.
|
||||
name_context.loc_id = loc_id;
|
||||
|
||||
name_context.name_id = name_id;
|
||||
|
||||
// Don't perform any more lookups after we hit an error. We still track the
|
||||
|
||||
Reference in New Issue
Block a user