summaryrefslogtreecommitdiff
path: root/src/reporting.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/reporting.ml')
-rw-r--r--src/reporting.ml9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/reporting.ml b/src/reporting.ml
index d5e3003c..603bc84f 100644
--- a/src/reporting.ml
+++ b/src/reporting.ml
@@ -127,6 +127,11 @@ let short_loc_to_string l =
Printf.sprintf "%s %d:%d - %d:%d"
p1.pos_fname p1.pos_lnum (p1.pos_cnum - p1.pos_bol) p2.pos_lnum (p2.pos_cnum - p2.pos_bol)
+let loc_to_coverage l =
+ match simp_loc l with
+ | None -> None
+ | Some (p1, p2) -> Some (p1.pos_fname, p1.pos_cnum - p1.pos_bol, p2.pos_lnum, p2.pos_cnum - p2.pos_bol)
+
let print_err l m1 m2 =
print_err_internal (Loc l) m1 m2
@@ -179,7 +184,7 @@ let ignored_files = ref StringSet.empty
let suppress_warnings_for_file f =
ignored_files := StringSet.add f !ignored_files
-
+
let warn str1 l str2 =
if !opt_warnings then
match simp_loc l with
@@ -191,3 +196,5 @@ let warn str1 l str2 =
| Some _ -> ()
else
()
+
+let simple_warn str = warn str Parse_ast.Unknown ""