You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|e_typwhenIntDomain.Size.is_cast_injective ~from_type:e_typ ~to_type:t -> (* TODO: unnecessary cast check due to overflow check below? or maybe useful in general to also assume type bounds based on argument types? *)
272
+
beginmatchIntDomain.Size.is_cast_injective ~from_type:(Cilfacade.typeOf e) ~to_type:t with(* TODO: unnecessary cast check due to overflow check below? or maybe useful in general to also assume type bounds based on argument types? *)
273
+
|true ->
274
274
Unop (Cast, texpr1_expr_of_cil_exp e, Int, Zero) (* TODO: what does Apron Cast actually do? just for floating point and rounding? *)
275
-
| _
276
-
|exceptionCilfacade.TypeOfError_ -> (* typeOf inner e, not outer exp *)
275
+
|false
276
+
|exceptionCilfacade.TypeOfError _ (* typeOf inner e, not outer exp *)
277
+
|exceptionInvalid_argument_ -> (* get_ikind in is_cast_injective *)
277
278
raise Unsupported_CilExp
278
279
end
279
280
|_ ->
@@ -289,7 +290,8 @@ struct
289
290
raise Unsupported_CilExp
290
291
);
291
292
expr
292
-
|exceptionCilfacade.TypeOfError_ ->
293
+
|exceptionCilfacade.TypeOfError _
294
+
|exceptionInvalid_argument_ ->
293
295
raise Unsupported_CilExp
294
296
in
295
297
texpr1_expr_of_cil_exp
@@ -366,7 +368,7 @@ struct
366
368
matchV.to_cil_varinfo fundec v with
367
369
|Somevinfo ->
368
370
(* TODO: What to do with variables that have a type that cannot be stored into ILongLong to avoid overflows? *)
369
-
let var =Cil.mkCast ~e:(Lval(Var vinfo,NoOffset)) ~newt:longlong in
371
+
let var =Cilfacade.mkCast ~e:(Lval(Var vinfo,NoOffset)) ~newt:longlong in
370
372
let coeff, flip = coeff_to_const true c in
371
373
let prod =BinOp(Mult, coeff, var, longlong) in
372
374
if flip then
@@ -884,7 +886,8 @@ struct
884
886
leteval_intde=
885
887
letmoduleID = Queries.IDin
886
888
matchCilfacade.get_ikind_exp e with
887
-
|exceptionCilfacade.TypeOfError_ ->
889
+
|exceptionCilfacade.TypeOfError _
890
+
|exceptionInvalid_argument_ ->
888
891
ID.top ()(* real top, not a top of any ikind because we don't even know the ikind *)
0 commit comments