diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-17 12:10:25 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-17 12:10:25 +0000 |
| commit | 6f71d1f2a97887d7039c4e4cc39477a1f474ccae (patch) | |
| tree | 5954d8a0ee8df3f3b7fe0fb7c56a4385c561907c /src/check_decl.cpp | |
| parent | ca4b0527e80bda39aa677f013415eff0c62f433d (diff) | |
Add `-show-unused` (Shows unused package declarations of all imported packages)
Crude output at the moment but better than nothing
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index da07fe4bc..5234955fb 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -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); } |