Skip to content

Commit 0109577

Browse files
committed
Exclude string constant cast invariants from var_eq (issue #1722)
See #1722 (comment).
1 parent 2b61d84 commit 0109577

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/analyses/varEq.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ struct
1717
struct
1818
include PartitionDomain.ExpPartitions
1919

20-
let is_str_constant = function
20+
(* TODO: Should string constants not be added to D in the first place, rather than filtering them for witness invariants? *)
21+
let rec is_str_constant = function
2122
| Const (CStr _ | CWStr _) -> true
23+
| CastE (_, e) -> is_str_constant e
2224
| _ -> false
2325

2426
let invariant ~scope ss =

0 commit comments

Comments
 (0)