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.m10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/SemaObjC/arc-cf.m b/test/SemaObjC/arc-cf.m
index 69662ea..5754720 100644
--- a/test/SemaObjC/arc-cf.m
+++ b/test/SemaObjC/arc-cf.m
@@ -10,11 +10,13 @@ id CFBridgingRelease(CFTypeRef);
typedef const struct __CFString *CFStringRef;
extern CFStringRef CFMakeString0(void);
+#pragma clang arc_cf_code_audited begin
extern CFStringRef CFCreateString0(void);
+#pragma clang arc_cf_code_audited end
void test0() {
id x;
x = (id) CFMakeString0(); // expected-error {{requires a bridged cast}} expected-note {{__bridge to convert directly}} expected-note {{CFBridgingRelease call to transfer}}
- x = (id) CFCreateString0(); // expected-error {{requires a bridged cast}} expected-note {{__bridge to convert directly}} expected-note {{CFBridgingRelease call to transfer}}
+ x = (id) CFCreateString0(); // expected-error {{requires a bridged cast}} expected-note {{CFBridgingRelease call to transfer}}
}
extern CFStringRef CFMakeString1(void) __attribute__((cf_returns_not_retained));
@@ -22,7 +24,7 @@ extern CFStringRef CFCreateString1(void) __attribute__((cf_returns_retained));
void test1() {
id x;
x = (id) CFMakeString1();
- x = (id) CFCreateString1(); // expected-error {{requires a bridged cast}} expected-note {{__bridge to convert directly}} expected-note {{CFBridgingRelease call to transfer}}
+ x = (id) CFCreateString1(); // expected-error {{requires a bridged cast}} expected-note {{CFBridgingRelease call to transfer}}
}
#define CF_AUDIT_BEGIN _Pragma("clang arc_cf_code_audited begin")
@@ -40,6 +42,6 @@ void test2() {
id x;
x = (id) CFMakeString2();
x = (id) CFCreateString2();
- x = (id) CFMakeString3(); // expected-error {{requires a bridged cast}} expected-note {{__bridge to convert directly}} expected-note {{CFBridgingRelease call to transfer}}
- x = (id) CFCreateString3(); // expected-error {{requires a bridged cast}} expected-note {{__bridge to convert directly}} expected-note {{CFBridgingRelease call to transfer}}
+ 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}}
}
OpenPOWER on IntegriCloud