Add -show-unused (Shows unused package declarations of all imported packages)

Crude output at the moment but better than nothing
This commit is contained in:
gingerBill
2020-11-17 12:10:25 +00:00
parent ca4b0527e8
commit 6f71d1f2a9
7 changed files with 208 additions and 33 deletions

View File

@@ -1007,11 +1007,10 @@ void check_proc_group_decl(CheckerContext *ctx, Entity *pg_entity, DeclInfo *d)
continue;
}
if (ptr_set_exists(&entity_set, e)) {
if (ptr_set_update(&entity_set, e)) {
error(arg, "Previous use of `%.*s` in procedure group", LIT(e->token.string));
continue;
}
ptr_set_add(&entity_set, e);
array_add(&pge->entities, e);
}