This commit is contained in:
gingerBill
2023-07-07 22:56:20 +01:00
parent 8f4c59b080
commit 3758be55f5
2 changed files with 22 additions and 19 deletions

View File

@@ -285,17 +285,6 @@ gb_internal Scope *create_scope_from_package(CheckerContext *c, AstPackage *pkg)
}
gb_internal void destroy_scope(Scope *scope) {
for (auto const &entry : scope->elements) {
Entity *e = entry.value;
if (e->kind == Entity_Variable) {
if (!(e->flags & EntityFlag_Used)) {
#if 0
warning(e->token, "Unused variable '%.*s'", LIT(e->token.string));
#endif
}
}
}
for (Scope *child = scope->head_child; child != nullptr; child = child->next) {
destroy_scope(child);
}