Browse Source

Ff `@(disabled=true)`, do not add that entity's dependencies to the set

gingerBill 1 year ago
parent
commit
52c219690a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/checker.cpp

+ 4 - 0
src/checker.cpp

@@ -847,6 +847,10 @@ gb_internal void add_declaration_dependency(CheckerContext *c, Entity *e) {
 	if (e == nullptr) {
 		return;
 	}
+	if (e->flags & EntityFlag_Disabled) {
+		// ignore the dependencies if it has been `@(disabled=true)`
+		return;
+	}
 	if (c->decl != nullptr) {
 		add_dependency(c->info, c->decl, e);
 	}