r191468 - ObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
Fariborz Jahanian
fjahanian at apple.com
Thu Sep 26 15:43:41 PDT 2013
Author: fjahanian
Date: Thu Sep 26 17:43:41 2013
New Revision: 191468
URL: http://llvm.org/viewvc/llvm-project?rev=191468&view=rev
Log:
ObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
on class methods, as it makes no sense. // rdar://15069200
Modified:
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m
cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=191468&r1=191467&r2=191468&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Thu Sep 26 17:43:41 2013
@@ -846,6 +846,7 @@ bool ObjCMigrateASTConsumer::migrateProp
void ObjCMigrateASTConsumer::migrateNsReturnsInnerPointer(ASTContext &Ctx,
ObjCMethodDecl *OM) {
if (OM->isImplicit() ||
+ !OM->isInstanceMethod() ||
OM->hasAttr<ObjCReturnsInnerPointerAttr>())
return;
Modified: cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m?rev=191468&r1=191467&r2=191468&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m (original)
+++ cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m Thu Sep 26 17:43:41 2013
@@ -122,6 +122,8 @@ typedef void *SecTrustRef;
- (SecTrustRef) FOO1 NS_AVAILABLE;
++ (const NSURLProtectionSpace *)ProtectionSpace;
+
// pointer personality functions
@property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
@end
Modified: cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result?rev=191468&r1=191467&r2=191468&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result (original)
+++ cfe/trunk/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result Thu Sep 26 17:43:41 2013
@@ -122,6 +122,8 @@ typedef void *SecTrustRef;
- (SecTrustRef) FOO1 NS_AVAILABLE NS_RETURNS_INNER_POINTER;
++ (const NSURLProtectionSpace *)ProtectionSpace;
+
// pointer personality functions
@property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
@end
More information about the cfe-commits
mailing list