Move all new's to global_arena, and remove ASAN disabling (#690)

Note this changes identifiers from char* to string to avoid malloc.

Fixes #580
This commit is contained in:
Jon Meow authored and GitHub committed 2021-08-02 11:08:22 -07:00
1 parent f1028fcc27
commit 9829f188b7
18 files changed
+130 -120

No files matched your search

+3 -1
View File
@@ -4,11 +4,13 @@
#include "executable_semantics/ast/member.h"
#include "executable_semantics/common/arena.h"
namespace Carbon {
auto Member::MakeFieldMember(int line_num, const BindingPattern* binding)
-> Member* {
auto m = new Member();
auto m = global_arena->New<Member>();
m->line_num = line_num;
m->value = FieldMember({.binding = binding});
return m;