We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6bf0b6 commit 3efc250Copy full SHA for 3efc250
1 file changed
CodeHawk/CHC/cchanalyze/cCHCallTranslator.ml
@@ -80,11 +80,9 @@ let is_library_function (fname:string): bool =
80
if CCHDeclarations.cdeclarations#has_varinfo_by_name fname then
81
let varinfo = CCHDeclarations.cdeclarations#get_varinfo_by_name fname in
82
(* starts with '/' ? *)
83
- try
84
- String.index_from varinfo.vdecl.file 0 '/' = 0
85
- with
86
- | Invalid_argument _
87
- | Not_found -> false
+ match String.index_opt varinfo.vdecl.file '/' with
+ | Some i -> i = 0
+ | _ -> false
88
else
89
false
90
0 commit comments