forked from OSchip/llvm-project
retain/release checker: Hoist code for bug reports above transfer function logic
(those diffs are just code moving) and move the logic for "return of owned object" leak reporting to EvalReturnStmt. llvm-svn: 70399
This commit is contained in:
parent
44e7122151
commit
6bd78709f2
File diff suppressed because it is too large
Load Diff
|
@ -438,6 +438,17 @@ void rdar6704930(unsigned char *s, unsigned int length) {
|
|||
- (void) myCFRelease:(id)__attribute__((objc_ownership_cfrelease))obj;
|
||||
@end
|
||||
|
||||
@interface TestAttrHelper : NSObject
|
||||
- (NSString*) createString:(TestOwnershipAttr*)X;
|
||||
@end
|
||||
|
||||
@implementation TestAttrHelper
|
||||
- (NSString*) createString:(TestOwnershipAttr*)X {
|
||||
return [X returnsAnOwnedString]; // expected-warning{{leak}}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
void test_attr_1(TestOwnershipAttr *X) {
|
||||
NSString *str = [X returnsAnOwnedString]; // expected-warning{{leak}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue