diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-09-13 23:12:19 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-09-13 23:40:38 +0200 |
| commit | a38b636045c0384faad1565d47dfbf774821021e (patch) | |
| tree | a78193473fd5b725feaf2762b10cfc189a26a325 /src/stage1/analyze.cpp | |
| parent | 760241ce50eaa9031339f6b591358b53f5797486 (diff) | |
| parent | f011f13933b72f4d63a5f635c7646b68beee726e (diff) | |
| download | zig-a38b636045c0384faad1565d47dfbf774821021e.tar.gz zig-a38b636045c0384faad1565d47dfbf774821021e.zip | |
Merge remote-tracking branch 'origin/master' into zld-incr
Diffstat (limited to 'src/stage1/analyze.cpp')
| -rw-r--r-- | src/stage1/analyze.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/stage1/analyze.cpp b/src/stage1/analyze.cpp index 402c86d86f..2eb609ef1a 100644 --- a/src/stage1/analyze.cpp +++ b/src/stage1/analyze.cpp @@ -3918,12 +3918,6 @@ static void add_top_level_decl(CodeGen *g, ScopeDecls *decls_scope, Tld *tld) { add_error_note(g, msg, other_tld->source_node, buf_sprintf("previous definition here")); return; } - - ZigType *type; - if (get_primitive_type(g, tld->name, &type) != ErrorPrimitiveTypeNotFound) { - add_node_error(g, tld->source_node, - buf_sprintf("declaration shadows primitive type '%s'", buf_ptr(tld->name))); - } } } @@ -4170,13 +4164,6 @@ ZigVar *add_variable(CodeGen *g, AstNode *source_node, Scope *parent_scope, Buf variable_entry->var_type = g->builtin_types.entry_invalid; } else { variable_entry->align_bytes = get_abi_alignment(g, var_type); - - ZigType *type; - if (get_primitive_type(g, name, &type) != ErrorPrimitiveTypeNotFound) { - add_node_error(g, source_node, - buf_sprintf("variable shadows primitive type '%s'", buf_ptr(name))); - variable_entry->var_type = g->builtin_types.entry_invalid; - } } Scope *child_scope; |
