summaryrefslogtreecommitdiff
path: root/test/ARCMT
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2015-01-26 17:41:03 +0000
committerFariborz Jahanian <fjahanian@apple.com>2015-01-26 17:41:03 +0000
commit138133f406699ca702ceb68dcd227025faa81979 (patch)
tree9fef34d4ca1512f9956502e72bbafd99ac44eab1 /test/ARCMT
parentd6bdd305019999412410a53164dc2d1ee0732f27 (diff)
Objective-C SDK modernizer to use NS_ENUM/NS_OPTIONS macros
with typed enums. rdar://19352510 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ARCMT')
-rw-r--r--test/ARCMT/objcmt-ns-macros.m16
-rw-r--r--test/ARCMT/objcmt-ns-macros.m.result20
2 files changed, 34 insertions, 2 deletions
diff --git a/test/ARCMT/objcmt-ns-macros.m b/test/ARCMT/objcmt-ns-macros.m
index 1d5583b92f..795b94a825 100644
--- a/test/ARCMT/objcmt-ns-macros.m
+++ b/test/ARCMT/objcmt-ns-macros.m
@@ -363,3 +363,19 @@ enum
UIU8one = 1
};
typedef uint8_t UI8Type;
+
+// rdar://19352510
+typedef enum : NSInteger {zero} MyEnum;
+
+typedef enum : NSUInteger {two} MyEnumNSUInteger;
+
+typedef enum : int {three, four} MyEnumint;
+
+typedef enum : unsigned long {five} MyEnumlonglong;
+
+typedef enum : unsigned long long {
+ ll1,
+ ll2= 0xff,
+ ll3,
+ ll4
+} MyEnumunsignedlonglong;
diff --git a/test/ARCMT/objcmt-ns-macros.m.result b/test/ARCMT/objcmt-ns-macros.m.result
index 63eec7d37e..094c4441ef 100644
--- a/test/ARCMT/objcmt-ns-macros.m.result
+++ b/test/ARCMT/objcmt-ns-macros.m.result
@@ -291,11 +291,11 @@ typedef NS_ENUM(NSUInteger, NSSelectionDirection) {
// standard window buttons
// rdar://18262255
-typedef enum : NSUInteger {
+typedef NS_ENUM(NSUInteger, Thing) {
ThingOne,
ThingTwo,
ThingThree,
-} Thing;
+};
// rdar://18498539
typedef NS_ENUM(unsigned int, NumericEnum) {
@@ -342,3 +342,19 @@ typedef NS_ENUM(uint8_t, UI8Type)
{
UIU8one = 1
};
+
+// rdar://19352510
+typedef NS_ENUM(NSInteger, MyEnum) {zero};
+
+typedef NS_ENUM(NSUInteger, MyEnumNSUInteger) {two};
+
+typedef NS_ENUM(int, MyEnumint) {three, four};
+
+typedef NS_ENUM(unsigned long, MyEnumlonglong) {five};
+
+typedef NS_ENUM(unsigned long long, MyEnumunsignedlonglong) {
+ ll1,
+ ll2= 0xff,
+ ll3,
+ ll4
+};