
As part of this change, I discovered that a few of our tests were not testing the RangeConstraintManager. Luckily all of those passed when I moved them over to use that constraint manager. llvm-svn: 162384
19 lines
642 B
C
19 lines
642 B
C
// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -analyzer-constraints=range -verify %s
|
|
|
|
typedef struct CGColorSpace *CGColorSpaceRef;
|
|
extern CGColorSpaceRef CGColorSpaceCreateDeviceRGB(void);
|
|
extern CGColorSpaceRef CGColorSpaceRetain(CGColorSpaceRef space);
|
|
extern void CGColorSpaceRelease(CGColorSpaceRef space);
|
|
|
|
void f() {
|
|
CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB(); // expected-warning{{leak}}
|
|
CGColorSpaceRetain(X);
|
|
}
|
|
|
|
void fb() {
|
|
CGColorSpaceRef X = CGColorSpaceCreateDeviceRGB();
|
|
CGColorSpaceRetain(X);
|
|
CGColorSpaceRelease(X);
|
|
CGColorSpaceRelease(X); // no-warning
|
|
}
|