diff --git a/.gitignore b/.gitignore index b07bf5ccc..4a70114eb 100644 --- a/.gitignore +++ b/.gitignore @@ -86,7 +86,7 @@ buck-out/ /infer/src/clang/clang_ast_t.mli /infer/src/clang/clang_ast_v.ml /infer/src/clang/clang_ast_v.mli -/infer/src/clang/clang_ast_cache.ml +/infer/src/clang/clang_ast_visit.ml /infer/src/clang/clang_ast_main.ml /infer/annotations/annotations.jar diff --git a/dependencies/clang-plugin/clang-plugin-version.config b/dependencies/clang-plugin/clang-plugin-version.config index 613cfb69a..b4b7658e2 100644 --- a/dependencies/clang-plugin/clang-plugin-version.config +++ b/dependencies/clang-plugin/clang-plugin-version.config @@ -1 +1 @@ -3a4b470518da7251f2dc296444c4d616fef5dc2c +7d01248a6499fbadc1aaa2c98094533527307771 diff --git a/infer/src/Makefile b/infer/src/Makefile index 9449a8b48..5f81aeab4 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -103,7 +103,7 @@ CLANG_ATDGEN_STUBS = $(addprefix $(CLANG_SOURCES)/$(CLANG_AST_BASE_NAME), $(ATDG INFER_CLANG_AST_PROJ = $(addprefix $(CLANG_SOURCES)/, clang_ast_proj.ml clang_ast_proj.mli) FCP_CLANG_AST_PROJ = $(addprefix $(CLANG_OCAML_BUILD)/, clang_ast_proj.ml clang_ast_proj.mli) -FCP_CLANG_AST_CACHE = $(addprefix $(CLANG_OCAML_ROOT)/, clang_ast_cache.ml clang_ast_main.ml) +FCP_CLANG_AST_MAIN = $(addprefix $(CLANG_OCAML_ROOT)/, clang_ast_visit.ml clang_ast_main.ml) #### LLVM declarations #### @@ -154,7 +154,7 @@ $(INFERPRINT_ATDGEN_STUBS): $(INFERPRINT_ATDGEN_STUB_ATD) atdgen -t $(INFERPRINT_ATDGEN_STUB_ATD) -o $(INFERPRINT_ATDGEN_STUB_BASE) atdgen -j $(INFERPRINT_ATDGEN_STUB_ATD) -o $(INFERPRINT_ATDGEN_STUB_BASE) -$(CLANG_ATDGEN_STUBS) $(INFER_CLANG_AST_PROJ): $(CLANG_ATDGEN_STUB_ATD) $(CLANG_PLUGIN_BINARIES) $(FCP_CLANG_AST_PROJ) $(FCP_CLANG_AST_CACHE) +$(CLANG_ATDGEN_STUBS) $(INFER_CLANG_AST_PROJ): $(CLANG_ATDGEN_STUB_ATD) $(CLANG_PLUGIN_BINARIES) $(FCP_CLANG_AST_PROJ) $(FCP_CLANG_AST_MAIN) # rebuild the artifacts of the AST files whenever they're upated in FCP # also copy the ast_proj files whenever they are updated atdgen -rec -t $(CLANG_ATDGEN_STUB_ATD) -o $(CLANG_ATDGEN_STUB_BASE) @@ -162,7 +162,7 @@ $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_AST_PROJ): $(CLANG_ATDGEN_STUB_ATD) $(CLANG_ atdgen -rec -v $(CLANG_ATDGEN_STUB_ATD) -o $(CLANG_ATDGEN_STUB_BASE) $(COPY) $(CLANG_OCAML_BUILD)/clang_ast_proj.ml $(CLANG_SOURCES) $(COPY) $(CLANG_OCAML_BUILD)/clang_ast_proj.mli $(CLANG_SOURCES) - $(COPY) $(CLANG_OCAML_ROOT)/clang_ast_cache.ml $(CLANG_SOURCES) + $(COPY) $(CLANG_OCAML_ROOT)/clang_ast_visit.ml $(CLANG_SOURCES) $(COPY) $(CLANG_OCAML_ROOT)/clang_ast_main.ml $(CLANG_SOURCES) diff --git a/infer/src/clang/cFrontend_config.ml b/infer/src/clang/cFrontend_config.ml index ea7f6e3af..3600a3416 100644 --- a/infer/src/clang/cFrontend_config.ml +++ b/infer/src/clang/cFrontend_config.ml @@ -47,7 +47,7 @@ let ast_file : string option ref = ref None let json = ref "" -let pointer_decl_index = ref Clang_ast_cache.PointerMap.empty +let pointer_decl_index = ref Clang_ast_main.PointerMap.empty let debug_mode = ref false diff --git a/infer/src/clang/cFrontend_config.mli b/infer/src/clang/cFrontend_config.mli index 748a1d025..e0705ee90 100644 --- a/infer/src/clang/cFrontend_config.mli +++ b/infer/src/clang/cFrontend_config.mli @@ -41,7 +41,7 @@ val testing_mode : bool ref val json : string ref -val pointer_decl_index : Clang_ast_t.decl Clang_ast_cache.PointerMap.t ref +val pointer_decl_index : Clang_ast_t.decl Clang_ast_main.PointerMap.t ref val objc_object : string diff --git a/infer/src/clang/cMain.ml b/infer/src/clang/cMain.ml index c6ef12819..19ff6de3e 100644 --- a/infer/src/clang/cMain.ml +++ b/infer/src/clang/cMain.ml @@ -108,7 +108,7 @@ let do_run source_path ast_path = Printing.log_out "Original AST@.%a@." CAstProcessor.pp_ast_decl ast_decl; Printing.log_out "AST with explicit locations:@.%a@." CAstProcessor.pp_ast_decl ast_decl'; - let decl_index, _ = Clang_ast_main.index_decl_type_pointers ast_decl' in + let decl_index, _, _ = Clang_ast_main.index_node_pointers ast_decl' in CFrontend_config.pointer_decl_index := decl_index; CFrontend_config.json := ast_filename; CLocation.check_source_file source_path; diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 44b784c9f..17180c7b7 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -1874,9 +1874,9 @@ struct "BinaryConditionalOperator not translated %s @." (Ast_utils.string_of_stmt instr); assert false) - | CXXNewExpr (stmt_info, stmt_list, expr_info) -> + | CXXNewExpr (stmt_info, stmt_list, expr_info, _) -> cxxNewExpr_trans trans_state stmt_info expr_info - | CXXDeleteExpr (stmt_info, stmt_list, expr_info) -> + | CXXDeleteExpr (stmt_info, stmt_list, expr_info, _) -> cxxDeleteExpr_trans trans_state stmt_info stmt_list expr_info | s -> (Printing.log_stats "\n!!!!WARNING: found statement %s. \nACTION REQUIRED: Translation need to be defined. Statement ignored.... \n" diff --git a/infer/src/clang/cTypes.ml b/infer/src/clang/cTypes.ml index 2fc5345f9..23bdf4e49 100644 --- a/infer/src/clang/cTypes.ml +++ b/infer/src/clang/cTypes.ml @@ -75,8 +75,8 @@ let extract_type_from_stmt s = | BlockExpr(_, _, expr_info, _) | CXXBindTemporaryExpr (_, _ , expr_info, _) | CXXBoolLiteralExpr (_, _, expr_info, _) | CXXConstructExpr (_, _, expr_info, _) | CXXTemporaryObjectExpr (_, _, expr_info, _) | CXXDefaultArgExpr (_, _, expr_info) - | CXXDefaultInitExpr (_, _, expr_info) | CXXDeleteExpr (_, _, expr_info) - | CXXDependentScopeMemberExpr (_, _, expr_info) | CXXNewExpr (_, _, expr_info) + | CXXDefaultInitExpr (_, _, expr_info) | CXXDeleteExpr (_, _, expr_info, _) + | CXXDependentScopeMemberExpr (_, _, expr_info) | CXXNewExpr (_, _, expr_info, _) | CXXNoexceptExpr (_, _, expr_info) | CXXNullPtrLiteralExpr (_, _, expr_info) | CXXPseudoDestructorExpr (_, _, expr_info) | CXXScalarValueInitExpr (_, _, expr_info) | CXXStdInitializerListExpr (_, _, expr_info) | CXXThisExpr (_, _, expr_info)