Change from test_* prefix to @(test) attribute for odin test

This commit is contained in:
gingerBill
2021-03-14 18:43:21 +00:00
parent db0ac2ba98
commit f5142aaec4
6 changed files with 22 additions and 18 deletions

View File

@@ -687,6 +687,9 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
check_decl_attributes(ctx, d->attributes, proc_decl_attribute, &ac);
}
if (ac.test) {
e->flags |= EntityFlag_Test;
}
e->Procedure.is_export = ac.is_export;
e->deprecated_message = ac.deprecated_message;
ac.link_name = handle_link_name(ctx, e->token, ac.link_name, ac.link_prefix);
@@ -701,8 +704,8 @@ void check_proc_decl(CheckerContext *ctx, Entity *e, DeclInfo *d) {
}
}
bool is_foreign = e->Procedure.is_foreign;
bool is_export = e->Procedure.is_export;
bool is_foreign = e->Procedure.is_foreign;
bool is_export = e->Procedure.is_export;
if (e->pkg != nullptr && e->token.string == "main") {
if (pt->param_count != 0 ||