From bd2b80d6ac582b9f0bcd96c86d4b79bfdb64eca1 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 11 Sep 2026 09:11:47 +0200 Subject: Implement aligned attribute --- boot/type_check.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'boot/type_check.cc') diff --git a/boot/type_check.cc b/boot/type_check.cc index 5078da1..8847693 100644 --- a/boot/type_check.cc +++ b/boot/type_check.cc @@ -344,9 +344,9 @@ namespace elna::boot } else if (auto record = referent.get()) { - for (const auto& [field_name, field_type] : record->fields) + for (const auto& [field_name, field] : record->fields) { - if (contains_constant_member(field_type)) + if (contains_constant_member(field.field_type)) { return true; } @@ -378,9 +378,9 @@ namespace elna::boot if (auto record = referent.get()) { - for (const auto& [field_name, field_type] : record->fields) + for (const auto& [field_name, field] : record->fields) { - if (auto opaque = find_opaque_type(field_type)) + if (auto opaque = find_opaque_type(field.field_type)) { return opaque; } @@ -462,9 +462,9 @@ namespace elna::boot } if (auto record = resolve_aliases(checked).get()) { - for (const auto& [field_name, field_type] : record->fields) + for (const auto& [field_name, field] : record->fields) { - if (auto found = find_zero_sized(field_type, target)) + if (auto found = find_zero_sized(field.field_type, target)) { return found; } @@ -804,7 +804,7 @@ namespace elna::boot { walking_visitor::visit(declaration); - for (const identifier_definition& variable_identifier : declaration->identifiers) + for (const auto& variable_identifier : declaration->identifiers) { auto variable_symbol = this->bag.lookup(variable_identifier.name())->is_variable(); @@ -823,7 +823,7 @@ namespace elna::boot { return; } - for (const identifier_definition& variable_identifier : declaration->identifiers) + for (const auto& variable_identifier : declaration->identifiers) { auto variable_symbol = this->bag.lookup(variable_identifier.name())->is_variable(); if (!is_assignable_from(variable_symbol->symbol, declaration->initializer->type_decoration)) @@ -945,17 +945,17 @@ namespace elna::boot if (auto record = referent.get()) { - for (const auto& [field_name, field_type] : record->fields) + for (const auto& [field_name, field] : record->fields) { - if (auto opaque = find_opaque_type(field_type)) + if (auto opaque = find_opaque_type(field.field_type)) { add_error(declaration->position(), opaque.value(), type_requirement_error::kind::opaque_field); } - else if (has_zero_size(field_type, this->target)) + else if (has_zero_size(field.field_type, this->target)) { add_error(declaration->position(), - field_type, type_requirement_error::kind::zero_sized); + field.field_type, type_requirement_error::kind::zero_sized); } } } @@ -1060,9 +1060,9 @@ namespace elna::boot } if (auto record = subject.get()) { - for (const auto& [field_name, field_type] : record->fields) + for (const auto& [field_name, field] : record->fields) { - if (occurs_in(parameter, field_type)) + if (occurs_in(parameter, field.field_type)) { return true; } -- cgit v1.2.3