diff options
Diffstat (limited to 'clang/test/Analysis/retain-release-path-notes.m')
-rw-r--r-- | clang/test/Analysis/retain-release-path-notes.m | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/test/Analysis/retain-release-path-notes.m b/clang/test/Analysis/retain-release-path-notes.m index 27cb5165735..2dc314953fd 100644 --- a/clang/test/Analysis/retain-release-path-notes.m +++ b/clang/test/Analysis/retain-release-path-notes.m @@ -36,9 +36,6 @@ CFTypeRef CFRetain(CFTypeRef); void CFRelease(CFTypeRef); CFTypeRef CFAutorelease(CFTypeRef __attribute__((cf_consumed))); -id NSMakeCollectable(CFTypeRef); -CFTypeRef CFMakeCollectable(CFTypeRef); - CFTypeRef CFCreateSomething(); CFTypeRef CFGetSomething(); @@ -98,13 +95,6 @@ void autoreleaseUnowned (Foo *foo) { return; // expected-warning{{Object autoreleased too many times}} expected-note{{Object was autoreleased but has a +0 retain count}} } -void makeCollectableIgnored () { - CFTypeRef leaked = CFCreateSomething(); // expected-note{{Call to function 'CFCreateSomething' returns a Core Foundation object of type CFTypeRef with a +1 retain count}} - CFMakeCollectable(leaked); // expected-note{{When GC is not enabled a call to 'CFMakeCollectable' has no effect on its argument}} - NSMakeCollectable(leaked); // expected-note{{When GC is not enabled a call to 'NSMakeCollectable' has no effect on its argument}} - return; // expected-warning{{leak}} expected-note{{Object leaked: object allocated and stored into 'leaked' is not referenced later in this execution path and has a retain count of +1}} -} - CFTypeRef CFCopyRuleViolation () { CFTypeRef object = CFGetSomething(); // expected-note{{Call to function 'CFGetSomething' returns a Core Foundation object of type CFTypeRef with a +0 retain count}} return object; // expected-warning{{Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected}} expected-note{{Object returned to caller with a +0 retain count}} expected-note{{Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected}} |