Skip to content

Commit 60f2761

Browse files
committed
add support for ignore-llvm-version
1 parent 54c4762 commit 60f2761

File tree

1 file changed

+15
-7
lines changed
  • src/tools/compiletest/src/header

1 file changed

+15
-7
lines changed

src/tools/compiletest/src/header/cfg.rs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,22 @@ pub(super) fn parse_cfg_name_directive<'a>(
171171
message: "when comparing with {name}",
172172
}
173173

174-
// Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest.
175-
if prefix == "ignore" && name.starts_with("tidy-") && outcome == MatchOutcome::Invalid {
176-
outcome = MatchOutcome::External;
177-
}
174+
if prefix == "ignore" && outcome == MatchOutcome::Invalid {
175+
// Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest.
176+
if name.starts_with("tidy-") {
177+
outcome = MatchOutcome::External;
178+
}
178179

179-
// Don't error out for ignore-pass, as that is handled elsewhere.
180-
if prefix == "ignore" && name == "pass" && outcome == MatchOutcome::Invalid {
181-
outcome = MatchOutcome::External;
180+
// Don't error out for ignore-pass, as that is handled elsewhere.
181+
if name == "pass" {
182+
outcome = MatchOutcome::External;
183+
}
184+
185+
// Don't error out for ignore-llvm-version, that has a custom syntax and is handled
186+
// elsewhere.
187+
if name == "llvm-version" {
188+
outcome = MatchOutcome::External;
189+
}
182190
}
183191

184192
ParsedNameDirective {

0 commit comments

Comments
 (0)