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:
Jon Ross-Perkins
2025-02-19 19:46:23 +00:00
committed by GitHub
parent 186ca0e505
commit 524a6337f4
2 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -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