Skip to content

Commit 3905065

Browse files
committed
Change joinLoc error to warning (issue #54)
1 parent 64f3010 commit 3905065

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/frontc/cabshelper.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ let joinLoc l1 l2 = match l1, l2 with
3131
{l1 with endLineno = l2.lineno; endByteno = l2.byteno; endColumnno = l2.columnno}
3232
| l1, l2 when l1.filename = l2.filename && l1.endByteno = l2.endByteno && l1.byteno = l2.byteno ->
3333
l1 (* alias fundefs *)
34-
| _, _ -> Errormsg.s (Errormsg.unimp "joinLoc %s %s" (string_of_loc l1) (string_of_loc l2))
34+
| _, _ ->
35+
(* some code generators leave start and end into different files: https://github.com/goblint/cil/issues/54 *)
36+
Errormsg.warn "joinLoc %s %s" (string_of_loc l1) (string_of_loc l2);
37+
l1 (* no way to give an actual range *)
3538

3639
(* clexer puts comments here *)
3740
let commentsGA = GrowArray.make 100 (GrowArray.Elem(cabslu,"",false))

0 commit comments

Comments
 (0)