Skip to content

Commit

Permalink
Unroll type in is_statically_safe_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Feb 13, 2025
1 parent 7329091 commit 7bb50c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cdomain/value/cdomains/valueDomain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ struct
************************************************************)

(* is a cast t1 to t2 invertible, i.e., content-preserving in general? *)
let is_statically_safe_cast t2 t1 = match t2, t1 with
let is_statically_safe_cast t2 t1 = match unrollType t2, unrollType t1 with
(*| TPtr _, t -> bitsSizeOf t <= bitsSizeOf !upointType
| t, TPtr _ -> bitsSizeOf t >= bitsSizeOf !upointType*)
| TFloat (fk1,_), TFloat (fk2,_) when fk1 = fk2 -> true
Expand Down

0 comments on commit 7bb50c1

Please sign in to comment.