1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-output=text -verify %s
6 @interface NSObject <NSObject> {}
12 @interface Foo : NSObject
13 @property(nonatomic) int bar;
24 // expected-note@-1 {{'f' initialized here}}
25 // expected-note@-2 {{Method returns an instance of Foo with a +1 retain count}}
28 // expected-warning@-1 {{Potential leak of an object stored into 'self' [osx.cocoa.RetainCount]}}
29 // expected-note@-2 {{Passing value via implicit parameter 'self'}}
30 // expected-note@-3 {{Object leaked: object allocated and stored into 'self' is not referenced later in this execution path and has a retain count of +1}}