Lines Matching +full:end +full:- +full:to +full:- +full:end
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.InstanceVariableInvalidation -DR…
2 // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.MissingInvalidationMethod -DRUN_…
11 @end
15 -(id)init;
16 -(id)autorelease;
17 -(id)copy;
18 - (Class)class;
19 -(id)retain;
20 -(id)description;
21 @end
27 - (void) invalidate __attribute__((annotate("objc_instance_variable_invalidator")));
28 @end
31 - (void) invalidate __attribute__((annotate("objc_instance_variable_invalidator")));
32 @end
35 - (void) invalidate __attribute__((annotate("objc_instance_variable_invalidator")));
36 - (void) invalidate2 __attribute__((annotate("objc_instance_variable_invalidator")));
37 @end
43 @end
46 @end
49 @end
52 - (void) invalidate __attribute__((annotate("objc_instance_variable_invalidator")));
53 @end
58 @end
61 - (void)invalidate{
64 - (void)invalidate2 {
67 @end
72 SomeInvalidationImplementingObject *_Ivar3; // no property, call -description
73 SomeInvalidationImplementingObject *_Ivar4; // no property, provide as argument to NSLog()
75 …SomeInvalidationImplementingObject *_Prop1; // partially implemented property, set to 0 with dot s…
76 SomeInvalidationImplementingObject *_Prop2; // fully implemented prop, set to 0 with dot syntax
77 …SomeInvalidationImplementingObject *_propIvar; // property with custom named ivar, set to 0 via se…
78 Invalidation1Class *MultipleProtocols; // regular ivar belonging to a different class
79 Invalidation2Class *MultInheritance; // regular ivar belonging to a different class
80 …SomeInvalidationImplementingObject *_Prop3; // property, invalidate via sending a message to a get…
112 -(void)setProp1: (SomeInvalidationImplementingObject*) InO;
113 -(void)setNProp1: (NSObject*) InO;
115 -(void)invalidate;
117 // Partial invalidators invalidate only some ivars. They are guaranteed to be
119 -(void)partialInvalidator1 __attribute__((annotate("objc_instance_variable_invalidator_partial")));
120 -(void)partialInvalidator2 __attribute__((annotate("objc_instance_variable_invalidator_partial")));
121 @end
126 @end
142 - (void) setProp1: (SomeInvalidationImplementingObject*) InObj {
146 - (void) setProp2: (SomeInvalidationImplementingObject*) InObj {
149 - (SomeInvalidationImplementingObject*) Prop2 {
155 - (void) setNProp1: (NSObject*) InObj {
159 - (void) invalidate {
176 // expected-warning@-2 {{Instance variable Ivar1 needs to be invalidated}}
177 // expected-warning@-3 {{Instance variable MultipleProtocols needs to be invalidated}}
178 // expected-warning@-4 {{Instance variable MultInheritance needs to be invalidated}}
179 // expected-warning@-5 {{Property SynthIvarProp needs to be invalidated or set to nil}}
180 // expected-warning@-6 {{Instance variable _Ivar3 needs to be invalidated}}
181 // expected-warning@-7 {{Instance variable _Ivar4 needs to be invalidated}}
182 // expected-warning@-8 {{Instance variable Ivar5 needs to be invalidated or set to nil}}
183 // expected-warning@-9 {{Instance variable Ivar13 needs to be invalidated or set to nil}}
186 -(void)partialInvalidator1 {
191 -(void)partialInvalidator2 {
195 @end
203 @end
208 @end
211 @end
221 - (void)invalidate{
232 @end
235 - (void)invalidate{
236 // no-warning
238 @end
241 - (void)invalidate __attribute__((annotate("objc_instance_variable_invalidator")));
242 @end
245 @end
249 @end
254 // expected-warning@-2 {{Property foobar15_warn needs to be invalidated; no invalidation method is …
256 @end
258 @end
263 // expected-warning@-2 {{Instance variable Ivar1 needs to be invalidated; no invalidation method is…
266 @end
268 @end
273 // expected-warning@-2 {{Instance variable Ivar1 needs to be invalidated; no invalidation method is…
276 @end
278 @end
284 // expected-warning@-2 {{Instance variable _foo1 needs to be invalidated; no invalidation method is…
288 @end
290 @end
296 -(void)partialInvalidator __attribute__((annotate("objc_instance_variable_invalidator_partial")));
297 @end
299 -(void)partialInvalidator {
303 @end
308 -(void)partialInvalidator __attribute__((annotate("objc_instance_variable_invalidator_partial")));
309 -(void)partialInvalidatorCallsPartial __attribute__((annotate("objc_instance_variable_invalidator_p…
310 @end
312 -(void)partialInvalidator {
314 -(void)partialInvalidatorCallsPartial {
318 -(void)invalidate {
321 // expected-warning@-2 {{Instance variable Ivar1 needs to be invalidated or set to nil}}
323 @end
329 // expected-warning@-2 {{Instance variable Ivar2 needs to be invalidated or set to nil}}
332 -(void)partialInvalidator __attribute__((annotate("objc_instance_variable_invalidator_partial")));
333 -(void)partialInvalidatorCallsPartial __attribute__((annotate("objc_instance_variable_invalidator_p…
334 @end
338 // expected-warning@-2 {{Instance variable Ivar3 needs to be invalidated or set to nil}}
341 -(void)partialInvalidator {
344 -(void)partialInvalidatorCallsPartial {
347 @end
350 -(void)partialInvalidator __attribute__((annotate("objc_instance_variable_invalidator_partial")));
351 @end
353 -(void)partialInvalidator {}
354 @end
359 …// expected-warning@-2 {{Instance variable Ivar1 needs to be invalidated; no invalidation method i…
362 @end
364 @end
370 -(void)partialInvalidator __attribute__((annotate("objc_instance_variable_invalidator_partial")));
371 @end
373 -(void)partialInvalidator {
375 } // TODO: It would be nice to check that the full invalidation method actually invalidates the iva…
376 @end