aboutsummaryrefslogtreecommitdiff
path: root/src/check_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-10-29 18:09:05 +0000
committergingerBill <bill@gingerbill.org>2017-10-29 18:09:05 +0000
commit3e05be8eb8b14729b63ee541d11b3deb19b38710 (patch)
tree938e806dc49e06fbed11bd1a1fe718b481a935f6 /src/check_stmt.cpp
parentae24a8e5ae77111cae24cd8d710b63636b737283 (diff)
`@(default_calling_convention = ...)` for `foreign` blocks
Diffstat (limited to 'src/check_stmt.cpp')
-rw-r--r--src/check_stmt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp
index 7cbf479e4..3add868ec 100644
--- a/src/check_stmt.cpp
+++ b/src/check_stmt.cpp
@@ -1670,8 +1670,11 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
CheckerContext prev_context = c->context;
if (ok) {
c->context.curr_foreign_library = foreign_library;
+ c->context.default_foreign_cc = ProcCC_C;
}
+ check_foreign_block_decl_attributes(c, fb);
+
for_array(i, fb->decls) {
AstNode *decl = fb->decls[i];
if (decl->kind == AstNode_ValueDecl && decl->ValueDecl.is_mutable) {