浏览代码

Fix `#defined(I)`.

Jeroen van Rijn 3 年之前
父节点
当前提交
92fb65cf2e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/check_builtin.cpp

+ 2 - 2
src/check_builtin.cpp

@@ -1533,10 +1533,10 @@ bool check_builtin_procedure_directive(CheckerContext *c, Operand *operand, Ast
 		}
 
 		bool is_defined = check_identifier_exists(c->scope, arg);
-		gb_unused(is_defined);
+		// gb_unused(is_defined);
 		operand->type = t_untyped_bool;
 		operand->mode = Addressing_Constant;
-		operand->value = exact_value_bool(false);
+		operand->value = exact_value_bool(is_defined);
 
 	} else if (name == "config") {
 		if (ce->args.count != 2) {