mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-24 19:55:11 +00: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:
1 parent
b78ab1bbae
commit
1aa6573d4e
9 files changed
+39
-38
No files matched your search
@@ -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