Skip to content

Commit

Permalink
Use PDG to remove NON_NULL from pointers in static analysis
Browse files Browse the repository at this point in the history
Remove the NON_NULL permission from all nodes in
the null graph from the PDG.
  • Loading branch information
ahomescu committed Jul 26, 2024
1 parent 79a78da commit abc0372
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion c2rust-analyze/src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,10 @@ fn run(tcx: TyCtxt) {
if !node_info.unique {
perms.remove(PermissionSet::UNIQUE);
}
// TODO: PermissionSet::NON_NULL
if g.is_null {
// TODO: is this enough?
perms.remove(PermissionSet::NON_NULL);
}

if perms != old_perms {
let added = perms & !old_perms;
Expand Down

0 comments on commit abc0372

Please sign in to comment.