From 8239cd34ebd1e44456cfa2d06c63f5be7c3b1acd Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 27 Mar 2021 17:59:01 +0000 Subject: Issue #823 - Change semantics of `disabled` attribute to not evaluate any of the parameters at run time --- src/ir.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index ee463296a..96595c38d 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -7765,6 +7765,13 @@ irValue *ir_build_call_expr(irProcedure *proc, Ast *expr) { } } + Entity *proc_entity = entity_of_node(proc_expr); + if (proc_entity != nullptr) { + if (proc_entity->flags & EntityFlag_Disabled) { + return nullptr; + } + } + if (value == nullptr) { value = ir_build_expr(proc, proc_expr); } -- cgit v1.2.3