From 60f2761503143937102f37e7ec07ecf2b5b2923e Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 16 Mar 2023 10:19:14 +0100 Subject: [PATCH] add support for ignore-llvm-version --- src/tools/compiletest/src/header/cfg.rs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs index e1931474a5f..ffb81dfdcdb 100644 --- a/src/tools/compiletest/src/header/cfg.rs +++ b/src/tools/compiletest/src/header/cfg.rs @@ -171,14 +171,22 @@ pub(super) fn parse_cfg_name_directive<'a>( message: "when comparing with {name}", } - // Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest. - if prefix == "ignore" && name.starts_with("tidy-") && outcome == MatchOutcome::Invalid { - outcome = MatchOutcome::External; - } + if prefix == "ignore" && outcome == MatchOutcome::Invalid { + // Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest. + if name.starts_with("tidy-") { + outcome = MatchOutcome::External; + } - // Don't error out for ignore-pass, as that is handled elsewhere. - if prefix == "ignore" && name == "pass" && outcome == MatchOutcome::Invalid { - outcome = MatchOutcome::External; + // Don't error out for ignore-pass, as that is handled elsewhere. + if name == "pass" { + outcome = MatchOutcome::External; + } + + // Don't error out for ignore-llvm-version, that has a custom syntax and is handled + // elsewhere. + if name == "llvm-version" { + outcome = MatchOutcome::External; + } } ParsedNameDirective {