Skip to content

Commit 7f45d16

Browse files
committed
Fix sanitize/cfg.rs test
* Move needs-sanitizer conditions to specific revisions that require them (otherwise the conditions are mutually exclusive with needs-sanitizer-kcfi and test is always ignored). * Add missing revisions
1 parent 9be4eac commit 7f45d16

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: tests/ui/sanitize/cfg.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
// the `#[cfg(sanitize = "option")]` attribute is configured.
33

44
// needs-sanitizer-support
5-
// needs-sanitizer-address
6-
// needs-sanitizer-cfi
7-
// needs-sanitizer-kcfi
8-
// needs-sanitizer-leak
9-
// needs-sanitizer-memory
10-
// needs-sanitizer-thread
115
// check-pass
12-
// revisions: address leak memory thread
6+
// revisions: address cfi kcfi leak memory thread
7+
//[address]needs-sanitizer-address
138
//[address]compile-flags: -Zsanitizer=address --cfg address
14-
//[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi
9+
//[cfi]needs-sanitizer-cfi
10+
//[cfi]compile-flags: -Zsanitizer=cfi --cfg cfi -Clto
11+
//[kcfi]needs-sanitizer-kcfi
1512
//[kcfi]compile-flags: -Zsanitizer=kcfi --cfg kcfi
13+
//[leak]needs-sanitizer-leak
1614
//[leak]compile-flags: -Zsanitizer=leak --cfg leak
15+
//[memory]needs-sanitizer-memory
1716
//[memory]compile-flags: -Zsanitizer=memory --cfg memory
17+
//[thread]needs-sanitizer-thread
1818
//[thread]compile-flags: -Zsanitizer=thread --cfg thread
1919

2020
#![feature(cfg_sanitize)]

0 commit comments

Comments
 (0)