From b78b664213aae4282bee33e421ed03fdec36eb3a Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Thu, 22 Aug 2013 22:27:36 +0000 Subject: [PATCH] ObjectiveC migrator: builtin ObjectiveC types are not audited types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189072 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ARCMigrate/ObjCMT.cpp | 2 +- test/ARCMT/objcmt-arc-cf-annotations.m | 7 +++++++ test/ARCMT/objcmt-arc-cf-annotations.m.result | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp index ff670af7b0..eed3805c65 100644 --- a/lib/ARCMigrate/ObjCMT.cpp +++ b/lib/ARCMigrate/ObjCMT.cpp @@ -788,7 +788,7 @@ AuditedType (QualType AT, bool &IsPoniter) { IsVoidStarType(AT) || // If an ObjC object is type, assuming that it is not a CF function and // that it is an un-audited function. - AT->isObjCObjectPointerType()) + AT->isObjCObjectPointerType() || AT->isObjCBuiltinType()) return false; // All other pointers are assumed audited as harmless. return true; diff --git a/test/ARCMT/objcmt-arc-cf-annotations.m b/test/ARCMT/objcmt-arc-cf-annotations.m index bdd0e75d1d..f0304a6d1a 100644 --- a/test/ARCMT/objcmt-arc-cf-annotations.m +++ b/test/ARCMT/objcmt-arc-cf-annotations.m @@ -2038,3 +2038,10 @@ void rdar13783514(xpc_connection_t connection) { } // no-warning CFAttributedStringRef CFAttributedCreate(void *CFObj CF_CONSUMED) CF_RETURNS_RETAINED; + +@interface Action +- (SEL)action; +- (void)setAction:(SEL)aSelector; +- (id) target; +- (void)setTarget:(id)aTarget; +@end diff --git a/test/ARCMT/objcmt-arc-cf-annotations.m.result b/test/ARCMT/objcmt-arc-cf-annotations.m.result index 437369959f..7a31f5110c 100644 --- a/test/ARCMT/objcmt-arc-cf-annotations.m.result +++ b/test/ARCMT/objcmt-arc-cf-annotations.m.result @@ -2140,3 +2140,10 @@ CFAttributedStringRef CFAttributedCreate(void *CFObj CF_CONSUMED) CF_RETURNS_RET CF_IMPLICIT_BRIDGING_DISABLED + +@interface Action +@property(nonatomic) SEL action; + +@property(nonatomic, unsafe_unretained) id target; + +@end -- 2.50.1