From 98cb3c84ac7814a1b183d288057bf21d20011679 Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Fri, 31 Jul 2015 08:39:04 -0100 Subject: [PATCH] Remove code that does nothing --- infer/src/clang/cFrontend.ml | 11 ----------- infer/src/clang/cMethod_decl.ml | 3 --- infer/src/clang/cMethod_decl.mli | 6 ------ 3 files changed, 20 deletions(-) diff --git a/infer/src/clang/cFrontend.ml b/infer/src/clang/cFrontend.ml index a87db0ab6..baef74369 100644 --- a/infer/src/clang/cFrontend.ml +++ b/infer/src/clang/cFrontend.ml @@ -91,16 +91,6 @@ let rec translate_one_declaration tenv cg cfg namespace dec = | dec -> Printing.log_stats "\nWARNING: found Declaration %s skipped\n" (Ast_utils.string_of_decl dec) -(** Preprocess declarations to create method signatures of function declarations. *) -let preprocess_one_declaration tenv cg cfg dec = - let info = Clang_ast_proj.get_decl_tuple dec in - CLocation.update_curr_file info; - match dec with - | FunctionDecl(di, name_info, qt, fdecl_info) -> - let name = name_info.Clang_ast_t.ni_name in - ignore (CMethod_declImpl.create_function_signature di fdecl_info name qt false None) - | _ -> () - (* Translates a file by translating the ast into a cfg. *) let compute_icfg tenv source_file ast = match ast with @@ -109,7 +99,6 @@ let compute_icfg tenv source_file ast = Printing.log_out "\n Start creating icfg\n"; let cg = Cg.create () in let cfg = Cfg.Node.create_cfg () in - list_iter (preprocess_one_declaration tenv cg cfg) decl_list; list_iter (translate_one_declaration tenv cg cfg None) decl_list; Printing.log_out "\n Finished creating icfg\n"; (cg, cfg) diff --git a/infer/src/clang/cMethod_decl.ml b/infer/src/clang/cMethod_decl.ml index b3f4c82c8..809c1ba6a 100644 --- a/infer/src/clang/cMethod_decl.ml +++ b/infer/src/clang/cMethod_decl.ml @@ -23,9 +23,6 @@ module type CMethod_decl = sig val function_decl : Sil.tenv -> Cfg.cfg -> Cg.t -> string option -> bool -> Clang_ast_t.decl_info -> string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit - val create_function_signature : Clang_ast_t.decl_info -> Clang_ast_t.function_decl_info -> string -> - Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature - val process_getter_setter : CContext.t -> Procname.t -> bool end diff --git a/infer/src/clang/cMethod_decl.mli b/infer/src/clang/cMethod_decl.mli index 8076fc6d9..e5161dbe9 100644 --- a/infer/src/clang/cMethod_decl.mli +++ b/infer/src/clang/cMethod_decl.mli @@ -16,9 +16,6 @@ module CMethod_decl_funct(T: CModule_type.CTranslation) : sig val function_decl : Sil.tenv -> Cfg.cfg -> Cg.t -> string option -> bool -> Clang_ast_t.decl_info -> string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit - val create_function_signature : Clang_ast_t.decl_info -> Clang_ast_t.function_decl_info -> string -> - Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature - val process_getter_setter : CContext.t -> Procname.t -> bool end @@ -30,8 +27,5 @@ module type CMethod_decl = sig val function_decl : Sil.tenv -> Cfg.cfg -> Cg.t -> string option -> bool -> Clang_ast_t.decl_info -> string -> Clang_ast_t.qual_type -> Clang_ast_t.function_decl_info -> (Mangled.t * Sil.typ * bool) list -> Procname.t option -> CContext.curr_class -> unit - val create_function_signature : Clang_ast_t.decl_info -> Clang_ast_t.function_decl_info -> string -> - Clang_ast_t.qual_type -> bool -> Procname.t option -> Clang_ast_t.stmt option * CMethod_signature.method_signature - val process_getter_setter : CContext.t -> Procname.t -> bool end