summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-08-02 18:38:41 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-08-02 18:38:41 +0000
commit9191865b2d5e6fbda670b6ac9f7f876ecc7f63da (patch)
tree4918569ce966b7e53bf8a794185c13767ffb7b16 /clang
parentc1a45fb70fcf96d3e933479d8a4e38e0bfc564ee (diff)
downloadbcm5719-llvm-9191865b2d5e6fbda670b6ac9f7f876ecc7f63da.tar.gz
bcm5719-llvm-9191865b2d5e6fbda670b6ac9f7f876ecc7f63da.zip
objc-arc: Modify test for more prcecise fixit.
// rdar://11913153 llvm-svn: 161194
Diffstat (limited to 'clang')
-rw-r--r--clang/test/SemaObjC/arc-dict-bridged-cast.m17
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/test/SemaObjC/arc-dict-bridged-cast.m b/clang/test/SemaObjC/arc-dict-bridged-cast.m
index 40e095d7aa2..ea648401af0 100644
--- a/clang/test/SemaObjC/arc-dict-bridged-cast.m
+++ b/clang/test/SemaObjC/arc-dict-bridged-cast.m
@@ -15,8 +15,10 @@ extern const CFStringRef kCFBundleNameKey;
- (id)objectForKeyedSubscript:(id<NSCopying>)key;
@end
+#pragma clang arc_cf_code_audited begin
extern
CFMutableStringRef CFStringCreateMutable(CFAllocatorRef alloc, CFIndex maxLength);
+#pragma clang arc_cf_code_audited end
typedef const void * CFTypeRef;
@@ -32,16 +34,13 @@ NSMutableString *test() {
// expected-note {{use CFBridgingRelease call to transfer ownership of a +1 'CFStringRef' (aka 'const struct __CFString *') into ARC}}
return infoDictionary[CFStringCreateMutable(((void*)0), 100)]; // expected-error {{indexing expression is invalid because subscript type 'CFMutableStringRef' (aka 'struct __CFString *') is not an integral or Objective-C pointer type}} \
// expected-error {{implicit conversion of C pointer type 'CFMutableStringRef' (aka 'struct __CFString *') to Objective-C pointer type '__strong id<NSCopying>' requires a bridged cast}} \
- // expected-note {{use __bridge to convert directly (no change in ownership)}} \
// expected-note {{use CFBridgingRelease call to transfer ownership of a +1 'CFMutableStringRef' (aka 'struct __CFString *') into ARC}}
}
-// CHECK: fix-it:"{{.*}}":{29:18-29:18}:"(__bridge __strong id<NSCopying>)("
-// CHECK: fix-it:"{{.*}}":{29:34-29:34}:")"
-// CHECK: fix-it:"{{.*}}":{29:18-29:18}:"CFBridgingRelease("
-// CHECK: fix-it:"{{.*}}":{29:34-29:34}:")"
-// CHECK: fix-it:"{{.*}}":{33:25-33:25}:"(__bridge __strong id<NSCopying>)("
-// CHECK: fix-it:"{{.*}}":{33:63-33:63}:")"
-// CHECK: fix-it:"{{.*}}":{33:25-33:25}:"CFBridgingRelease("
-// CHECK: fix-it:"{{.*}}":{33:63-33:63}:")"
+// CHECK: fix-it:"{{.*}}":{31:18-31:18}:"(__bridge __strong id<NSCopying>)("
+// CHECK: fix-it:"{{.*}}":{31:34-31:34}:")"
+// CHECK: fix-it:"{{.*}}":{31:18-31:18}:"CFBridgingRelease("
+// CHECK: fix-it:"{{.*}}":{31:34-31:34}:")"
+// CHECK: fix-it:"{{.*}}":{35:25-35:25}:"CFBridgingRelease("
+// CHECK: fix-it:"{{.*}}":{35:63-35:63}:")"
OpenPOWER on IntegriCloud