s.interface_blocks.clear();
r_any_resolved = false;
s.content.visit(*this);
+ for(vector<VariableDeclaration *>::const_iterator i=redeclared_builtins.begin(); i!=redeclared_builtins.end(); ++i)
+ (*i)->source = GENERATED_SOURCE;
NodeRemover().apply(s, nodes_to_remove);
return r_any_resolved;
}
ptr = &var;
else if(!current_block->parent && ptr->interface==var.interface && ptr->type==var.type)
{
+ if(ptr->source==BUILTIN_SOURCE)
+ redeclared_builtins.push_back(&var);
+ else
+ stage->diagnostics.push_back(Diagnostic(Diagnostic::WARN, var.source, var.line,
+ format("Redeclaring non-builtin variable '%s' is deprecated", var.name)));
+
if(var.init_expression)
ptr->init_expression = var.init_expression;
if(var.layout)
bool record_target;
bool r_self_referencing;
Assignment::Target r_assignment_target;
+ std::vector<VariableDeclaration *> redeclared_builtins;
std::set<Node *> nodes_to_remove;
public: