From 0ecd73d0f8e02ccaba6a3af75b04aa15fd6150a9 Mon Sep 17 00:00:00 2001 From: Phoebe Nichols Date: Mon, 15 Jul 2019 06:16:03 -0700 Subject: [PATCH] Add --incremental-analysis flag Summary: Add a flag to enable incremental diff analysis, where old summaries are not recomputed unless necessary The implementation for this flag will follow Reviewed By: ngorogiannis Differential Revision: D16222865 fbshipit-source-id: e7e225a87 --- infer/man/man1/infer-full.txt | 4 ++++ infer/src/base/Config.ml | 7 +++++++ infer/src/base/Config.mli | 3 +++ 3 files changed, 14 insertions(+) diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index 32ed38d6c..01cfc284b 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -1395,6 +1395,10 @@ INTERNAL OPTIONS --icfg-dotty-outfile-reset Cancel the effect of --icfg-dotty-outfile. + --incremental-analysis + Activates: [EXPERIMENTAL] Use incremental analysis for changed + files (Conversely: --no-incremental-analysis) + --iphoneos-target-sdk-version-path-regex-reset Set --iphoneos-target-sdk-version-path-regex to the empty list. diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index e973d1808..a4345f95a 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -2343,6 +2343,11 @@ and use_cost_threshold = "Emit costs issues by comparing costs with a set threshold" +and incremental_analysis = + CLOpt.mk_bool ~long:"incremental-analysis" ~default:false + "[EXPERIMENTAL] Use incremental analysis for changed files" + + and version = let var = ref `None in CLOpt.mk_set var `Full ~deprecated:["version"] ~long:"version" @@ -3176,6 +3181,8 @@ and unsafe_malloc = !unsafe_malloc and use_cost_threshold = !use_cost_threshold +and incremental_analysis = !incremental_analysis + and worklist_mode = !worklist_mode and write_dotty = !write_dotty diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 24c3c2dcb..4468ec2f4 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -195,6 +195,9 @@ val unsafe_unret : string val use_cost_threshold : bool +(* Suppress unused value warning because the incremental analysis feature is not yet complete *) +val incremental_analysis : bool [@@warning "-32"] + val weak : string val whitelisted_cpp_classes : string list