@@ -6,7 +6,7 @@ let getident () =
66 nextident := ! nextident + 1 ;
77 ! nextident
88
9- let currentLoc () =
9+ let currentLoc () =
1010 let l, f, c, lc = Errormsg. getPosition () in
1111 { lineno = l;
1212 filename = f;
@@ -17,8 +17,8 @@ let currentLoc () =
1717 endByteno = - 1 ;
1818 endColumnno = - 1 ;}
1919
20- let cabslu = {lineno = - 10 ;
21- filename = " cabs loc unknown" ;
20+ let cabslu = {lineno = - 10 ;
21+ filename = " cabs loc unknown" ;
2222 byteno = - 10 ; columnno = - 10 ;
2323 ident = 0 ;
2424 endLineno = - 10 ; endByteno = - 10 ; endColumnno = - 10 ;}
@@ -27,9 +27,9 @@ let string_of_loc l =
2727 Printf. sprintf " %s:%d:%d-%d:%d" l.filename l.lineno l.columnno l.endLineno l.endColumnno
2828
2929let joinLoc l1 l2 = match l1, l2 with
30- | l1 , l2 when l1.filename = l2.filename && l1.endByteno < 0 && l2.endByteno < 0 && l1.byteno < = l2.byteno ->
30+ | l1 , l2 when l1.filename = l2.filename && l1.endByteno < 0 && l2.endByteno < 0 && l1.byteno < = l2.byteno ->
3131 {l1 with endLineno = l2.lineno; endByteno = l2.byteno; endColumnno = l2.columnno}
32- | l1 , l2 when l1.filename = l2.filename && l1.endByteno = l2.endByteno && l1.byteno = l2.byteno ->
32+ | l1 , l2 when l1.filename = l2.filename && l1.endByteno = l2.endByteno && l1.byteno = l2.byteno ->
3333 l1 (* alias fundefs *)
3434 | _ , _ ->
3535 (* some code generators leave start and end into different files: https://github.com/goblint/cil/issues/54 *)
@@ -76,6 +76,7 @@ let get_definitionloc (d : definition) : cabsloc =
7676 | TRANSFORMER (_ , _ , l ) -> l
7777 | EXPRTRANSFORMER (_ , _ , l ) -> l
7878 | LINKAGE (_ , l , _ ) -> l
79+ | STATIC_ASSERT (_ ,_ ,l ) -> l
7980
8081let get_statementloc (s : statement ) : cabsloc =
8182begin
@@ -103,23 +104,23 @@ begin
103104end
104105
105106
106- let explodeStringToInts (s : string ) : int64 list =
107- let rec allChars i acc =
107+ let explodeStringToInts (s : string ) : int64 list =
108+ let rec allChars i acc =
108109 if i < 0 then acc
109110 else allChars (i - 1 ) (Int64. of_int (Char. code (String. get s i)) :: acc)
110111 in
111112 allChars (- 1 + String. length s) []
112113
113114let valueOfDigit chr =
114- let int_value =
115+ let int_value =
115116 match chr with
116117 '0' ..'9' -> (Char. code chr) - (Char. code '0' )
117118 | 'a' ..'z' -> (Char. code chr) - (Char. code 'a' ) + 10
118119 | 'A' ..'Z' -> (Char. code chr) - (Char. code 'A' ) + 10
119120 | _ -> Errormsg. s (Errormsg. bug " not a digit" ) in
120121 Int64. of_int int_value
121-
122-
122+
123+
123124open Pretty
124- let d_cabsloc () cl =
125+ let d_cabsloc () cl =
125126 text cl.filename ++ text " :" ++ num cl.lineno
0 commit comments