diff options
| author | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-03-16 10:19:14 +0100 |
|---|---|---|
| committer | Pietro Albini <pietro.albini@ferrous-systems.com> | 2023-04-03 09:30:36 +0200 |
| commit | 60f2761503143937102f37e7ec07ecf2b5b2923e (patch) | |
| tree | b48280b6161f504ddb0217bf3021ae1170fec5a1 | |
| parent | 54c4762a86e4c278f8aa97d7136997cd77d4ede7 (diff) | |
add support for ignore-llvm-version
| -rw-r--r-- | src/tools/compiletest/src/header/cfg.rs | 22 |
1 files 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 { |
