summaryrefslogtreecommitdiff
path: root/test/Frontend/warning-mapping-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Frontend/warning-mapping-3.c')
-rw-r--r--test/Frontend/warning-mapping-3.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Frontend/warning-mapping-3.c b/test/Frontend/warning-mapping-3.c
new file mode 100644
index 0000000000000..8c701903f4e87
--- /dev/null
+++ b/test/Frontend/warning-mapping-3.c
@@ -0,0 +1,10 @@
+// Check that -Werror and -Wfatal-error interact properly.
+//
+// Verify mode doesn't work with fatal errors, just use FileCheck here.
+//
+// RUN: not %clang_cc1 -Wunused-function -Werror -Wfatal-errors %s 2> %t.err
+// RUN: FileCheck < %t.err %s
+// CHECK: fatal error: unused function
+// CHECK: 1 error generated
+
+static void f0(void) {} // expected-fatal {{unused function}}