summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-09-28 20:24:58 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-09-28 20:24:58 +0000
commitac468b49a9a9c7530d3f7515e9ab1ec87ec29df5 (patch)
treeceaec93c3f04f96970895e773f4907413a7845fa /clang/test/SemaObjC
parentcf8846b75e103ba68547cf21fed0479808a9c3c3 (diff)
Support enums with a fixed underlying type in all language modes.
Previously we supported these in C++, ObjC, and C with -fms-extensions. rdar://43831380 Differential revision: https://reviews.llvm.org/D52339
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/enum-fixed-type.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/enum-fixed-type.m b/clang/test/SemaObjC/enum-fixed-type.m
index 37d2810a504..88c895a3398 100644
--- a/clang/test/SemaObjC/enum-fixed-type.m
+++ b/clang/test/SemaObjC/enum-fixed-type.m
@@ -1,9 +1,14 @@
// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -xc %s
#if !__has_feature(objc_fixed_enum)
# error Enumerations with a fixed underlying type are not supported
#endif
+#if !__has_extension(cxx_fixed_enum)
+# error Enumerations with a fixed underlying type are not supported
+#endif
+
typedef long Integer;
typedef enum : Integer { Enumerator1, Enumerator2 } Enumeration;