summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/arc-cf.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/arc-cf.m')
-rw-r--r--test/SemaObjC/arc-cf.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaObjC/arc-cf.m b/test/SemaObjC/arc-cf.m
index 5754720..d71d274 100644
--- a/test/SemaObjC/arc-cf.m
+++ b/test/SemaObjC/arc-cf.m
@@ -45,3 +45,15 @@ void test2() {
x = (id) CFMakeString3(); // expected-error {{requires a bridged cast}} expected-note {{CFBridgingRelease call to transfer}}
x = (id) CFCreateString3(); // expected-error {{requires a bridged cast}} expected-note {{CFBridgingRelease call to transfer}}
}
+
+// rdar://14569171
+@interface NSString @end
+typedef signed int SInt32;
+#pragma clang arc_cf_code_audited begin
+extern SInt32 CFStringGetIntValue(CFStringRef str); // expected-note {{passing argument to parameter 'str' here}}
+#pragma clang arc_cf_code_audited end
+
+void test3() {
+ NSString* answer = @"42";
+ int ans = CFStringGetIntValue(answer); // expected-error {{incompatible pointer types passing retainable parameter of type 'NSString *__strong'to a CF function expecting 'CFStringRef'}}
+}
OpenPOWER on IntegriCloud