From b59647084b11a7f08ad3aa54ae47ceb157f12c46 Mon Sep 17 00:00:00 2001 From: bobsayshilol Date: Sun, 27 Oct 2024 20:26:34 +0000 Subject: Plug a memory leak The call to |array_make()| always allocates and since this variable was unused it lead to a leak. Simply plug it by removing it. --- src/parser.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 4029d49de..9d8b0d231 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4262,8 +4262,6 @@ gb_internal bool allow_field_separator(AstFile *f) { gb_internal Ast *parse_struct_field_list(AstFile *f, isize *name_count_) { Token start_token = f->curr_token; - auto decls = array_make(ast_allocator(f)); - isize total_name_count = 0; Ast *params = parse_field_list(f, &total_name_count, FieldFlag_Struct, Token_CloseBrace, false, false); -- cgit v1.2.3 From b3d1d7b835fa5b05620f91420838e4dcdee65dfd Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 14 Nov 2024 16:08:53 +0000 Subject: Make `#relative` types an error in parsing --- src/parser.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 9d8b0d231..aa90651d3 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2488,6 +2488,7 @@ gb_internal Ast *parse_operand(AstFile *f, bool lhs) { tag = parse_call_expr(f, tag); } Ast *type = parse_type(f); + syntax_error(tag, "#relative types have now been removed in favour of \"core:relative\""); return ast_relative_type(f, tag, type); } else if (name.string == "force_inline" || name.string == "force_no_inline") { -- cgit v1.2.3