Fix issue with deferred_* attributes

This commit is contained in:
gingerBill
2019-03-15 16:39:49 +00:00
parent 394baa9ddd
commit 885c5dc8b7
2 changed files with 10 additions and 12 deletions
+4 -4
View File
@@ -2005,7 +2005,7 @@ DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
if (value != nullptr) {
Operand o = {};
check_expr(c, &o, value);
Entity *e = entity_of_ident(o.expr);
Entity *e = entity_of_node(o.expr);
if (e != nullptr && e->kind == Entity_Procedure) {
warning(elem, "'%.*s' is deprecated, please use one of the following instead: 'deferred_none', 'deferred_in', 'deferred_out'", LIT(name));
if (ac->deferred_procedure.entity != nullptr) {
@@ -2022,7 +2022,7 @@ DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
if (value != nullptr) {
Operand o = {};
check_expr(c, &o, value);
Entity *e = entity_of_ident(o.expr);
Entity *e = entity_of_node(o.expr);
if (e != nullptr && e->kind == Entity_Procedure) {
ac->deferred_procedure.kind = DeferredProcedure_none;
ac->deferred_procedure.entity = e;
@@ -2035,7 +2035,7 @@ DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
if (value != nullptr) {
Operand o = {};
check_expr(c, &o, value);
Entity *e = entity_of_ident(o.expr);
Entity *e = entity_of_node(o.expr);
if (e != nullptr && e->kind == Entity_Procedure) {
if (ac->deferred_procedure.entity != nullptr) {
error(elem, "Previous usage of a 'deferred_*' attribute");
@@ -2051,7 +2051,7 @@ DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
if (value != nullptr) {
Operand o = {};
check_expr(c, &o, value);
Entity *e = entity_of_ident(o.expr);
Entity *e = entity_of_node(o.expr);
if (e != nullptr && e->kind == Entity_Procedure) {
if (ac->deferred_procedure.entity != nullptr) {
error(elem, "Previous usage of a 'deferred_*' attribute");