deprecated attribute for procedure declarations

This commit is contained in:
gingerBill
2018-03-03 11:16:48 +00:00
parent 08c87e57f8
commit 9274f29ca9
10 changed files with 89 additions and 24 deletions

View File

@@ -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;