1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount -verify %s
3 typedef struct CGColorSpace
*CGColorSpaceRef
;
4 extern CGColorSpaceRef
CGColorSpaceCreateDeviceRGB(void);
5 extern CGColorSpaceRef
CGColorSpaceRetain(CGColorSpaceRef space
);
6 extern void CGColorSpaceRelease(CGColorSpaceRef space
);
9 CGColorSpaceRef X
= CGColorSpaceCreateDeviceRGB(); // expected-warning{{leak}}
10 CGColorSpaceRetain(X
);
14 CGColorSpaceRef X
= CGColorSpaceCreateDeviceRGB();
15 CGColorSpaceRetain(X
);
16 CGColorSpaceRelease(X
);
17 CGColorSpaceRelease(X
); // no-warning