r217783 - Objective-C SDK modernizer. Do not modernize an enum
Fariborz Jahanian
fjahanian at apple.com
Mon Sep 15 09:41:48 PDT 2014
Author: fjahanian
Date: Mon Sep 15 11:41:47 2014
New Revision: 217783
URL: http://llvm.org/viewvc/llvm-project?rev=217783&view=rev
Log:
Objective-C SDK modernizer. Do not modernize an enum
which already has the underlying interger type specification.
// rdar://1826225
Modified:
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/test/ARCMT/objcmt-ns-macros.m
cfe/trunk/test/ARCMT/objcmt-ns-macros.m.result
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=217783&r1=217782&r2=217783&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Mon Sep 15 11:41:47 2014
@@ -760,7 +760,7 @@ bool ObjCMigrateASTConsumer::migrateNSEn
const EnumDecl *EnumDcl,
const TypedefDecl *TypedefDcl) {
if (!EnumDcl->isCompleteDefinition() || EnumDcl->getIdentifier() ||
- EnumDcl->isDeprecated())
+ EnumDcl->isDeprecated() || EnumDcl->getIntegerTypeSourceInfo())
return false;
if (!TypedefDcl) {
if (NSIntegerTypedefed) {
Modified: cfe/trunk/test/ARCMT/objcmt-ns-macros.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-ns-macros.m?rev=217783&r1=217782&r2=217783&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-ns-macros.m (original)
+++ cfe/trunk/test/ARCMT/objcmt-ns-macros.m Mon Sep 15 11:41:47 2014
@@ -294,3 +294,11 @@ enum {
NSWindowToolbarButton,
NSWindowDocumentIconButton
};
+
+// rdar://18262255
+typedef enum : NSUInteger {
+ ThingOne,
+ ThingTwo,
+ ThingThree,
+} Thing;
+
Modified: cfe/trunk/test/ARCMT/objcmt-ns-macros.m.result
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-ns-macros.m.result?rev=217783&r1=217782&r2=217783&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-ns-macros.m.result (original)
+++ cfe/trunk/test/ARCMT/objcmt-ns-macros.m.result Mon Sep 15 11:41:47 2014
@@ -277,3 +277,11 @@ typedef NS_ENUM(NSUInteger, NSSelectionD
};
// standard window buttons
+
+// rdar://18262255
+typedef enum : NSUInteger {
+ ThingOne,
+ ThingTwo,
+ ThingThree,
+} Thing;
+
More information about the cfe-commits
mailing list