From 9274f29ca950a1f6b91506b56a291fce0b534f64 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 3 Mar 2018 11:16:48 +0000 Subject: `deprecated` attribute for procedure declarations --- src/check_expr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/check_expr.cpp') diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 7d4c759d9..853760204 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4943,6 +4943,16 @@ ExprKind check_call_expr(Checker *c, Operand *operand, AstNode *call) { } } + // NOTE(bill): Should this be here or on the `add_entity_use`? + // if (ce->proc != nullptr) { + // Entity *e = entity_of_node(&c->info, ce->proc); + // if (e != nullptr && e->kind == Entity_Procedure) { + // String msg = e->Procedure.deprecated_message; + // if (msg.len > 0) { + // warning(call, "%.*s is deprecated: %.*s", LIT(e->token.string), LIT(msg)); + // } + // } + // } CallArgumentData data = check_call_arguments(c, operand, proc_type, call); Type *result_type = data.result_type; -- cgit v1.2.3