aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-07 12:21:20 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-07 12:21:20 -0500
commita94304d3e4b9220d2b22501eb2666e5aa89df236 (patch)
treea3b85b53581853b62dabf6f763feca099e4fee84 /src/ir.cpp
parentd974afde1d366a28f1b07bff6ebfb5c5756d3b61 (diff)
parent2b2bf53a49616192e2b2bdf40b88400964ff1500 (diff)
downloadzig-a94304d3e4b9220d2b22501eb2666e5aa89df236.tar.gz
zig-a94304d3e4b9220d2b22501eb2666e5aa89df236.zip
Merge remote-tracking branch 'origin/master' into llvm8
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 3cbbdc8103..02b2b12230 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -5204,6 +5204,10 @@ static IrInstruction *ir_gen_var_decl(IrBuilder *irb, Scope *scope, AstNode *nod
add_node_error(irb->codegen, variable_declaration->section_expr,
buf_sprintf("cannot set section of local variable '%s'", buf_ptr(variable_declaration->symbol)));
}
+ if (variable_declaration->threadlocal_tok != nullptr) {
+ add_token_error(irb->codegen, node->owner, variable_declaration->threadlocal_tok,
+ buf_sprintf("function-local variable '%s' cannot be threadlocal", buf_ptr(variable_declaration->symbol)));
+ }
// Temporarily set the name of the IrExecutable to the VariableDeclaration
// so that the struct or enum from the init expression inherits the name.