r191465 - ObjectiveC migrator: function pointer is not an

Fariborz Jahanian fjahanian at apple.com
Thu Sep 26 14:43:47 PDT 2013


Author: fjahanian
Date: Thu Sep 26 16:43:47 2013
New Revision: 191465

URL: http://llvm.org/viewvc/llvm-project?rev=191465&view=rev
Log:
ObjectiveC migrator: function pointer is not an
inner pointer for annotation to
objc_returns_inner_pointer purposes.
// rdar://15044991

Modified:
    cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
    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=191465&r1=191464&r2=191465&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Thu Sep 26 16:43:47 2013
@@ -714,7 +714,8 @@ static bool TypeIsInnerPointer(QualType
   if (!T->isAnyPointerType())
     return false;
   if (T->isObjCObjectPointerType() || T->isObjCBuiltinType() ||
-      T->isBlockPointerType() || ento::coreFoundation::isCFObjectRef(T))
+      T->isBlockPointerType() || T->isFunctionPointerType() ||
+      ento::coreFoundation::isCFObjectRef(T))
     return false;
   // Also, typedef-of-pointer-to-incomplete-struct is something that we assume
   // is not an innter pointer type.

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=191465&r1=191464&r2=191465&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 16:43:47 2013
@@ -123,5 +123,5 @@ typedef void *SecTrustRef;
 - (SecTrustRef) FOO1 NS_AVAILABLE NS_RETURNS_INNER_POINTER;
 
 // pointer personality functions
- at property NSUInteger (* NS_RETURNS_INNER_POINTER hashFunction)(const void *item, NSUInteger (*size)(const void *item));
+ at property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
 @end





More information about the cfe-commits mailing list