diff --git a/codegen/actor_codegen.py b/codegen/actor_codegen.py index 40a2245..5c04453 100755 --- a/codegen/actor_codegen.py +++ b/codegen/actor_codegen.py @@ -34,19 +34,6 @@ def process_actor_groups(process_args): p.close() p.join() -def check_diagnostics_and_print(unit): - if unit.diagnostics: - parse_success = False - for diag in unit.diagnostics: - if diag.severity > clang.cindex.Diagnostic.Warning: - print(f"Error: {diag.spelling}") - print(f" File: {diag.location.file.name}") - print(f" Line: {diag.location.line}") - print(f" Column: {diag.location.column}") - print(f" Severity: {diag.severity}") - else: - parse_success = True - return parse_success def process_one_actor_group(arg: ActorGroupProcessArgument): include_path = os.path.relpath(arg.filepath, arg.source_dir) @@ -55,9 +42,6 @@ def process_one_actor_group(arg: ActorGroupProcessArgument): index = clang.cindex.Index.create() unit = index.parse(arg.filepath, ['-nostdinc++', '-x', 'c++', '-std=gnu++17'] + arg.include_list) - if not check_diagnostics_and_print(unit): - raise Exception("Failed to parse %s" % arg.filepath) - actg_list = [] ns_list = [] traverse_actor_group_types(unit.cursor, arg.filepath, actg_list, ns_list) @@ -97,9 +81,6 @@ def process_one_actor(arg: ActorProcessArgument): index = clang.cindex.Index.create() unit = index.parse(arg.filepath, ['-nostdinc++', '-x', 'c++', '-std=gnu++17'] + arg.include_list) - if not check_diagnostics_and_print(unit): - raise Exception("Failed to parse %s" % arg.filepath) - act_list = [] ns_list = [] traverse_actor_types(unit.cursor, arg.filepath, act_list, ns_list)