| ... | @@ -8346,7 +8346,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal | ... | @@ -8346,7 +8346,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal |
| 8346 | } | 8346 | } |
| 8347 | | 8347 | |
| 8348 | bool found_first_var_arg = false; | 8348 | bool found_first_var_arg = false; |
| 8349 | size_t first_var_arg = inst_fn_type_id.param_count; | 8349 | size_t first_var_arg; |
| 8350 | | 8350 | |
| 8351 | FnTableEntry *parent_fn_entry = exec_fn_entry(ira->new_irb.exec); | 8351 | FnTableEntry *parent_fn_entry = exec_fn_entry(ira->new_irb.exec); |
| 8352 | assert(parent_fn_entry); | 8352 | assert(parent_fn_entry); |
| ... | @@ -8394,6 +8394,10 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal | ... | @@ -8394,6 +8394,10 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal |
| 8394 | AstNode *param_decl_node = fn_proto_node->data.fn_proto.params.at(next_proto_i); | 8394 | AstNode *param_decl_node = fn_proto_node->data.fn_proto.params.at(next_proto_i); |
| 8395 | Buf *param_name = param_decl_node->data.param_decl.name; | 8395 | Buf *param_name = param_decl_node->data.param_decl.name; |
| 8396 | | 8396 | |
| | 8397 | if (!found_first_var_arg) { |
| | 8398 | first_var_arg = inst_fn_type_id.param_count; |
| | 8399 | } |
| | 8400 | |
| 8397 | ConstExprValue *var_args_val = create_const_arg_tuple(ira->codegen, | 8401 | ConstExprValue *var_args_val = create_const_arg_tuple(ira->codegen, |
| 8398 | first_var_arg, inst_fn_type_id.param_count); | 8402 | first_var_arg, inst_fn_type_id.param_count); |
| 8399 | VariableTableEntry *var = add_variable(ira->codegen, param_decl_node, | 8403 | VariableTableEntry *var = add_variable(ira->codegen, param_decl_node, |