summaryrefslogtreecommitdiff
path: root/clang/test/Sema/short-enums.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/short-enums.c')
-rw-r--r--clang/test/Sema/short-enums.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/short-enums.c b/clang/test/Sema/short-enums.c
new file mode 100644
index 0000000..6605c4e
--- /dev/null
+++ b/clang/test/Sema/short-enums.c
@@ -0,0 +1,5 @@
+// RUN: not %clang_cc1 -fsyntax-only %s -verify
+// RUN: %clang_cc1 -fshort-enums -fsyntax-only %s -verify
+
+enum x { A };
+int t0[sizeof(enum x) == 1 ? 1 : -1];