mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Do not flood on copy_nonoverlapping.
This commit is contained in:
parent
add5124dce
commit
79c073746b
@ -123,16 +123,18 @@ pub trait ValueAnalysis<'tcx> {
|
||||
fn super_intrinsic(
|
||||
&self,
|
||||
intrinsic: &NonDivergingIntrinsic<'tcx>,
|
||||
state: &mut State<Self::Value>,
|
||||
_state: &mut State<Self::Value>,
|
||||
) {
|
||||
match intrinsic {
|
||||
NonDivergingIntrinsic::Assume(..) => {
|
||||
// Could use this, but ignoring it is sound.
|
||||
}
|
||||
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping { dst, .. }) => {
|
||||
if let Some(place) = dst.place() {
|
||||
state.flood(place.as_ref(), self.map());
|
||||
}
|
||||
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping {
|
||||
dst: _,
|
||||
src: _,
|
||||
count: _,
|
||||
}) => {
|
||||
// This statement represents `*dst = *src`, `count` times.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user