about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-04 18:47:27 +0000
committerbors <bors@rust-lang.org>2022-04-04 18:47:27 +0000
commit9fd1cdeada90df39a65249c767e3e726d7df6bd9 (patch)
tree51d1dce50e74f3efb57bd208c90d8a7d9e39cc30 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent190f0deac83174de23ff21f980ab514c90e0e59e (diff)
parente4fc15e6467826d1c59219f3963904c776ce7f13 (diff)
downloadrust-9fd1cdeada90df39a65249c767e3e726d7df6bd9.tar.gz
rust-9fd1cdeada90df39a65249c767e3e726d7df6bd9.zip
Auto merge of #8632 - Jarcho:cast_ptr_alignment, r=llogiq
Don't lint `cast_ptr_alignment` when used for unaligned reads and writes

fixes #2881

Ideally this would trace the usage of the value rather than only looking at the parent expression, but that would require dataflow analysis. e.g.
```rust
let x = ptr as *const u16;
c.read_unaligned(x);
```

Arch specific intrinsic functions need to be checked for ones which could take an unaligned pointer. This can be another PR.

changelog: Don't lint `cast_ptr_alignment` when used for unaligned reads and writes
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions