summaryrefslogtreecommitdiff
path: root/clang/test/Frontend/warning-mapping-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Frontend/warning-mapping-3.c')
-rw-r--r--clang/test/Frontend/warning-mapping-3.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Frontend/warning-mapping-3.c b/clang/test/Frontend/warning-mapping-3.c
new file mode 100644
index 0000000..8c70190
--- /dev/null
+++ b/clang/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}}