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 Apr 25, 2024
1 parent 165f7b1 commit 0a55190
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 @@ -993,7 +993,10 @@ fn run(tcx: TyCtxt) {
if !node_info.unique {
perms.remove(PermissionSet::UNIQUE);
}
// TODO: PermissionSet::NON_NULL
if let Some(true) = 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 0a55190

Please sign in to comment.