зеркало из https://github.com/microsoft/clang-1.git
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
bc85be8577
Коммит
c887d13b07
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -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}}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче