aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorJosh Wolfe <thejoshwolfe@gmail.com>2017-04-12 16:49:47 -0700
committerJosh Wolfe <thejoshwolfe@gmail.com>2017-04-12 22:21:35 -0700
commit919910312d7d25fe8f894adbc9ff8a449ac26281 (patch)
tree20a8c1aaf16ce227f95fe53d0a584133b37c5f84 /src/analyze.cpp
parentbf67427c67dac00ca10ed7423ae8d99e2901262f (diff)
downloadzig-919910312d7d25fe8f894adbc9ff8a449ac26281.tar.gz
zig-919910312d7d25fe8f894adbc9ff8a449ac26281.zip
make it an error to ignore a statement's value
this makes {1;} an error.
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 1f2d014393..5a38f0c11c 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -2987,23 +2987,6 @@ void semantic_analyze(CodeGen *g) {
}
}
-bool is_node_void_expr(AstNode *node) {
- if (node->type == NodeTypeContainerInitExpr &&
- node->data.container_init_expr.kind == ContainerInitKindArray)
- {
- AstNode *type_node = node->data.container_init_expr.type;
- if (type_node->type == NodeTypeSymbol &&
- buf_eql_str(type_node->data.symbol_expr.symbol, "void"))
- {
- return true;
- }
- } else if (node->type == NodeTypeBlock && node->data.block.statements.length == 0) {
- return true;
- }
-
- return false;
-}
-
TypeTableEntry **get_int_type_ptr(CodeGen *g, bool is_signed, uint32_t size_in_bits) {
size_t index;
if (size_in_bits == 8) {