unused_nodes.erase(var.type_declaration);
}
+void UnusedTypeRemover::visit(FunctionDeclaration &func)
+{
+ unused_nodes.erase(func.return_type_declaration);
+ TraversingVisitor::visit(func);
+}
+
UnusedVariableRemover::UnusedVariableRemover():
aggregate(0),
virtual void visit(ImageTypeDeclaration &);
virtual void visit(StructDeclaration &);
virtual void visit(VariableDeclaration &);
+ virtual void visit(FunctionDeclaration &);
};
/** Removes variable declarations with no references to them. Assignment