Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions scrutils/src/important/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ pub fn compute_dependent_locals<'tcx>(
engine::iterate_to_fixpoint(tcx, body, location_domain, analysis)
};

trace!("computing location dependencies for {:?}, {:?}", def_id, targets);
trace!(
"computing location dependencies for {:?}, {:?}",
def_id,
targets
);
// Use Flowistry to compute the locations and places influenced by the target.
let location_deps =
flowistry::infoflow::compute_dependencies(&results, targets.clone(), direction)
Expand Down Expand Up @@ -65,9 +69,13 @@ pub fn compute_dependent_locals<'tcx>(
}
},
Either::Right(terminator) => match &terminator.kind {
TerminatorKind::Call { destination, .. } => {
vec![destination.local]
}
TerminatorKind::Call {
destination, args, ..
} => args
.iter()
.filter_map(|op| op.place().map(|place| place.local))
.chain([destination.local])
.collect(),
TerminatorKind::SwitchInt { .. } => vec![],
_ => {
unimplemented!()
Expand Down
1 change: 1 addition & 0 deletions test-crate/scrutinizer-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ allowlist = [

# Format strings.
'alloc\[\w*\]::fmt::format',
'core\[\w*\]::fmt::rt::\{impl#1\}::new',

# Rust 1.70 calls to memcmp to compare slices.
# This is removed in further versions.
Expand Down