Detect alias cycles
This commit is contained in:
@ -217,8 +217,7 @@ namespace elna::gcc
|
||||
|
||||
void generic_visitor::visit(boot::cast_expression *expression)
|
||||
{
|
||||
std::vector<std::string> path;
|
||||
tree cast_target = get_inner_alias(expression->expression_type, this->symbols->scope(), path);
|
||||
tree cast_target = get_inner_alias(expression->expression_type, this->symbols->scope());
|
||||
|
||||
expression->value().accept(this);
|
||||
tree cast_source = TREE_TYPE(this->current_expression);
|
||||
@ -746,10 +745,9 @@ namespace elna::gcc
|
||||
|
||||
void generic_visitor::visit(boot::variable_declaration *declaration)
|
||||
{
|
||||
std::vector<std::string> path;
|
||||
this->current_expression = get_inner_alias(
|
||||
this->info_table->lookup(declaration->identifier.identifier)->is_variable()->symbol,
|
||||
this->symbols->scope(), path);
|
||||
this->symbols->scope());
|
||||
|
||||
location_t declaration_location = get_location(&declaration->position());
|
||||
tree declaration_tree = build_decl(declaration_location, VAR_DECL,
|
||||
@ -854,8 +852,7 @@ namespace elna::gcc
|
||||
this->current_expression = error_mark_node;
|
||||
return false;
|
||||
}
|
||||
std::vector<std::string> path;
|
||||
this->current_expression = get_inner_alias(trait->types.front(), this->symbols, path);
|
||||
this->current_expression = get_inner_alias(trait->types.front(), this->symbols);
|
||||
|
||||
return this->current_expression != error_mark_node;
|
||||
}
|
||||
@ -919,8 +916,7 @@ namespace elna::gcc
|
||||
this->current_expression = error_mark_node;
|
||||
return;
|
||||
}
|
||||
std::vector<std::string> path;
|
||||
this->current_expression = get_inner_alias(trait->types.front(), this->symbols, path);
|
||||
this->current_expression = get_inner_alias(trait->types.front(), this->symbols);
|
||||
auto field_type = trait->parameters.at(1)->is_named();
|
||||
|
||||
if (field_type == nullptr)
|
||||
@ -1128,13 +1124,6 @@ namespace elna::gcc
|
||||
{
|
||||
make_if_branch(*branch, goto_check);
|
||||
}
|
||||
if (statement->alternative != nullptr)
|
||||
{
|
||||
enter_scope();
|
||||
visit_statements(*statement->alternative);
|
||||
tree mapping = leave_scope();
|
||||
append_statement(mapping);
|
||||
}
|
||||
append_statement(branch_end_expression);
|
||||
this->current_expression = NULL_TREE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user