From 20c7b4d292ca1e69b66d10e8b0054982fe464714 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 16 Feb 2017 16:45:05 +0100 Subject: Added handling for noreturn std functions. The C11 standard declares exit,abort,_Exit,quick_exit and thrd_exit as _Noreturn however this is not included in older C libs and leads to false negatives in reporting _Noreturn and return type warnings. This can be avoided by enhancing the noreturn check of the Cflow analysis to also test if one of the above functions is called. Bug 21009 --- cparser/Cutil.mli | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cparser/Cutil.mli') diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli index a1b9cd26..715cc123 100644 --- a/cparser/Cutil.mli +++ b/cparser/Cutil.mli @@ -210,6 +210,8 @@ val type_of_member : Env.t -> field -> typ (* Return the type of accessing the given field [fld]. Normally it's [fld.fld_type] but there is a special case for small unsigned bitfields. *) +val is_call_to_fun : exp -> string -> bool + (* Test whether the caller is the given function *) val is_debug_stmt : stmt -> bool (* Is the given statement a call to debug builtin? *) val is_literal_0 : exp -> bool -- cgit