From d8bd7b7deb0ac4d5bc8bafacee6ff15662b70c8a Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Wed, 20 Dec 2017 08:09:18 -0800 Subject: [PATCH] [inferbo] Only use inferbo models when biabduction is off Reviewed By: sblackshear Differential Revision: D6611037 fbshipit-source-id: 6d75743 --- infer/src/clang/ClangCommand.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/infer/src/clang/ClangCommand.ml b/infer/src/clang/ClangCommand.ml index 5e9b5c60b..28d05a471 100644 --- a/infer/src/clang/ClangCommand.ml +++ b/infer/src/clang/ClangCommand.ml @@ -111,7 +111,9 @@ let clang_cc1_cmd_sanitizer cmd = arg else arg in - let args_defines = if Config.bufferoverrun then ["-D__INFER_BUFFEROVERRUN"] else [] in + let args_defines = + if Config.bufferoverrun && not Config.biabduction then ["-D__INFER_BUFFEROVERRUN"] else [] + in let post_args_rev = [] |> List.rev_append ["-include"; Config.lib_dir ^/ "clang_wrappers" ^/ "global_defines.h"] |> List.rev_append args_defines @@ -153,9 +155,6 @@ let command_to_run cmd = let with_exec exec args = {args with exec} let with_plugin_args args = - if Config.cxx_infer_headers && Config.biabduction && Config.bufferoverrun then - L.(die UserError) - "The biabduction and bufferoverrun analyses have conflicting header models for C++. Either disable infer's custom C++ headers (--no-cxx-infer-headers), the biabduction analysis (--no-biabduction), or the bufferoverrun analysis (--no-bufferoverrun)." ; let plugin_arg_flag = "-plugin-arg-" ^ plugin_name in let args_before_rev = []