aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-02-26 15:29:10 +0000
committergingerBill <bill@gingerbill.org>2021-02-26 15:29:10 +0000
commit54194af71c1315ff3732d813a5936d9b0acd13ba (patch)
treebba8edea26fe772f8175fb2f740614ad26386f19 /src/checker.cpp
parent575c7ff031f67ec4c479fa1cd6e22491e2b7a79e (diff)
Fix patch (yeah... I know)
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index bf3469fde..818fc3cb4 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -4387,23 +4387,27 @@ void check_unchecked_bodies(Checker *c) {
// NOTE(2021-02-26, bill): Actually fix this race condition
for_array(i, c->info.minimum_dependency_set.entries) {
Entity *e = c->info.minimum_dependency_set.entries[i].ptr;
- if (e != nullptr && e->kind == Entity_Procedure) {
- if (!e->Procedure.is_foreign && (e->flags & EntityFlag_ProcBodyChecked) == 0) {
- GB_ASSERT(e->decl_info != nullptr);
-
- ProcInfo pi = {};
- pi.file = e->file;
- pi.token = e->token;
- pi.decl = e->decl_info;
- pi.type = e->type;
-
- Ast *pl = e->decl_info->proc_lit;
- GB_ASSERT(pl != nullptr);
- pi.body = pl->ProcLit.body;
- pi.tags = pl->ProcLit.tags;
-
- check_proc_info(c, pi);
- }
+ if (e == nullptr || e->kind != Entity_Procedure) {
+ continue;
+ }
+ if (e->Procedure.is_foreign) {
+ continue;
+ }
+ if ((e->flags & EntityFlag_ProcBodyChecked) == 0) {
+ GB_ASSERT(e->decl_info != nullptr);
+
+ ProcInfo pi = {};
+ pi.file = e->file;
+ pi.token = e->token;
+ pi.decl = e->decl_info;
+ pi.type = e->type;
+
+ Ast *pl = e->decl_info->proc_lit;
+ GB_ASSERT(pl != nullptr);
+ pi.body = pl->ProcLit.body;
+ pi.tags = pl->ProcLit.tags;
+
+ check_proc_info(c, pi);
}
}
}