diff --git a/infer/src/clang/Capture.re b/infer/src/clang/Capture.re index 5bdb49fa2..cf469ada3 100644 --- a/infer/src/clang/Capture.re +++ b/infer/src/clang/Capture.re @@ -76,17 +76,15 @@ let run_clang_frontend trans_unit_ctx ast_source => { CFrontend_config.pointer_stmt_index := stmt_index; CFrontend_config.pointer_type_index := type_index; CFrontend_config.ivar_to_property_index := ivar_to_property_index; - CFrontend_config.json := ast_filename; Logging.out "Clang frontend action is %s@\n" Config.clang_frontend_action_string; - Logging.out - "Start %s of AST from %s@\n" Config.clang_frontend_action_string !CFrontend_config.json; + Logging.out "Start %s of AST from %s@\n" Config.clang_frontend_action_string ast_filename; if Config.clang_frontend_do_lint { CFrontend_checkers_main.do_frontend_checks trans_unit_ctx ast_decl }; if Config.clang_frontend_do_capture { CFrontend.do_source_file trans_unit_ctx ast_decl }; - Logging.out "End translation AST file %s... OK!@\n" !CFrontend_config.json; + Logging.out "End translation AST file %s... OK!@\n" ast_filename; print_elapsed () }; diff --git a/infer/src/clang/cFrontend_config.ml b/infer/src/clang/cFrontend_config.ml index 8dc0a1fa5..f1c99418f 100644 --- a/infer/src/clang/cFrontend_config.ml +++ b/infer/src/clang/cFrontend_config.ml @@ -94,7 +94,6 @@ let modeled_function_attributes = [replace_with_deref_first_arg_attr] let enum_map = ref Clang_ast_main.PointerMap.empty let global_translation_unit_decls : Clang_ast_t.decl list ref = ref [] let ivar_to_property_index = ref Clang_ast_main.PointerMap.empty -let json = ref "" let log_out = ref Format.std_formatter let pointer_decl_index = ref Clang_ast_main.PointerMap.empty let pointer_stmt_index = ref Clang_ast_main.PointerMap.empty @@ -105,7 +104,6 @@ let reset_global_state () = enum_map := Clang_ast_main.PointerMap.empty; global_translation_unit_decls := []; ivar_to_property_index := Clang_ast_main.PointerMap.empty; - json := ""; log_out := Format.std_formatter; pointer_decl_index := Clang_ast_main.PointerMap.empty; pointer_stmt_index := Clang_ast_main.PointerMap.empty; diff --git a/infer/src/clang/cFrontend_config.mli b/infer/src/clang/cFrontend_config.mli index 2176f0b03..7f1351a41 100644 --- a/infer/src/clang/cFrontend_config.mli +++ b/infer/src/clang/cFrontend_config.mli @@ -94,7 +94,6 @@ val modeled_function_attributes : string list val enum_map : (Clang_ast_t.pointer option * Exp.t option) Clang_ast_main.PointerMap.t ref val global_translation_unit_decls : Clang_ast_t.decl list ref val ivar_to_property_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref -val json : string ref val log_out : Format.formatter ref val pointer_decl_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref val pointer_stmt_index : Clang_ast_t.stmt Clang_ast_main.PointerMap.t ref diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index e42c2b42c..8303ab6b8 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -573,7 +573,6 @@ let rec get_type_from_exp_stmt stmt = | DeclRefExpr(_, _, _, info) -> do_decl_ref_exp info | _ -> Logging.err_debug "Failing with: %s@\n%!" (Clang_ast_j.string_of_stmt stmt); - Printing.print_failure_info ""; assert false module Self = diff --git a/infer/src/clang/printing.ml b/infer/src/clang/printing.ml index db8c1f353..4fb6b6534 100644 --- a/infer/src/clang/printing.ml +++ b/infer/src/clang/printing.ml @@ -63,9 +63,6 @@ let print_procedures cfg = " defined? " ^ (string_of_bool (Cfg.Procdesc.is_defined pdesc)) ^ "\n") procs) -let print_failure_info pointer = - L.err "AST Element> %s IN FILE> %s @.@." pointer !CFrontend_config.json - let print_nodes nodes = IList.iter (fun node -> Logging.do_out "%s" (Cfg.Node.get_description pe_text node)) nodes diff --git a/infer/src/clang/printing.mli b/infer/src/clang/printing.mli index 84eb748e0..9c4be0fb6 100644 --- a/infer/src/clang/printing.mli +++ b/infer/src/clang/printing.mli @@ -9,8 +9,6 @@ open! Utils -val print_failure_info : string -> unit - val print_tenv : Tenv.t -> unit val print_tenv_struct_unions : Tenv.t -> unit