mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01:00
When diagnosing poisoned name, point to the declared name instead of the entire declaration (#4938)
See https://discord.com/channels/655572317891461132/655578254970716160/1339007384361762857. Part of #4622.
This commit is contained in:
@@ -273,7 +273,7 @@ static auto BuildFunctionDecl(Context& context,
|
||||
|
||||
if (name_context.state == DeclNameStack::NameContext::State::Poisoned) {
|
||||
context.DiagnosePoisonedName(name_context.poisoning_loc_id,
|
||||
function_info.latest_decl_id());
|
||||
name_context.loc_id);
|
||||
} else {
|
||||
TryMergeRedecl(context, node_id, name_context.prev_inst_id(), function_decl,
|
||||
function_info, is_definition);
|
||||
|
||||
Reference in New Issue
Block a user