Lines Matching +full:objective +full:- +full:c
1 // RUN: %clang_cc1 -fsyntax-only -x objective-c -fobjc-arc -verify -Wno-objc-root-class %s
4 typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 5…
6 typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-no…
8 …yColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single n…
10 typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridg…
12 typedef void * __attribute__ ((objc_bridge(NSURL))) CFURLRef; // expected-error {{parameter of 'o…
14 typedef void * CFStringRef __attribute__ ((objc_bridge(NSString))); // expected-error {{parameter o…
16 typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-…
18 typedef struct __CFData __attribute__((objc_bridge(NSData))) CFDataRef; // expected-error {{paramet…
22 typedef struct __CFSetRef * CFSetRef __attribute__((objc_bridge(NSSet))); // expected-error {{param…
24 typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) * CFUColorRef; // expected-error {{…
28 typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) * CFUColorRef; // expected-error {{…
31 typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) *CFUColor1Ref; // expected-error {{…
38 …__attribute__((objc_bridge(NSError))) void * color; // expected-error {{'objc_bridge' attribute on…
45 typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{…
48 …cf; // expected-error {{CF object of type 'CFTestingRef' (aka 'struct __CFError *') is bridged to …
49 …// expected-error {{cast of C pointer type 'CFTestingRef' (aka 'struct __CFError *') to Objective-…
50 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
51 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFTestingRef' (aka 'struct…
56 typedef CFErrorRef1 CFErrorRef2; // expected-note 2 {{declared here}}
64 @interface NSError<P1, P2, P3> @end // expected-note 5 {{declared here}}
66 @interface MyError : NSError // expected-note 1 {{declared here}}
73 void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
74 …(void)(NSString *)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to…
75 …// expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErrorRef *') to Objectiv…
76 // expected-note {{__bridge to convert directly (no change in ownership)}} \
77 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct …
78 …void)(NSError *)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErro…
79 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
80 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct …
81 …(void)(MyError*)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErro…
82 // expected-note {{__bridge to convert directly (no change in ownership)}} \
83 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct …
84 …// expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSError, not 'MyError…
85 …d)(NSUColor *)cf2; // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka 'union __CFUPrim…
86 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
87 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFUColor2Ref' (aka 'union …
88 …(void)(CFErrorRef)ns; // expected-error {{cast of Objective-C pointer type 'NSError *' to C pointe…
89 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
90 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
91 …(void)(CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka 'struc…
92 …// expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (…
93 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
94 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
95 …(void)(Class)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSEr…
96 …// expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErrorRef *') to Objectiv…
97 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
98 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct …
99 …(void)(CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRe…
100 …// expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka '…
101 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
102 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
107 …(void)(id)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *'…
108 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
109 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka 'struct _…
110 …void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka 'struct __CFErro…
111 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
112 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka 'struct _…
113 …(void)(id<P1, P2, P4>)cf; // expected-warning {{'CFErrorRef' (aka 'struct __CFErrorRef *') bridges…
114 …// expected-error {{cast of C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') to Objective…
115 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
116 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka 'struct _…
120 …(void)(id)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRe…
121 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
122 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct…
123 …id)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyEr…
124 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
125 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct…
126 …id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyEr…
127 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
128 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct…
129 …id)(id<P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyEr…
130 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
131 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct…
132 …(void)(id<P1, P2, P4>)cf; // expected-warning {{'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') bri…
133 …// expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') to Objec…
134 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
135 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct…
139 …(void)(CFErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type …
140 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
141 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
142 …(void)(CFErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C p…
143 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
144 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
145 …(void)(CFErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to…
146 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
147 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
148 …(void)(CFErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C point…
149 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
150 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
151 …(void)(CFErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C point…
152 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
153 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
158 …(void)(CFMyErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer typ…
159 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
160 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
161 …(void)(CFMyErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C…
162 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
163 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
164 …(void)(CFMyErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' …
165 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
166 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
167 …(void)(CFMyErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C poi…
168 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
169 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
170 …(void)(CFMyErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C poi…
171 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
172 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
175 …PersonalError))) __CFMyPersonalErrorRef * CFMyPersonalErrorRef; // expected-note 1 {{declared her…
177 @interface MyPersonalError : NSError <P4> // expected-note 1 {{declared here}}
181 …(void)(CFMyPersonalErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C poi…
182 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
183 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
184 …(void)(CFMyPersonalErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P…
185 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
186 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
187 …oid)(CFMyPersonalErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3…
188 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
189 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
190 …(void)(CFMyPersonalErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' …
191 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
192 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
193 …(void)(CFMyPersonalErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' …
194 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
195 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
199 …id)(id)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPe…
200 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
201 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
202 …id<P1>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPe…
203 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
204 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
205 …1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPe…
206 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
207 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
208 …2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPe…
209 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
210 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
211 …3, P4>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPe…
212 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
213 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
214 …(void)(id<P1, P2, P3, P4, P5>)cf; // expected-warning {{'CFMyPersonalErrorRef' (aka 'struct __CFMy…
215 …// expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalError…
216 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
217 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
220 void Test9(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
221 …(void)(__bridge NSString *)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') b…
223 …(void)(__bridge MyError*)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bri…
226 …(void)(__bridge CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (a…
227 …(void)(__bridge Class)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridge…
228 …(void)(__bridge CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to '…
237 …(void)(NSError *)obj; // expected-error {{cast of C pointer type 'CFFooRef' (aka 'struct __CFFoo *…
238 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
239 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFFooRef' (aka 'struct __C…
241 …(void) (id)obj; // expected-error {{cast of C pointer type 'CFFooRef' (aka 'struct __CFFoo *…
242 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
243 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFFooRef' (aka 'struct __C…