diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 162ea3ee7..61203dc14 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -113,6 +113,8 @@ let captured_dir_name = "captured" let clang_initializer_prefix = "__infer_globals_initializer_" +let classnames_dir_name = "classnames" + (** Experimental: if true do some specialized analysis of concurrent constructs. *) let csl_analysis = true diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 122a4900d..f41c8ff03 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -66,7 +66,7 @@ type os_type = Unix | Win32 | Cygwin type compilation_database_dependencies = | Deps of int option - (** get the compilation database of the dependencies up to depth n + (** get the compilation database of the dependencies up to depth n by [Deps (Some n)], or all by [Deps None] *) | NoDeps [@@deriving compare] @@ -101,6 +101,8 @@ val captured_dir_name : string val clang_initializer_prefix : string +val classnames_dir_name : string + val classpath : string option val cpp_extra_include_dir : string diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index e77696271..58c08abd1 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -132,13 +132,12 @@ let clean_results_dir () = (* In Buck flavors mode we keep all capture data, but in Java mode we keep only the tenv *) let should_delete_dir = let dirs_to_delete = - "backend_stats" - :: "classnames" - :: "filelists" - :: "frontend_stats" - :: "multicore" - :: "reporting_stats" - :: "sources" :: (if Config.flavors then [] else ["attributes"]) + let open Config in + backend_stats_dir_name + :: classnames_dir_name + :: frontend_stats_dir_name + :: multicore_dir_name + :: reporting_stats_dir_name :: (if Config.flavors then [] else [attributes_dir_name]) in List.mem ~equal:String.equal dirs_to_delete in diff --git a/infer/src/java/jFrontend.ml b/infer/src/java/jFrontend.ml index 869c38521..0248f9a29 100644 --- a/infer/src/java/jFrontend.ml +++ b/infer/src/java/jFrontend.ml @@ -107,7 +107,7 @@ let add_cmethod source_file program linereader icfg cm proc_name = add_edges context start_node exn_node [exit_node] method_body_nodes jbir_code false let path_of_cached_classname cn = - let root_path = Filename.concat Config.results_dir "classnames" in + let root_path = Config.(results_dir ^/ classnames_dir_name) in let package_path = List.fold ~f:Filename.concat ~init:root_path (JBasics.cn_package cn) in Filename.concat package_path (JBasics.cn_simple_name cn ^ ".java")