From 0110ad9e14dee7b51d1d8e400d39e5136c4b0231 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 22 Jun 2018 08:02:56 -0700 Subject: [PATCH] [deadcode] remove dead code Summary: `make deadcode` complains about circular dependencies but it works. Document mystery and remove dead code that was introduced while the tests were broken. Reviewed By: da319 Differential Revision: D8590961 fbshipit-source-id: b52e290 --- infer/src/clang/ctl_parser_types.ml | 10 ---------- infer/src/clang/ctl_parser_types.mli | 2 -- infer/src/deadcode/Makefile | 1 + 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/infer/src/clang/ctl_parser_types.ml b/infer/src/clang/ctl_parser_types.ml index ca22739ad..d4ba058c1 100644 --- a/infer/src/clang/ctl_parser_types.ml +++ b/infer/src/clang/ctl_parser_types.ml @@ -88,16 +88,6 @@ let ast_node_kind node = Clang_ast_proj.get_decl_kind_string decl -let ast_node_source_range node = - match node with - | Stmt stmt -> - let s_stmt_info, _ = Clang_ast_proj.get_stmt_tuple stmt in - s_stmt_info.si_source_range - | Decl decl -> - let d_decl_info = Clang_ast_proj.get_decl_tuple decl in - d_decl_info.di_source_range - - (* true iff an ast node is a node of type among the list tl *) let ast_node_has_kind tl an = let an_alexp = ALVar.Const (ast_node_kind an) in diff --git a/infer/src/clang/ctl_parser_types.mli b/infer/src/clang/ctl_parser_types.mli index b06d7a2ef..fc03acf87 100644 --- a/infer/src/clang/ctl_parser_types.mli +++ b/infer/src/clang/ctl_parser_types.mli @@ -29,8 +29,6 @@ val stmt_node_child_type : ast_node -> string val ast_node_cast_kind : ast_node -> string -val ast_node_source_range : ast_node -> Clang_ast_t.source_range - val is_node_successor_of : is_successor:ast_node -> ast_node -> bool val get_direct_successor_nodes : ast_node -> ast_node list diff --git a/infer/src/deadcode/Makefile b/infer/src/deadcode/Makefile index 70c3e397d..983aa2f18 100644 --- a/infer/src/deadcode/Makefile +++ b/infer/src/deadcode/Makefile @@ -49,6 +49,7 @@ depend: -I java -I labs -I python -I quandary -I unit -I unit/clang -I deadcode \ $(ml_src_files) > deadcode/.depend +# circular dependency... not sure how to fix properly %.cmi: %.cmx # deal with the .ml *and* the .mli at the same time: when all the modules are inlined in one # file, you need the module value to be defined before you can refer to it, even in