void ObjCMigrateASTConsumer::migrateObjCInterfaceDecl(ASTContext &Ctx,
ObjCContainerDecl *D) {
+ if (D->isDeprecated())
+ return;
+
for (ObjCContainerDecl::method_iterator M = D->meth_begin(), MEnd = D->meth_end();
M != MEnd; ++M) {
ObjCMethodDecl *Method = (*M);
+ if (Method->isDeprecated())
+ continue;
if (!migrateProperty(Ctx, D, Method))
migrateNsReturnsInnerPointer(Ctx, Method);
}
void ObjCMigrateASTConsumer::migrateProtocolConformance(ASTContext &Ctx,
const ObjCImplementationDecl *ImpDecl) {
const ObjCInterfaceDecl *IDecl = ImpDecl->getClassInterface();
- if (!IDecl || ObjCProtocolDecls.empty())
+ if (!IDecl || ObjCProtocolDecls.empty() || IDecl->isDeprecated())
return;
// Find all implicit conforming protocols for this class
// and make them explicit.
const EnumDecl *EnumDcl,
const TypedefDecl *TypedefDcl) {
if (!EnumDcl->isCompleteDefinition() || EnumDcl->getIdentifier() ||
- !TypedefDcl->getIdentifier())
+ !TypedefDcl->getIdentifier() ||
+ EnumDcl->isDeprecated() || TypedefDcl->isDeprecated())
return;
QualType qt = TypedefDcl->getTypeSourceInfo()->getType();
MEnd = CDecl->meth_end();
M != MEnd; ++M) {
ObjCMethodDecl *Method = (*M);
+ if (Method->isDeprecated())
+ continue;
migrateMethodInstanceType(Ctx, CDecl, Method);
}
}
}
void ObjCMigrateASTConsumer::migrateCFAnnotation(ASTContext &Ctx, const Decl *Decl) {
+ if (Decl->isDeprecated())
+ return;
+
if (Decl->hasAttr<CFAuditedTransferAttr>()) {
assert(CFFunctionIBCandidates.empty() &&
"Cannot have audited functions/methods inside user "
void ObjCMigrateASTConsumer::migrateARCSafeAnnotation(ASTContext &Ctx,
ObjCContainerDecl *CDecl) {
- if (!isa<ObjCInterfaceDecl>(CDecl))
+ if (!isa<ObjCInterfaceDecl>(CDecl) || CDecl->isDeprecated())
return;
// migrate methods which can have instancetype as their result type.
D != DEnd; ++D) {
if (unsigned FID =
PP.getSourceManager().getFileID((*D)->getLocation()).getHashValue())
- if (FileId && FileId != FID) {
- assert(!CFFunctionIBCandidates.empty());
+ if (FileId && FileId != FID)
AnnotateImplicitBridging(Ctx);
- }
if (ObjCInterfaceDecl *CDecl = dyn_cast<ObjCInterfaceDecl>(*D))
migrateObjCInterfaceDecl(Ctx, CDecl);
io_service_t IOServiceGetMatchingService( mach_port_t masterPort, CFDictionaryRef matching );
kern_return_t IOServiceGetMatchingServices( mach_port_t masterPort, CFDictionaryRef matching, io_iterator_t * existing );
-kern_return_t IOServiceAddNotification( mach_port_t masterPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated));
CF_IMPLICIT_BRIDGING_DISABLED
- // expected-note {{'IOServiceAddNotification' declared here}}
+
+kern_return_t IOServiceAddNotification( mach_port_t masterPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
kern_return_t IOServiceAddMatchingNotification( IONotificationPortRef notifyPort, const io_name_t notificationType, CFDictionaryRef CF_CONSUMED matching, IOServiceMatchingCallback callback, void * refCon, io_iterator_t * notification );
CF_IMPLICIT_BRIDGING_ENABLED
@class NSString, NSURL;
@interface NSString (NSStringDeprecated)
-+ (id)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
-+ (id)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
-+ (id)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
-+ (id)stringWithCString:(const char *)bytes __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
++ (id)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithCString:(const char *)bytes __attribute__((availability(macosx,introduced=10.0 ,message="" )));
@end
@class NSString, NSURL;
@interface NSString (NSStringDeprecated)
-+ (instancetype)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
-+ (instancetype)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
-+ (instancetype)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
-+ (instancetype)stringWithCString:(const char *)bytes __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.4,message="" )));
++ (instancetype)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (instancetype)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (instancetype)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (instancetype)stringWithCString:(const char *)bytes __attribute__((availability(macosx,introduced=10.0 ,message="" )));
@end
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
+#define DEPRECATED __attribute__((deprecated))
enum {
blah,
};
typedef NSUInteger NSAlertStyle;
+enum {
+ D_NSTIFFFileType,
+ D_NSBMPFileType,
+ D_NSGIFFileType,
+ D_NSJPEGFileType,
+ D_NSPNGFileType,
+ D_NSJPEG2000FileType
+};
+typedef NSUInteger D_NSBitmapImageFileType DEPRECATED;
+
+typedef enum {
+ D_NSTickMarkBelow = 0,
+ D_NSTickMarkAbove = 1
+} D_NSTickMarkPosition DEPRECATED;
+
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
+#define DEPRECATED __attribute__((deprecated))
typedef NS_ENUM(NSInteger, wibble) {
blah,
};
+enum {
+ D_NSTIFFFileType,
+ D_NSBMPFileType,
+ D_NSGIFFileType,
+ D_NSJPEGFileType,
+ D_NSPNGFileType,
+ D_NSJPEG2000FileType
+};
+typedef NSUInteger D_NSBitmapImageFileType DEPRECATED;
+
+typedef enum {
+ D_NSTickMarkBelow = 0,
+ D_NSTickMarkAbove = 1
+} D_NSTickMarkPosition DEPRECATED;
+
#define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION
#define WEAK_IMPORT_ATTRIBUTE __attribute__((objc_arc_weak_reference_unavailable))
#define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+#define DEPRECATED __attribute__((deprecated))
typedef char BOOL;
@class NSString;
- (BOOL) getMANY;
- (BOOL) getSome;
@end
+
+DEPRECATED
+@interface I_DEP
+- (BOOL) isinValid;
+- (void) setInValid : (BOOL) arg;
+@end
+
+@interface AnotherOne
+- (BOOL) isinValid DEPRECATED;
+- (void) setInValid : (BOOL) arg;
+- (id)MYtarget;
+- (void)setMYtarget: (id)target DEPRECATED;
+- (BOOL) getM DEPRECATED;
+
+- (id)xxxdelegateYYY DEPRECATED;
+- (void)setXxxdelegateYYY:(id)delegate DEPRECATED;
+@end
#define WEBKIT_OBJC_METHOD_ANNOTATION(ANNOTATION) ANNOTATION
#define WEAK_IMPORT_ATTRIBUTE __attribute__((objc_arc_weak_reference_unavailable))
#define AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER
+#define DEPRECATED __attribute__((deprecated))
typedef char BOOL;
@class NSString;
@property(nonatomic, getter=getMANY, readonly) BOOL MANY;
@property(nonatomic, getter=getSome, readonly) BOOL some;
@end
+
+DEPRECATED
+@interface I_DEP
+- (BOOL) isinValid;
+- (void) setInValid : (BOOL) arg;
+@end
+
+@interface AnotherOne
+- (BOOL) isinValid DEPRECATED;
+- (void) setInValid : (BOOL) arg;
+- (id)MYtarget;
+- (void)setMYtarget: (id)target DEPRECATED;
+- (BOOL) getM DEPRECATED;
+
+- (id)xxxdelegateYYY DEPRECATED;
+- (void)setXxxdelegateYYY:(id)delegate DEPRECATED;
+@end