aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/CompilerInvocationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
-rw-r--r--clang/unittests/Frontend/CompilerInvocationTest.cpp11
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