Update fcp version

Summary:
New stuff:
1. more info about c++ new/delete expressions
2. stmt cache
master
Andrzej Kotulski 9 years ago
parent 31e7a14344
commit be0e3c417a

2
.gitignore vendored

@ -86,7 +86,7 @@ buck-out/
/infer/src/clang/clang_ast_t.mli /infer/src/clang/clang_ast_t.mli
/infer/src/clang/clang_ast_v.ml /infer/src/clang/clang_ast_v.ml
/infer/src/clang/clang_ast_v.mli /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/src/clang/clang_ast_main.ml
/infer/annotations/annotations.jar /infer/annotations/annotations.jar

@ -1 +1 @@
3a4b470518da7251f2dc296444c4d616fef5dc2c 7d01248a6499fbadc1aaa2c98094533527307771

@ -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) 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_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 #### #### 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 -t $(INFERPRINT_ATDGEN_STUB_ATD) -o $(INFERPRINT_ATDGEN_STUB_BASE)
atdgen -j $(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 # rebuild the artifacts of the AST files whenever they're upated in FCP
# also copy the ast_proj files whenever they are updated # also copy the ast_proj files whenever they are updated
atdgen -rec -t $(CLANG_ATDGEN_STUB_ATD) -o $(CLANG_ATDGEN_STUB_BASE) 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) 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.ml $(CLANG_SOURCES)
$(COPY) $(CLANG_OCAML_BUILD)/clang_ast_proj.mli $(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) $(COPY) $(CLANG_OCAML_ROOT)/clang_ast_main.ml $(CLANG_SOURCES)

@ -47,7 +47,7 @@ let ast_file : string option ref = ref None
let json = ref "" 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 let debug_mode = ref false

@ -41,7 +41,7 @@ val testing_mode : bool ref
val json : string 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 val objc_object : string

@ -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 "Original AST@.%a@." CAstProcessor.pp_ast_decl ast_decl;
Printing.log_out "AST with explicit locations:@.%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.pointer_decl_index := decl_index;
CFrontend_config.json := ast_filename; CFrontend_config.json := ast_filename;
CLocation.check_source_file source_path; CLocation.check_source_file source_path;

@ -1874,9 +1874,9 @@ struct
"BinaryConditionalOperator not translated %s @." "BinaryConditionalOperator not translated %s @."
(Ast_utils.string_of_stmt instr); (Ast_utils.string_of_stmt instr);
assert false) assert false)
| CXXNewExpr (stmt_info, stmt_list, expr_info) -> | CXXNewExpr (stmt_info, stmt_list, expr_info, _) ->
cxxNewExpr_trans trans_state stmt_info 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 cxxDeleteExpr_trans trans_state stmt_info stmt_list expr_info
| s -> (Printing.log_stats | s -> (Printing.log_stats
"\n!!!!WARNING: found statement %s. \nACTION REQUIRED: Translation need to be defined. Statement ignored.... \n" "\n!!!!WARNING: found statement %s. \nACTION REQUIRED: Translation need to be defined. Statement ignored.... \n"

@ -75,8 +75,8 @@ let extract_type_from_stmt s =
| BlockExpr(_, _, expr_info, _) | CXXBindTemporaryExpr (_, _ , expr_info, _) | BlockExpr(_, _, expr_info, _) | CXXBindTemporaryExpr (_, _ , expr_info, _)
| CXXBoolLiteralExpr (_, _, expr_info, _) | CXXConstructExpr (_, _, expr_info, _) | CXXBoolLiteralExpr (_, _, expr_info, _) | CXXConstructExpr (_, _, expr_info, _)
| CXXTemporaryObjectExpr (_, _, expr_info, _) | CXXDefaultArgExpr (_, _, expr_info) | CXXTemporaryObjectExpr (_, _, expr_info, _) | CXXDefaultArgExpr (_, _, expr_info)
| CXXDefaultInitExpr (_, _, expr_info) | CXXDeleteExpr (_, _, expr_info) | CXXDefaultInitExpr (_, _, expr_info) | CXXDeleteExpr (_, _, expr_info, _)
| CXXDependentScopeMemberExpr (_, _, expr_info) | CXXNewExpr (_, _, expr_info) | CXXDependentScopeMemberExpr (_, _, expr_info) | CXXNewExpr (_, _, expr_info, _)
| CXXNoexceptExpr (_, _, expr_info) | CXXNullPtrLiteralExpr (_, _, expr_info) | CXXNoexceptExpr (_, _, expr_info) | CXXNullPtrLiteralExpr (_, _, expr_info)
| CXXPseudoDestructorExpr (_, _, expr_info) | CXXScalarValueInitExpr (_, _, expr_info) | CXXPseudoDestructorExpr (_, _, expr_info) | CXXScalarValueInitExpr (_, _, expr_info)
| CXXStdInitializerListExpr (_, _, expr_info) | CXXThisExpr (_, _, expr_info) | CXXStdInitializerListExpr (_, _, expr_info) | CXXThisExpr (_, _, expr_info)

Loading…
Cancel
Save