diff options
author | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2017-02-15 11:30:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 11:30:14 +0100 |
commit | 53479577c06db853f48cf9927b5039507436be45 (patch) | |
tree | 53583f62226462200c1c00c1e12806c42c9d1a6d /cparser/Cutil.ml | |
parent | 4ac453011fb3ee241c6f3023f79c942d99f72eb5 (diff) | |
parent | 6805bcf7b3ddd78bcbe0e25618ccaf0429ff78ec (diff) | |
download | compcert-kvx-53479577c06db853f48cf9927b5039507436be45.tar.gz compcert-kvx-53479577c06db853f48cf9927b5039507436be45.zip |
Merge pull request #162 from AbsInt/return-analysis-2
Improved warnings related to function returns
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r-- | cparser/Cutil.ml | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml index 2334966c..18088be7 100644 --- a/cparser/Cutil.ml +++ b/cparser/Cutil.ml @@ -1179,24 +1179,3 @@ let rec subst_stmt phi s = List.map subst_asm_operand inputs, clob) } - -let contains_return s = - let rec aux s = - match s.sdesc with - | Sskip - | Sbreak - | Scontinue - | Sdo _ - | Sdecl _ - | Sasm _ - | Sgoto _ -> false - | Sif(_, s1, s2) - | Sseq(s1, s2) -> aux s1 || aux s2 - | Sswitch (_, s) - | Slabeled (_, s) - | Swhile (_, s) - | Sdowhile(s, _ ) -> aux s - | Sfor(s1, _ , s2, s3) -> aux s1 || aux s2 || aux s3 - | Sreturn _ -> true - | Sblock sl -> List.fold_left (fun acc s -> acc || aux s) false sl in - aux s |