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
diff --git a/lib/ARCMigrate/ObjCMT.cpp b/lib/ARCMigrate/ObjCMT.cpp
index ff670af..eed3805 100644
--- a/lib/ARCMigrate/ObjCMT.cpp
+++ b/lib/ARCMigrate/ObjCMT.cpp
@@ -788,7 +788,7 @@
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 bdd0e75..f0304a6 100644
--- a/test/ARCMT/objcmt-arc-cf-annotations.m
+++ b/test/ARCMT/objcmt-arc-cf-annotations.m
@@ -2038,3 +2038,10 @@
} // 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 4373699..7a31f51 100644
--- a/test/ARCMT/objcmt-arc-cf-annotations.m.result
+++ b/test/ARCMT/objcmt-arc-cf-annotations.m.result
@@ -2140,3 +2140,10 @@
CF_IMPLICIT_BRIDGING_DISABLED
+
+@interface Action
+@property(nonatomic) SEL action;
+
+@property(nonatomic, unsafe_unretained) id target;
+
+@end