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 Jun 15, 2024
1 parent 841a196 commit 710b626
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 @@ -999,7 +999,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 710b626

Please sign in to comment.