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 struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-…
27 typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{…
30 … *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka '__CFError *') is bridged to 'NST…
31 …// expected-error {{cast of C pointer type 'CFTestingRef' (aka '__CFError *') to Objective-C point…
32 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
33 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFTestingRef' (aka '__CFEr…
38 typedef CFErrorRef1 CFErrorRef2; // expected-note 2 {{declared here}}
46 @interface NSError<P1, P2, P3> @end // expected-note 5 {{declared here}}
48 @interface MyError : NSError // expected-note 1 {{declared here}}
55 void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
56 …(void)(NSString *)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSErro…
57 …// expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C poi…
58 // expected-note {{__bridge to convert directly (no change in ownership)}} \
59 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErr…
60 …(void)(NSError *)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *…
61 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
62 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErr…
63 …(void)(MyError*)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *'…
64 // expected-note {{__bridge to convert directly (no change in ownership)}} \
65 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErr…
66 // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'MyError'}}
67 …void)(NSUColor *)cf2; // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka '__CFUPrimeCo…
68 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
69 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFUColor2Ref' (aka '__CFUP…
70 …(void)(CFErrorRef)ns; // expected-error {{cast of Objective-C pointer type 'NSError *' to C pointe…
71 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
72 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
73 …(void)(CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka '__CFE…
74 …// expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (…
75 … // expected-note {{use __bridge to convert directly (no change in ownership)}} \
76 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
77 …(void)(Class)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, no…
78 …// expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C poi…
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 '__CFErr…
81 …(void)(CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRe…
82 …// expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka '…
83 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
84 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
89 …(void)(id)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Ob…
90 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
91 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErro…
92 …(void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *…
93 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
94 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErro…
95 …(void)(id<P1, P2, P4>)cf; // expected-warning {{'CFErrorRef' (aka '__CFErrorRef *') bridges to NSE…
96 …// expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C poin…
97 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
98 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErro…
102 …(void)(id)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') t…
103 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
104 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMy…
105 …(void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
106 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
107 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMy…
108 …d)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
109 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
110 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMy…
111 …(void)(id<P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorR…
112 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
113 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMy…
114 …(void)(id<P1, P2, P4>)cf; // expected-warning {{'CFMyErrorRef' (aka '__CFMyErrorRef *') bridges to…
115 …// expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C …
116 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
117 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMy…
121 …(void)(CFErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type …
122 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
123 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
124 …(void)(CFErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C p…
125 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
126 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
127 …(void)(CFErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to…
128 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
129 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
130 …(void)(CFErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C point…
131 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
132 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
133 …(void)(CFErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C point…
134 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
135 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka…
140 …(void)(CFMyErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer typ…
141 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
142 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
143 …(void)(CFMyErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C…
144 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
145 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
146 …(void)(CFMyErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' …
147 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
148 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
149 …(void)(CFMyErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C poi…
150 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
151 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
152 …(void)(CFMyErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C poi…
153 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
154 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (a…
157 …PersonalError))) __CFMyPersonalErrorRef * CFMyPersonalErrorRef; // expected-note 1 {{declared her…
159 @interface MyPersonalError : NSError <P4> // expected-note 1 {{declared here}}
163 …(void)(CFMyPersonalErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C poi…
164 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
165 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
166 …(void)(CFMyPersonalErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P…
167 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
168 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
169 …oid)(CFMyPersonalErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3…
170 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
171 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
172 …(void)(CFMyPersonalErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' …
173 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
174 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
175 …(void)(CFMyPersonalErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' …
176 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
177 …// expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErro…
181 …(void)(id)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPerson…
182 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
183 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
184 …d)(id<P1>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPerson…
185 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
186 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
187 …d<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPerson…
188 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
189 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
190 …, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPerson…
191 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
192 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
193 …, P3, P4>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPerson…
194 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
195 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
196 …(void)(id<P1, P2, P3, P4, P5>)cf; // expected-warning {{'CFMyPersonalErrorRef' (aka '__CFMyPersona…
197 …// expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')…
198 // expected-note {{use __bridge to convert directly (no change in ownership)}} \
199 …// expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka…
202 void Test9(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
203 …(void)(__bridge NSString *)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges …
205 …(void)(__bridge MyError*)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to…
208 …(void)(__bridge CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (a…
209 …(void)(__bridge Class)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NS…
210 …(void)(__bridge CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to '…