Skip to content

Commit 4bb4437

Browse files
committed
Use GoblintCil.upointType directly
Avoid reconstructing type from which the ikind was extracted to begin with.
1 parent 0ddd5cf commit 4bb4437

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cdomain/value/cdomains/valueDomain.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ struct
702702
| (x, Top) -> x
703703
| (Int x, Int y) -> Int (ID.meet x y)
704704
| (Float x, Float y) -> Float (FD.meet x y)
705-
| (Int _, Address _) -> meet x (cast (TInt(Cilfacade.ptr_ikind (),[])) y)
705+
| (Int _, Address _) -> meet x (cast !GoblintCil.upointType y)
706706
| (Address x, Int y) -> Address (AD.meet x (AD.of_int y))
707707
| (Address x, Address y) -> Address (AD.meet x y)
708708
| (Struct x, Struct y) -> Struct (Structs.meet x y)
@@ -727,7 +727,7 @@ struct
727727
match (x,y) with
728728
| (Int x, Int y) -> Int (ID.narrow x y)
729729
| (Float x, Float y) -> Float (FD.narrow x y)
730-
| (Int _, Address _) -> narrow x (cast (TInt(Cilfacade.ptr_ikind (),[])) y)
730+
| (Int _, Address _) -> narrow x (cast !GoblintCil.upointType y)
731731
| (Address x, Int y) -> Address (AD.narrow x (AD.of_int y))
732732
| (Address x, Address y) -> Address (AD.narrow x y)
733733
| (Struct x, Struct y) -> Struct (Structs.narrow x y)

0 commit comments

Comments
 (0)