1 // Verifies that no_sanitize attribute prevents inlining when
2 // given sanitizer is enabled, but has no effect on inlining otherwise.
4 // needs-sanitizer-address
5 // needs-sanitizer-leak
6 // revisions: ASAN LSAN
7 //[ASAN] compile-flags: -Zsanitizer=address -C opt-level=3 -Z mir-opt-level=4
8 //[LSAN] compile-flags: -Zsanitizer=leak -C opt-level=3 -Z mir-opt-level=4
11 #![feature(no_sanitize)]
13 // ASAN-LABEL: define void @test
14 // ASAN: call {{.*}} @random_inline
17 // LSAN-LABEL: define void @test
21 pub fn test(n: &mut u32) {
25 #[no_sanitize(address)]
28 pub fn random_inline(n: &mut u32) {