From: Fariborz Jahanian Date: Thu, 26 Sep 2013 21:43:47 +0000 (+0000) Subject: ObjectiveC migrator: function pointer is not an X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d4e06872de210a9f9ed89781ba606ea22fb61b8;p=clang ObjectiveC migrator: function pointer is not an inner pointer for annotation to objc_returns_inner_pointer purposes. // rdar://15044991 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191465 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp index a9fc171512..997f951d7c 100644 --- a/lib/ARCMigrate/ObjCMT.cpp +++ b/lib/ARCMigrate/ObjCMT.cpp @@ -714,7 +714,8 @@ static bool TypeIsInnerPointer(QualType T) { 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. diff --git a/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result b/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result index 4980cfbb2d..389cb8853a 100644 --- a/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result +++ b/test/ARCMT/objcmt-ns-returns-inner-pointer.m.result @@ -123,5 +123,5 @@ typedef void *SecTrustRef; - (SecTrustRef) FOO1 NS_AVAILABLE NS_RETURNS_INNER_POINTER; // pointer personality functions -@property NSUInteger (* NS_RETURNS_INNER_POINTER hashFunction)(const void *item, NSUInteger (*size)(const void *item)); +@property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item)); @end