From 55b18df306ec2165b42ec730f3749a31ec5bd7dc Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Thu, 9 Mar 2017 05:16:14 -0800 Subject: [PATCH] [clang] Make translation failures crash InferClang when --no-failures-allowed is set Reviewed By: dulmarod Differential Revision: D4674144 fbshipit-source-id: 44c0a80 --- infer/src/clang/cFrontend_decl.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/clang/cFrontend_decl.ml b/infer/src/clang/cFrontend_decl.ml index 9ebaf6d82..846cb1b15 100644 --- a/infer/src/clang/cFrontend_decl.ml +++ b/infer/src/clang/cFrontend_decl.ml @@ -48,7 +48,7 @@ struct (* this shouldn't happen, because self or [a class] should always be arguments of functions. This is to make sure I'm not wrong. *) assert false - | Assert_failure (file, line, column) -> + | Assert_failure (file, line, column) when Config.failures_allowed -> Logging.out "Fatal error: exception Assert_failure(%s, %d, %d)\n%!" file line column; Cfg.remove_proc_desc cfg procname; CMethod_trans.create_external_procdesc cfg procname is_objc_method None;