aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-03-14 18:43:21 +0000
committergingerBill <bill@gingerbill.org>2021-03-14 18:43:21 +0000
commitf5142aaec41edbb85f9306216c6b199fa5adb7bb (patch)
treebf1eb80ce88441d9bde998c9d4b879f7a7d0965c /src/check_decl.cpp
parentdb0ac2ba984a4b395a6dfba8fcb7ab128ad96f19 (diff)
Change from `test_*` prefix to `@(test)` attribute for `odin test`
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 95a3cb25a..a08da3a2d 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -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 ||