Add autorelease test case.

llvm-svn: 63237
This commit is contained in:
Ted Kremenek 2009-01-28 21:20:48 +00:00
parent 666bf20441
commit f675864e3c
1 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,7 @@ typedef struct _NSZone NSZone;
@protocol NSObject - (BOOL)isEqual:(id)object;
- (id)retain;
- (oneway void)release;
- (id)autorelease;
@end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone;
@end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder;
@end @interface NSObject <NSObject> {
@ -230,3 +231,9 @@ CREATEFUN MyCreateFun;
void f12() {
CFTypeRef o = MyCreateFun(); // expected-warning {{leak}}
}
void f13_autorelease() {
CFMutableArrayRef A = CFArrayCreateMutable(0, 10, &kCFTypeArrayCallBacks);
[(id) A autorelease]; // no-warning
}