diff options
author | Kadir Cetinkaya <kadircet@google.com> | 2024-11-13 09:34:23 +0100 |
---|---|---|
committer | Kadir Cetinkaya <kadircet@google.com> | 2024-11-13 10:35:22 +0100 |
commit | 5845688e91d85d46c0f47daaf4edfdfc772853cf (patch) | |
tree | 2041b20e105163e2a1297fe34c69b31e3a560960 /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | 42da81582ea5a0e5bb0e18af74e6c101f0307f36 (diff) | |
download | llvm-5845688e91d85d46c0f47daaf4edfdfc772853cf.zip llvm-5845688e91d85d46c0f47daaf4edfdfc772853cf.tar.gz llvm-5845688e91d85d46c0f47daaf4edfdfc772853cf.tar.bz2 |
Reapply "[clang] Introduce diagnostics suppression mappings (#112517)"
This reverts commit 5f140ba54794fe6ca379362b133eb27780e363d7.
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
-rw-r--r-- | clang/unittests/Frontend/CompilerInvocationTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp index 7912253..45478de 100644 --- a/clang/unittests/Frontend/CompilerInvocationTest.cpp +++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp @@ -1046,4 +1046,15 @@ TEST_F(CommandLineTest, PluginArgsRoundTripDeterminism) { ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); } + +TEST_F(CommandLineTest, WarningSuppressionMappings) { + const char *Args[] = {"--warning-suppression-mappings=foo.txt"}; + + EXPECT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); + EXPECT_EQ(Invocation.getDiagnosticOpts().DiagnosticSuppressionMappingsFile, + "foo.txt"); + + Invocation.generateCC1CommandLine(GeneratedArgs, *this); + EXPECT_THAT(GeneratedArgs, Contains(StrEq(Args[0]))); +} } // anonymous namespace |