Add Call param patterns to Function (#6586)

This commit is contained in:
Geoff Romer
2026-01-13 19:30:15 +00:00
committed by GitHub
parent 4a47f1ebeb
commit a2737a3189
17 changed files with 409 additions and 298 deletions
+3 -1
View File
@@ -188,6 +188,7 @@ static auto MergeFunctionRedecl(Context& context,
// Track the signature from the definition, so that IDs in the body
// match IDs in the signature.
prev_function.MergeDefinition(new_function);
prev_function.call_param_patterns_id = new_function.call_param_patterns_id;
prev_function.call_params_id = new_function.call_params_id;
prev_function.return_type_inst_id = new_function.return_type_inst_id;
prev_function.return_form_inst_id = new_function.return_form_inst_id;
@@ -449,7 +450,8 @@ static auto BuildFunctionDecl(Context& context,
auto function_info =
SemIR::Function{name_context.MakeEntityWithParamsBase(
name, decl_id, is_extern, introducer.extern_library),
{.call_params_id = name.call_params_id,
{.call_param_patterns_id = name.call_param_patterns_id,
.call_params_id = name.call_params_id,
.return_type_inst_id = return_type_inst_id,
.return_form_inst_id = return_form_inst_id,
.return_patterns_id = return_patterns_id,