[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / CGColorSpace.c
blobd8fa535ba58dba63b0f7191de3a0de10e2da66ea
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);
8 void f(void) {
9 CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB(); // expected-warning{{leak}}
10 CGColorSpaceRetain(X);
13 void fb(void) {
14 CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB();
15 CGColorSpaceRetain(X);
16 CGColorSpaceRelease(X);
17 CGColorSpaceRelease(X); // no-warning