| ... | ... | @@ -15500,7 +15500,7 @@ static Stage1AirInst *ir_analyze_struct_field_ptr(IrAnalyze *ira, Scope *scope, |
| 15500 | 15500 | is_const, is_volatile, PtrLenSingle, field->align, |
| 15501 | 15501 | (uint32_t)(ptr_bit_offset + field->bit_offset_in_host), |
| 15502 | 15502 | (uint32_t)host_int_bytes_for_result_type, false); |
| 15503 | | |
| 15503 | |
| 15504 | 15504 | if (field == struct_type->data.structure.misaligned_field) { |
| 15505 | 15505 | // If field is the last single misaligned field it will be represented as array |
| 15506 | 15506 | // of bytes in LLVM but get_pointer_to_type_extra will set its host_int_bytes to 0. |
| ... | ... | @@ -24781,7 +24781,9 @@ static Stage1AirInst *ir_analyze_instruction_end_expr(IrAnalyze *ira, Stage1ZirI |
| 24781 | 24781 | if (type_is_invalid(store_ptr->value->type)) { |
| 24782 | 24782 | if (instruction->result_loc->id == ResultLocIdReturn && |
| 24783 | 24783 | (value->value->type->id == ZigTypeIdErrorUnion || value->value->type->id == ZigTypeIdErrorSet) && |
| 24784 | | ira->explicit_return_type->id != ZigTypeIdErrorUnion && ira->explicit_return_type->id != ZigTypeIdErrorSet) |
| 24784 | ira->explicit_return_type->id != ZigTypeIdErrorUnion && ira->explicit_return_type->id != ZigTypeIdErrorSet && |
| 24785 | // Only add error note if we have a node to attach it to |
| 24786 | ira->explicit_return_type_source_node) |
| 24785 | 24787 | { |
| 24786 | 24788 | add_error_note(ira->codegen, ira->new_irb.exec->first_err_trace_msg, |
| 24787 | 24789 | ira->explicit_return_type_source_node, buf_create_from_str("function cannot return an error")); |