summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/objcbridge-attribute.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-11-15 23:14:45 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-11-15 23:14:45 +0000
commitb8233193a41fa2eb4b78b4e61f0ab35738964766 (patch)
tree490a1cbe8ccb52c85f1051a39aa28811562ee5bb /clang/test/SemaObjC/objcbridge-attribute.m
parent24e3954700852962b153a340a611961b6e403815 (diff)
downloadbcm5719-llvm-b8233193a41fa2eb4b78b4e61f0ab35738964766.tar.gz
bcm5719-llvm-b8233193a41fa2eb4b78b4e61f0ab35738964766.zip
ObjectiveC ARC. Only briding of pointer to struct CF object is allowed.
Improve on wording on illegal objc_bridge argumment. // rdar://15454846 llvm-svn: 194881
Diffstat (limited to 'clang/test/SemaObjC/objcbridge-attribute.m')
-rw-r--r--clang/test/SemaObjC/objcbridge-attribute.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/SemaObjC/objcbridge-attribute.m b/clang/test/SemaObjC/objcbridge-attribute.m
index bb2d3e28515..3178f17a7cd 100644
--- a/clang/test/SemaObjC/objcbridge-attribute.m
+++ b/clang/test/SemaObjC/objcbridge-attribute.m
@@ -7,19 +7,19 @@ typedef struct __CFMyColor * __attribute__((objc_bridge(12))) CFMyColorRef; //
typedef struct __CFArray * __attribute__ ((objc_bridge)) CFArrayRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
-typedef void * __attribute__ ((objc_bridge(NSURL))) CFURLRef;
+typedef void * __attribute__ ((objc_bridge(NSURL))) CFURLRef; // expected-error {{'objc_bridge' attribute must be applied to a pointer to struct type}}
-typedef void * CFStringRef __attribute__ ((objc_bridge(NSString)));
+typedef void * CFStringRef __attribute__ ((objc_bridge(NSString))); // expected-error {{'objc_bridge' attribute must be applied to a pointer to struct type}}
typedef struct __CFLocale * __attribute__((objc_bridge(NSLocale, NSError))) CFLocaleRef;// expected-error {{use of undeclared identifier 'NSError'}}
-typedef struct __CFData __attribute__((objc_bridge(NSData))) CFDataRef; // expected-error {{'objc_bridge' attribute must be applied to a pointer type}}
+typedef struct __CFData __attribute__((objc_bridge(NSData))) CFDataRef; // expected-error {{'objc_bridge' attribute must be applied to a pointer to struct type}}
typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef; // expected-error {{'objc_bridge' attribute must be put on a typedef only}}
typedef struct __CFSetRef * CFSetRef __attribute__((objc_bridge(NSSet)));
-typedef union __CFUColor * __attribute__((objc_bridge(NSUColor))) CFUColorRef; // expected-error {{'objc_bridge' attribute only applies to structs}}
+typedef union __CFUColor * __attribute__((objc_bridge(NSUColor))) CFUColorRef; // expected-error {{'objc_bridge' attribute must be applied to a pointer to struct type}}
@interface I
{
@@ -34,7 +34,7 @@ typedef union __CFUColor * __attribute__((objc_bridge(NSUColor))) CFUColorRef; /
typedef struct __CFError * __attribute__((objc_bridge(NSTesting))) CFTestingRef; // expected-note {{declared here}}
id Test1(CFTestingRef cf) {
- return (NSString *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka 'struct __CFError *') with 'objc_bridge' attribute which has parameter that does not name an Objective-C class}}
+ return (NSString *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka 'struct __CFError *') is bridged to 'NSTesting', which is not an Objective-C class}}
}
typedef CFErrorRef CFErrorRef1;
OpenPOWER on IntegriCloud