diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index ed1430708..c0200270e 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -899,7 +899,7 @@ and ( bo_debug and keep_going = CLOpt.mk_bool ~deprecated_no:["-no-failures-allowed"] ~long:"keep-going" ~in_help:CLOpt.([(Analyze, manual_generic)]) - ~default:(not CLOpt.strict_mode) "Keep going when the analysis encounters a failure" + "Keep going when the analysis encounters a failure" and reports_include_ml_loc = CLOpt.mk_bool ~deprecated:["with_infer_src_loc"] ~long:"reports-include-ml-loc" "Include the location in the Infer source code from where reports are generated" @@ -1790,6 +1790,7 @@ let post_parsing_initialization command_opt = let should_print_backtrace_default = match exn with L.InferUserError _ | L.InferExit _ -> false | _ -> true in + let suggest_keep_going = should_print_backtrace_default && not !keep_going in let backtrace = Caml.Printexc.raw_backtrace_to_string raw_backtrace in let print_exception () = let error prefix msg = @@ -1813,10 +1814,15 @@ let post_parsing_initialization command_opt = in if should_print_backtrace_default || !developer_mode then ( Out_channel.newline stderr ; - ANSITerminal.(prerr_string []) "Error backtrace:" ; + ANSITerminal.(prerr_string [Foreground Red]) "Error backtrace:" ; Out_channel.newline stderr ; - ANSITerminal.(prerr_string [Foreground Red] backtrace) ) ; + ANSITerminal.(prerr_string [Foreground Red]) backtrace ) ; print_exception () ; + Out_channel.newline stderr ; + if suggest_keep_going then ( + ANSITerminal.(prerr_string []) + "Run the command again with `--keep-going` to try and ignore this error." ; + Out_channel.newline stderr ) ; Pervasives.exit (L.exit_code_of_exception exn) in Caml.Printexc.set_uncaught_exception_handler uncaught_exception_handler ; diff --git a/infer/src/clang/cVar_decl.ml b/infer/src/clang/cVar_decl.ml index 571b61dd7..acb5d54f7 100644 --- a/infer/src/clang/cVar_decl.ml +++ b/infer/src/clang/cVar_decl.ml @@ -37,21 +37,24 @@ let sil_var_of_decl_ref context decl_ref procname = let name = match decl_ref.Clang_ast_t.dr_name with Some name_info -> name_info | None -> assert false in - let pointer = decl_ref.Clang_ast_t.dr_decl_pointer in match decl_ref.Clang_ast_t.dr_kind with | `ImplicitParam -> let outer_procname = CContext.get_outer_procname context in let trans_unit_ctx = context.CContext.translation_unit_context in CGeneral_utils.mk_sil_var trans_unit_ctx name None procname outer_procname | _ - -> if is_custom_var_pointer pointer then + -> let pointer = decl_ref.Clang_ast_t.dr_decl_pointer in + if is_custom_var_pointer pointer then Pvar.mk (Mangled.from_string name.Clang_ast_t.ni_name) procname else - match CAst_utils.get_decl decl_ref.Clang_ast_t.dr_decl_pointer with + match CAst_utils.get_decl pointer with | Some var_decl -> sil_var_of_decl context var_decl procname | None - -> assert false + -> (* FIXME(t21762295) *) + CFrontend_config.incorrect_assumption + "pointer '%d' for var decl not found. The var decl was: %a" pointer + (Pp.to_string ~f:Clang_ast_j.string_of_decl_ref) decl_ref let add_var_to_locals procdesc var_decl sil_typ pvar = let open Clang_ast_t in diff --git a/infer/tests/build_systems/assembly/Makefile b/infer/tests/build_systems/assembly/Makefile index dee7c756b..3cff41b19 100644 --- a/infer/tests/build_systems/assembly/Makefile +++ b/infer/tests/build_systems/assembly/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/build_systems/buck-clang-db/Makefile b/infer/tests/build_systems/buck-clang-db/Makefile index e38b909ed..1a1d4ee0e 100644 --- a/infer/tests/build_systems/buck-clang-db/Makefile +++ b/infer/tests/build_systems/buck-clang-db/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. SOURCE_DIR = ../codetoanalyze ANALYZER = infer -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(SOURCE_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(SOURCE_DIR) SOURCES = $(wildcard $(SOURCE_DIR)/*.cpp $(SOURCE_DIR)/*.h) OBJECTS = '$(SOURCE_DIR)/buck-out/gen/clang_compilation_database/__Hel lo\#compilation-database,x86_64.json' INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/buck_flavors/Makefile b/infer/tests/build_systems/buck_flavors/Makefile index 416adc885..3e790436f 100644 --- a/infer/tests/build_systems/buck_flavors/Makefile +++ b/infer/tests/build_systems/buck_flavors/Makefile @@ -12,7 +12,7 @@ ANALYZER = infer BUCK_TARGET = //src:hello @buck_target.txt SOURCES = $(wildcard src/hello.c) OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests CLEAN_EXTRA = buck-out diff --git a/infer/tests/build_systems/buck_flavors_deterministic/Makefile b/infer/tests/build_systems/buck_flavors_deterministic/Makefile index c6b291e42..2722015e7 100644 --- a/infer/tests/build_systems/buck_flavors_deterministic/Makefile +++ b/infer/tests/build_systems/buck_flavors_deterministic/Makefile @@ -12,7 +12,7 @@ ANALYZER = infer BUCK_TARGET = //src:hello SOURCES = $(wildcard src/hello.c) OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests CLEAN_EXTRA = buck-out capture_hash-1.sha capture_hash-2.sha diff --git a/infer/tests/build_systems/buck_flavors_run/Makefile b/infer/tests/build_systems/buck_flavors_run/Makefile index 758c7e521..59debc547 100644 --- a/infer/tests/build_systems/buck_flavors_run/Makefile +++ b/infer/tests/build_systems/buck_flavors_run/Makefile @@ -12,7 +12,7 @@ ANALYZER = infer BUCK_TARGET = //src:hello SOURCES = $(wildcard src/hello.c) OBJECTS = buck-out/gen/src/hello\#compile-hello.c.o1f717d69,default/hello.c.o -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --project-root $(TESTS_DIR) --issues-tests CLEAN_EXTRA = buck-out diff --git a/infer/tests/build_systems/ck_imports/Makefile b/infer/tests/build_systems/ck_imports/Makefile index 89006bcd2..0cbbf179c 100644 --- a/infer/tests/build_systems/ck_imports/Makefile +++ b/infer/tests/build_systems/ck_imports/Makefile @@ -12,7 +12,7 @@ ANALYZER = linters CODETOANALYZE_DIR = ../codetoanalyze/componentkit CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks -INFER_OPTIONS = --no-filtering --project-root $(CODETOANALYZE_DIR) --no-keep-going +INFER_OPTIONS = --no-filtering --project-root $(CODETOANALYZE_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = $(CODETOANALYZE_DIR)/TestIgnoreImports.mm diff --git a/infer/tests/build_systems/clang_compilation_db/Makefile b/infer/tests/build_systems/clang_compilation_db/Makefile index af56d05b9..d22c189e0 100644 --- a/infer/tests/build_systems/clang_compilation_db/Makefile +++ b/infer/tests/build_systems/clang_compilation_db/Makefile @@ -12,7 +12,7 @@ CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build_infer ANALYZER = infer CLEAN_EXTRA = $(CMAKE_BUILD_DIR) -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) SOURCES = $(CMAKE_DIR)/hello.cpp OBJECTS = $(CMAKE_BUILD_DIR)/compile_commands.json INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/clang_compilation_db_escaped/Makefile b/infer/tests/build_systems/clang_compilation_db_escaped/Makefile index 4b690b93f..dc7e5f411 100644 --- a/infer/tests/build_systems/clang_compilation_db_escaped/Makefile +++ b/infer/tests/build_systems/clang_compilation_db_escaped/Makefile @@ -8,7 +8,7 @@ TESTS_DIR = ../.. ANALYZER = infer -INFER_OPTIONS = --report-custom-error --developer-mode --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode SOURCES = ../codetoanalyze/path\ with\ spaces/hel\ lo.c OBJECTS = $(SOURCES:.c=.o) CLEAN_EXTRA = compile_commands.json diff --git a/infer/tests/build_systems/clang_compilation_db_relpath/Makefile b/infer/tests/build_systems/clang_compilation_db_relpath/Makefile index 42500b05b..ba8cf52b0 100644 --- a/infer/tests/build_systems/clang_compilation_db_relpath/Makefile +++ b/infer/tests/build_systems/clang_compilation_db_relpath/Makefile @@ -8,7 +8,7 @@ TESTS_DIR = ../.. ANALYZER = infer -INFER_OPTIONS = --report-custom-error --developer-mode --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode SOURCES = \ ../codetoanalyze/hello.c ../codetoanalyze/hello2.c ../codetoanalyze/hello3.c \ ../codetoanalyze/path\ with\ spaces/hel\ lo.c diff --git a/infer/tests/build_systems/clang_multiple_files/Makefile b/infer/tests/build_systems/clang_multiple_files/Makefile index 2f7bac048..052b803f5 100644 --- a/infer/tests/build_systems/clang_multiple_files/Makefile +++ b/infer/tests/build_systems/clang_multiple_files/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c ../codetoanalyze/hello2.c diff --git a/infer/tests/build_systems/clang_translation/Makefile b/infer/tests/build_systems/clang_translation/Makefile index 4096a78fd..e854acdf4 100644 --- a/infer/tests/build_systems/clang_translation/Makefile +++ b/infer/tests/build_systems/clang_translation/Makefile @@ -24,7 +24,7 @@ CLEAN_EXTRA = $(DOT_FILES) $(foreach source,$(SOURCES),infer-out-$(basename $(no include $(TESTS_DIR)/clang-frontend.make -INFER_OPTIONS = capture --frontend-tests --skip-translation-headers exclude_dir --no-keep-going +INFER_OPTIONS = capture --frontend-tests --skip-translation-headers exclude_dir capture: $(DOT_FILES) diff --git a/infer/tests/build_systems/clang_unknown_ext/Makefile b/infer/tests/build_systems/clang_unknown_ext/Makefile index 1ce459f74..20f8b3891 100644 --- a/infer/tests/build_systems/clang_unknown_ext/Makefile +++ b/infer/tests/build_systems/clang_unknown_ext/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -x c -c -INFER_OPTIONS = --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.unknown_ext diff --git a/infer/tests/build_systems/clang_with_E_flag/Makefile b/infer/tests/build_systems/clang_with_E_flag/Makefile index 3fc3af039..e688b72fa 100644 --- a/infer/tests/build_systems/clang_with_E_flag/Makefile +++ b/infer/tests/build_systems/clang_with_E_flag/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -E -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/clang_with_MD_flag/Makefile b/infer/tests/build_systems/clang_with_MD_flag/Makefile index 0b66146a7..8b90d8acd 100644 --- a/infer/tests/build_systems/clang_with_MD_flag/Makefile +++ b/infer/tests/build_systems/clang_with_MD_flag/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -MD -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/clang_with_M_flag/Makefile b/infer/tests/build_systems/clang_with_M_flag/Makefile index 81f9fdeac..5119047ae 100644 --- a/infer/tests/build_systems/clang_with_M_flag/Makefile +++ b/infer/tests/build_systems/clang_with_M_flag/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -M -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/clang_with_blacklisted_flags/Makefile b/infer/tests/build_systems/clang_with_blacklisted_flags/Makefile index e0ce0d24b..5cf249be1 100644 --- a/infer/tests/build_systems/clang_with_blacklisted_flags/Makefile +++ b/infer/tests/build_systems/clang_with_blacklisted_flags/Makefile @@ -14,7 +14,7 @@ ANALYZER = infer # leads to an error. This weird case can be observed when -index-store-path is # passed in a sequence like the one in CLANG_OPTIONS. CLANG_OPTIONS = -x c -index-store-path . -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = ../codetoanalyze/hello.c diff --git a/infer/tests/build_systems/cmake/Makefile b/infer/tests/build_systems/cmake/Makefile index 6c8208834..b29866045 100644 --- a/infer/tests/build_systems/cmake/Makefile +++ b/infer/tests/build_systems/cmake/Makefile @@ -13,7 +13,7 @@ CMAKE_ANALYZE_DIR = $(CMAKE_DIR)/_build_infer ANALYZER = infer CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) -INFER_OPTIONS = --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --project-root $(TESTS_DIR) SOURCES = $(CMAKE_DIR)/hello.c OBJECTS = $(CMAKE_BUILD_DIR)/CMakeFiles/Hello.dir/hello.c.o INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/deduplicate_template_warnings/Makefile b/infer/tests/build_systems/deduplicate_template_warnings/Makefile index 08f83ea57..dfe327afe 100644 --- a/infer/tests/build_systems/deduplicate_template_warnings/Makefile +++ b/infer/tests/build_systems/deduplicate_template_warnings/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../.. ANALYZER = checkers CLANG_OPTIONS = -c -INFER_OPTIONS = --project-root src --no-keep-going --liveness +INFER_OPTIONS = --project-root src --liveness INFERPRINT_OPTIONS = --issues-tests SOURCES = src/templates.cpp diff --git a/infer/tests/build_systems/delete_results_dir/Makefile b/infer/tests/build_systems/delete_results_dir/Makefile index 1ca2aceb2..a050a6991 100644 --- a/infer/tests/build_systems/delete_results_dir/Makefile +++ b/infer/tests/build_systems/delete_results_dir/Makefile @@ -24,8 +24,8 @@ include $(TESTS_DIR)/clang.make infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(QUIET)$(call silent_on_success,Testing that infer deletes the results directory: part 1/2,\ - $(INFER_BIN) --no-keep-going --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello.c) + $(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello.c) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) $(QUIET)$(call silent_on_success,Testing that infer deletes the results directory: part 2/2,\ - $(INFER_BIN) --no-keep-going --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello2.c) + $(INFER_BIN) --dump-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(CODETOANALYZE_DIR)/hello2.c) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) diff --git a/infer/tests/build_systems/diff/Makefile b/infer/tests/build_systems/diff/Makefile index a8b250d50..09cdb7b93 100644 --- a/infer/tests/build_systems/diff/Makefile +++ b/infer/tests/build_systems/diff/Makefile @@ -25,5 +25,4 @@ $(INFER_OUT)/differential/introduced.json: $(SOURCES) $(CLANG_DEPS) changed_file $(QUIET)$(MKDIR_P) src $(QUIET)$(COPY) $(SRC_DIR)/some_bugs.c src/hello.c $(QUIET)$(call silent_on_success,Running diff analysis in $(TEST_REL_DIR),\ - $(INFER_BIN) --no-keep-going -o $(INFER_OUT) --project-root $(CURDIR) diff \ - $(INFER_OPTIONS)) + $(INFER_BIN) -o $(INFER_OUT) --project-root $(CURDIR) diff $(INFER_OPTIONS)) diff --git a/infer/tests/build_systems/diff_gen_build_script/Makefile b/infer/tests/build_systems/diff_gen_build_script/Makefile index 2358113db..fb1ced47c 100644 --- a/infer/tests/build_systems/diff_gen_build_script/Makefile +++ b/infer/tests/build_systems/diff_gen_build_script/Makefile @@ -27,5 +27,4 @@ $(INFER_OUT)/differential/introduced.json: $(SOURCES) $(CLANG_DEPS) changed_file $(QUIET)$(MKDIR_P) src $(QUIET)$(COPY) $(SRC_DIR)/some_different_bugs.c src/ $(QUIET)$(call silent_on_success,Running diff analysis in $(TEST_REL_DIR),\ - $(INFER_BIN) --no-keep-going -o $(INFER_OUT) --project-root $(CURDIR) diff \ - $(INFER_OPTIONS)) + $(INFER_BIN) -o $(INFER_OUT) --project-root $(CURDIR) diff $(INFER_OPTIONS)) diff --git a/infer/tests/build_systems/fail_on_issue/Makefile b/infer/tests/build_systems/fail_on_issue/Makefile index a308ba56e..d4cd63fcd 100644 --- a/infer/tests/build_systems/fail_on_issue/Makefile +++ b/infer/tests/build_systems/fail_on_issue/Makefile @@ -24,7 +24,7 @@ default: compile issues.exp.test: $(CLANG_DEPS) $(SOURCES) $(QUIET)$(call silent_on_success,Testing Infer fails on issue,\ - ($(INFER_BIN) --no-keep-going --fail-on-issue -- clang $(CLANG_OPTIONS) $(SOURCES); \ + ($(INFER_BIN) --fail-on-issue -- clang $(CLANG_OPTIONS) $(SOURCES); \ echo "infer exit code: $$?" > $@)) .PHONY: compile diff --git a/infer/tests/build_systems/inferconfig/Makefile b/infer/tests/build_systems/inferconfig/Makefile index 01a1ff3b6..be42f0a21 100644 --- a/infer/tests/build_systems/inferconfig/Makefile +++ b/infer/tests/build_systems/inferconfig/Makefile @@ -12,7 +12,7 @@ CMAKE_BUILD_DIR = $(CURDIR)/_build_infer ANALYZER = infer CLEAN_EXTRA = $(CMAKE_BUILD_DIR) -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(CMAKE_DIR) SOURCES = $(CMAKE_DIR)/hello.cpp OBJECTS = $(CMAKE_BUILD_DIR)/compile_commands.json INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/build_systems/make/Makefile b/infer/tests/build_systems/make/Makefile index bc448793f..4c0cdfa52 100644 --- a/infer/tests/build_systems/make/Makefile +++ b/infer/tests/build_systems/make/Makefile @@ -18,6 +18,6 @@ include $(TESTS_DIR)/clang.make infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(QUIET)$(call silent_on_success,Testing make clang and javac integration,\ - $(INFER_BIN) --no-keep-going --dump-duplicate-symbols --project-root $(TESTS_DIR) -a $(ANALYZER) -- \ + $(INFER_BIN) --dump-duplicate-symbols --project-root $(TESTS_DIR) -a $(ANALYZER) -- \ make -C ../codetoanalyze/make clean all) $(QUIET)$(call check_no_duplicates,infer-out/duplicates.txt) diff --git a/infer/tests/build_systems/preprocessed/Makefile b/infer/tests/build_systems/preprocessed/Makefile index 6bd7f571b..48d99c115 100644 --- a/infer/tests/build_systems/preprocessed/Makefile +++ b/infer/tests/build_systems/preprocessed/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --headers --project-root ../codetoanalyze INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/build_systems/project_root_rel/Makefile b/infer/tests/build_systems/project_root_rel/Makefile index d2711bd70..88e8af7d6 100644 --- a/infer/tests/build_systems/project_root_rel/Makefile +++ b/infer/tests/build_systems/project_root_rel/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/build_systems/run_hidden_linters/Makefile b/infer/tests/build_systems/run_hidden_linters/Makefile index 568f77a2d..e9f58e8e9 100644 --- a/infer/tests/build_systems/run_hidden_linters/Makefile +++ b/infer/tests/build_systems/run_hidden_linters/Makefile @@ -15,7 +15,7 @@ ANALYZER = linters CODETOANALYZE_DIR = ../codetoanalyze/componentkit CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks -INFER_OPTIONS = --compute-analytics --project-root $(CODETOANALYZE_DIR) --no-keep-going +INFER_OPTIONS = --compute-analytics --project-root $(CODETOANALYZE_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = $(CODETOANALYZE_DIR)/TestComponentKitAnalytics.mm diff --git a/infer/tests/codetoanalyze/c/bufferoverrun/Makefile b/infer/tests/codetoanalyze/c/bufferoverrun/Makefile index de229ddbb..d1fc3831c 100644 --- a/infer/tests/codetoanalyze/c/bufferoverrun/Makefile +++ b/infer/tests/codetoanalyze/c/bufferoverrun/Makefile @@ -12,7 +12,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers CLANG_OPTIONS = -c -INFER_OPTIONS = -F --project-root $(TESTS_DIR) --no-keep-going --no-liveness --bufferoverrun +INFER_OPTIONS = -F --project-root $(TESTS_DIR) --bufferoverrun-only INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.c) diff --git a/infer/tests/codetoanalyze/c/errors/Makefile b/infer/tests/codetoanalyze/c/errors/Makefile index de892532a..44b71bded 100644 --- a/infer/tests/codetoanalyze/c/errors/Makefile +++ b/infer/tests/codetoanalyze/c/errors/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = infer CLANG_OPTIONS = -c -INFER_OPTIONS = --report-custom-error --developer-mode --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --report-custom-error --developer-mode --no-filtering --debug-exceptions --project-root $(TESTS_DIR) # we need to disable traces in C tests because assertions/assertion_failure.c has different traces # on Linux and OSX because of different implementations of assert() on each platform INFERPRINT_OPTIONS = --issues-fields "file,procedure,line_offset,bug_type" --issues-tests diff --git a/infer/tests/codetoanalyze/c/frontend/Makefile b/infer/tests/codetoanalyze/c/frontend/Makefile index bbeaac9fa..ca4c1b815 100644 --- a/infer/tests/codetoanalyze/c/frontend/Makefile +++ b/infer/tests/codetoanalyze/c/frontend/Makefile @@ -8,7 +8,7 @@ TESTS_DIR=../../.. CLANG_OPTIONS = -c -INFER_OPTIONS = --no-keep-going +INFER_OPTIONS = SOURCES = \ $(wildcard */*.c) \ diff --git a/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile b/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile index a1f765046..e8445f5f5 100644 --- a/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile +++ b/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile @@ -11,7 +11,7 @@ ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c INFER_OPTIONS = --bufferoverrun --ml-buckets cpp --no-filtering --debug-exceptions \ - --project-root $(TESTS_DIR) --no-keep-going --no-liveness + --project-root $(TESTS_DIR) --no-liveness INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.cpp) diff --git a/infer/tests/codetoanalyze/cpp/errors/Makefile b/infer/tests/codetoanalyze/cpp/errors/Makefile index 6c985d8a9..8a0807e84 100644 --- a/infer/tests/codetoanalyze/cpp/errors/Makefile +++ b/infer/tests/codetoanalyze/cpp/errors/Makefile @@ -12,7 +12,7 @@ ANALYZER = infer # use our own clang's standard library so that the tests are uniform across distributions CLANG_OPTIONS = -x c++ -std=c++1y -isystem$(ROOT_DIR) -c INFER_OPTIONS = --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ - --no-keep-going --pmd-xml --report-custom-error + --pmd-xml --report-custom-error INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/cpp/frontend/Makefile b/infer/tests/codetoanalyze/cpp/frontend/Makefile index 9eaf655bd..1c55f02f9 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/Makefile +++ b/infer/tests/codetoanalyze/cpp/frontend/Makefile @@ -11,7 +11,7 @@ TESTS_DIR=../../.. CLANG_OPTIONS = \ -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ \ -x c++ -std=c++11 -c -INFER_OPTIONS = --headers --no-keep-going +INFER_OPTIONS = --headers SOURCES = \ diff --git a/infer/tests/codetoanalyze/cpp/liveness/Makefile b/infer/tests/codetoanalyze/cpp/liveness/Makefile index 962525080..bd7b732f3 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/Makefile +++ b/infer/tests/codetoanalyze/cpp/liveness/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++14 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --liveness --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --liveness --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.cpp) diff --git a/infer/tests/codetoanalyze/cpp/quandary/Makefile b/infer/tests/codetoanalyze/cpp/quandary/Makefile index efda022ab..df20579de 100644 --- a/infer/tests/codetoanalyze/cpp/quandary/Makefile +++ b/infer/tests/codetoanalyze/cpp/quandary/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --quandary --passthroughs --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --quandary --passthroughs --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = $(wildcard *.cpp) diff --git a/infer/tests/codetoanalyze/cpp/siof/Makefile b/infer/tests/codetoanalyze/cpp/siof/Makefile index a3fecdff8..7c4d294b5 100644 --- a/infer/tests/codetoanalyze/cpp/siof/Makefile +++ b/infer/tests/codetoanalyze/cpp/siof/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --siof --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --siof --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/cpp/threadsafety/Makefile b/infer/tests/codetoanalyze/cpp/threadsafety/Makefile index 94d94a175..d4b6dd7ff 100644 --- a/infer/tests/codetoanalyze/cpp/threadsafety/Makefile +++ b/infer/tests/codetoanalyze/cpp/threadsafety/Makefile @@ -10,7 +10,7 @@ TESTS_DIR = ../../.. ANALYZER = checkers # see explanations in cpp/errors/Makefile for the custom isystem CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c -INFER_OPTIONS = --threadsafety --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --threadsafety --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS += --debug INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/codetoanalyze/objc/errors/Makefile b/infer/tests/codetoanalyze/objc/errors/Makefile index bbd91ef2e..276830c74 100644 --- a/infer/tests/codetoanalyze/objc/errors/Makefile +++ b/infer/tests/codetoanalyze/objc/errors/Makefile @@ -18,7 +18,7 @@ CLANG_OPTIONS = -x objective-c \ CLEAN_EXTRA = infer-out-arc infer-out-all infer-out-all infer-out-arc \ issues.exp.test.all issues.exp.test.arc issues.exp.test.default -INFER_OPTIONS = --dump-duplicate-symbols --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --dump-duplicate-symbols --no-filtering --debug-exceptions --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES_DEFAULT = \ diff --git a/infer/tests/codetoanalyze/objc/ioslints/Makefile b/infer/tests/codetoanalyze/objc/ioslints/Makefile index bb7ba63d7..08382e45f 100644 --- a/infer/tests/codetoanalyze/objc/ioslints/Makefile +++ b/infer/tests/codetoanalyze/objc/ioslints/Makefile @@ -20,7 +20,7 @@ INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ --iphoneos-target-sdk-version 8.0 \ --iphoneos-target-sdk-version-path-regex "codetoanalyze/objc/ioslints/filter_out_unavailable_api\.m:10.0" \ --iphoneos-target-sdk-version-path-regex "codetoanalyze/objc/ioslints/RemoveObserverInGivenSDKTest\.m:9.0" \ ---no-keep-going + INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile b/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile index 317693f02..0714660fe 100644 --- a/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile +++ b/infer/tests/codetoanalyze/objc/linters-def-folder/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -c -INFER_OPTIONS = --linters-def-folder checks --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --linters-def-folder checks --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = file.m diff --git a/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile b/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile index 3347b2c7b..a04688aea 100644 --- a/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile +++ b/infer/tests/codetoanalyze/objc/linters-for-test-only/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -fobjc-arc -c -INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objc/linters/Makefile b/infer/tests/codetoanalyze/objc/linters/Makefile index 050621c21..353aec83b 100644 --- a/infer/tests/codetoanalyze/objc/linters/Makefile +++ b/infer/tests/codetoanalyze/objc/linters/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -x objective-c -fobjc-arc -c -INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going \ +INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ --linters-doc-url "ASSIGN_POINTER_WARNING:www.example.com" INFERPRINT_OPTIONS = --issues-tests diff --git a/infer/tests/codetoanalyze/objc/quandary/Makefile b/infer/tests/codetoanalyze/objc/quandary/Makefile index c98a6cd81..d8d019eb7 100644 --- a/infer/tests/codetoanalyze/objc/quandary/Makefile +++ b/infer/tests/codetoanalyze/objc/quandary/Makefile @@ -16,7 +16,7 @@ CLANG_OPTIONS = -x objective-c \ -mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \ ANALYZER = quandary -INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0 --no-keep-going +INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --iphoneos-target-sdk-version 8.0 INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objcpp/frontend/Makefile b/infer/tests/codetoanalyze/objcpp/frontend/Makefile index 8e0c9c84a..8470f4721 100644 --- a/infer/tests/codetoanalyze/objcpp/frontend/Makefile +++ b/infer/tests/codetoanalyze/objcpp/frontend/Makefile @@ -15,7 +15,7 @@ CLANG_OPTIONS = -x objective-c++ -std=c++11 \ -isysroot $(XCODEROOT)$(IPHONESIMULATOR_ISYSROOT_SUFFIX) \ -mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \ -INFER_OPTIONS = --no-keep-going +INFER_OPTIONS = SOURCES = \ $(wildcard */*.mm) \ diff --git a/infer/tests/codetoanalyze/objcpp/linters-for-test-only/Makefile b/infer/tests/codetoanalyze/objcpp/linters-for-test-only/Makefile index 6c23afc49..84c903609 100644 --- a/infer/tests/codetoanalyze/objcpp/linters-for-test-only/Makefile +++ b/infer/tests/codetoanalyze/objcpp/linters-for-test-only/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c -INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) --no-keep-going +INFER_OPTIONS = --cxx --linters-def-file linters_example.al --project-root $(TESTS_DIR) INFERPRINT_OPTIONS = --issues-tests SOURCES = \ diff --git a/infer/tests/codetoanalyze/objcpp/linters/Makefile b/infer/tests/codetoanalyze/objcpp/linters/Makefile index 1e42f19b4..59900cb2e 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/Makefile +++ b/infer/tests/codetoanalyze/objcpp/linters/Makefile @@ -9,7 +9,7 @@ TESTS_DIR = ../../.. ANALYZER = linters CLANG_OPTIONS = -x objective-c++ -std=c++11 -fobjc-arc -c -INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) --no-keep-going \ +INFER_OPTIONS = --no-filtering --debug-exceptions --project-root $(TESTS_DIR) \ --enable-issue-type GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL INFERPRINT_OPTIONS = --issues-tests