summaryrefslogtreecommitdiff
path: root/clang/test/Sema/default.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/default.c')
-rw-r--r--clang/test/Sema/default.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/default.c b/clang/test/Sema/default.c
new file mode 100644
index 0000000..429e63a
--- /dev/null
+++ b/clang/test/Sema/default.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+void f5 (int z) {
+ if (z)
+ default: // expected-error {{not in switch statement}}
+ ;
+}
+