Added test case for suppressing leak warnings for reference-counted objects passed by-reference to an unknown function.

llvm-svn: 61227
This commit is contained in:
Ted Kremenek 2008-12-18 23:40:58 +00:00
parent 5b26c11f56
commit 021752ab4e
1 changed files with 9 additions and 0 deletions

View File

@ -150,6 +150,15 @@ NSString* f11(CFDictionaryRef dict, const char* key) {
}
}
// Test case for passing a tracked object by-reference to a function we
// don't undersand.
void unknown_function_f12(NSString** s);
void f12() {
NSString *string = [[NSString alloc] init];
unknown_function_f12(&string); // no-warning
}
@interface C1 : NSObject {}
- (NSString*) getShared;
+ (C1*) sharedInstance;