mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add the used name to the NameUseBeforeDecl diagnostic (#4901)
Part of #4622.
This commit is contained in:
@@ -293,8 +293,8 @@ static auto BuildFunctionDecl(Context& context,
|
||||
}
|
||||
|
||||
if (name_context.state == DeclNameStack::NameContext::State::Poisoned) {
|
||||
DiagnosePoisonedName(context, name_context.poisoning_loc_id,
|
||||
name_context.loc_id);
|
||||
DiagnosePoisonedName(context, name_context.name_id_for_new_inst(),
|
||||
name_context.poisoning_loc_id, name_context.loc_id);
|
||||
} else {
|
||||
TryMergeRedecl(context, node_id, name_context.prev_inst_id(),
|
||||
name_context.loc_id, function_decl, function_info,
|
||||
|
||||
Reference in New Issue
Block a user