From 135ac8be7c52d125187d04f6a223c3eca17cf944 Mon Sep 17 00:00:00 2001 From: Sam Blackshear Date: Mon, 1 May 2017 10:04:22 -0700 Subject: [PATCH] [integration] make it possible to run Inferbo/Quandary/Siof/Threadsafety on Clang buck projects Summary: Before, running any of these would crash with `Unsupported infer analyzer with Buck flavors:` Reviewed By: jberdine Differential Revision: D4970769 fbshipit-source-id: 76be6d5 --- infer/src/checkers/registerCheckers.ml | 1 + infer/src/integration/Buck.ml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/infer/src/checkers/registerCheckers.ml b/infer/src/checkers/registerCheckers.ml index 146ab8cd9..c06949219 100644 --- a/infer/src/checkers/registerCheckers.ml +++ b/infer/src/checkers/registerCheckers.ml @@ -52,6 +52,7 @@ let active_procedure_checkers () = Checkers.callback_print_access_to_globals, false; ClangTaintAnalysis.checker, Config.quandary; Siof.checker, Config.siof; + ThreadSafety.analyze_procedure, Config.threadsafety; BufferOverrunChecker.checker, Config.bufferoverrun; ] in List.map ~f:(fun (x, y) -> (x, y, Some Config.Clang)) l in diff --git a/infer/src/integration/Buck.ml b/infer/src/integration/Buck.ml index 656e4f44a..0035dc7e6 100644 --- a/infer/src/integration/Buck.ml +++ b/infer/src/integration/Buck.ml @@ -51,10 +51,10 @@ let add_flavor_to_target target = target | None, (Linters | Capture) -> add "infer-capture-all" - | None, (Checkers | Infer) -> + | None, (Bufferoverrun | Checkers | Infer | Quandary | Siof | Threadsafety) -> add "infer" - | None, (Eradicate | Tracing | Crashcontext | Quandary | Siof | Threadsafety | Bufferoverrun) -> - failwithf "Unsupported infer analyzer with Buck flavors: %s" + | None, (Eradicate | Tracing | Crashcontext) -> + failwithf "Analyzer %s is Java-only; not supported with Buck flavors" (Config.string_of_analyzer Config.analyzer) let add_flavors_to_buck_command build_cmd =