r194864 - ObjectiveC ARG. A positive test of my previous patch.

Fariborz Jahanian fjahanian at apple.com
Fri Nov 15 14:33:12 PST 2013


Author: fjahanian
Date: Fri Nov 15 16:33:12 2013
New Revision: 194864

URL: http://llvm.org/viewvc/llvm-project?rev=194864&view=rev
Log:
ObjectiveC ARG. A positive test of my previous patch.
// rdar://15454846

Modified:
    cfe/trunk/test/SemaObjC/objcbridge-attribute.m

Modified: cfe/trunk/test/SemaObjC/objcbridge-attribute.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/objcbridge-attribute.m?rev=194864&r1=194863&r2=194864&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/objcbridge-attribute.m (original)
+++ cfe/trunk/test/SemaObjC/objcbridge-attribute.m Fri Nov 15 16:33:12 2013
@@ -33,6 +33,21 @@ typedef union __CFUColor * __attribute__
 
 typedef struct __CFError * __attribute__((objc_bridge(NSTesting))) CFTestingRef; // expected-note {{declared here}}
 
-id foo(CFTestingRef cf) {
+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}}
 }
+
+typedef CFErrorRef CFErrorRef1;
+
+typedef CFErrorRef1 CFErrorRef2;
+
+ at interface NSError @end
+
+ at interface MyError : NSError
+ at end
+
+ at class NSString;
+
+id Test2(CFErrorRef2 cf) {
+  return (NSString *)cf;
+}





More information about the cfe-commits mailing list