diff options
| author | Alasdair | 2020-05-21 15:30:43 +0100 |
|---|---|---|
| committer | Alasdair | 2020-05-21 15:30:43 +0100 |
| commit | 8320ddc4b19d622f8ab5ab8625dde45fccbf383b (patch) | |
| tree | 4ebd634581c6ffe6c5b61ad9437692a1856a81c6 /src/reporting.ml | |
| parent | 3311b7d4c5aeebacdbcd14602d7a8a75a9c1b258 (diff) | |
| parent | 92b0564856fb3e20a09bead04d5c1b21eed224e1 (diff) | |
Merge branch 'sail2' into mono-tweaks
Diffstat (limited to 'src/reporting.ml')
| -rw-r--r-- | src/reporting.ml | 9 |
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 "" |
