aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cflow.mli
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2017-02-15 11:30:14 +0100
committerGitHub <noreply@github.com>2017-02-15 11:30:14 +0100
commit53479577c06db853f48cf9927b5039507436be45 (patch)
tree53583f62226462200c1c00c1e12806c42c9d1a6d /cparser/Cflow.mli
parent4ac453011fb3ee241c6f3023f79c942d99f72eb5 (diff)
parent6805bcf7b3ddd78bcbe0e25618ccaf0429ff78ec (diff)
downloadcompcert-53479577c06db853f48cf9927b5039507436be45.tar.gz
compcert-53479577c06db853f48cf9927b5039507436be45.zip
Merge pull request #162 from AbsInt/return-analysis-2
Improved warnings related to function returns
Diffstat (limited to 'cparser/Cflow.mli')
-rw-r--r--cparser/Cflow.mli24
1 files changed, 24 insertions, 0 deletions
diff --git a/cparser/Cflow.mli b/cparser/Cflow.mli
new file mode 100644
index 00000000..0de245ae
--- /dev/null
+++ b/cparser/Cflow.mli
@@ -0,0 +1,24 @@
+(* *********************************************************************)
+(* *)
+(* The Compcert verified compiler *)
+(* *)
+(* Xavier Leroy, INRIA Paris-Rocquencourt *)
+(* *)
+(* Copyright Institut National de Recherche en Informatique et en *)
+(* Automatique. All rights reserved. This file is distributed *)
+(* under the terms of the GNU General Public License as published by *)
+(* the Free Software Foundation, either version 2 of the License, or *)
+(* (at your option) any later version. This file is also distributed *)
+(* under the terms of the INRIA Non-Commercial License Agreement. *)
+(* *)
+(* *********************************************************************)
+
+(* A simple control flow analysis for C statements.
+ Main purpose: emit warnings for _Noreturn functions. *)
+
+val function_returns: Env.t -> C.stmt -> bool * bool
+ (** Given a function body, returns two Booleans:
+ - the first says whether the function can return
+ - the second says whether the function can return by falling through
+ the end of its body.
+ Both are over-approximations. *)