diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-02-19 18:20:28 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-02-19 18:20:28 +0000 |
commit | 79f7f8ab9a8c741e29ea9e648d05f774de49cd9b (patch) | |
tree | 92ea893c46d229787e85f5a37d0e1464f4dced5c | |
parent | b1dbf158db83b2b630621fa856a54c65d64e8632 (diff) |
Update test case to include a leak that occurs at the place of allocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65048 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/retain-release.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m index cff7b9be60..4ed6b000c3 100644 --- a/test/Analysis/retain-release.m +++ b/test/Analysis/retain-release.m @@ -236,4 +236,8 @@ void f13_autorelease() { CFMutableArrayRef A = CFArrayCreateMutable(0, 10, &kCFTypeArrayCallBacks); [(id) A autorelease]; // no-warning } - + +// This case exercises the logic where the leak site is the same as the allocation site. +void f14_leakimmediately() { + CFArrayCreateMutable(0, 10, &kCFTypeArrayCallBacks); // expected-warning{{leak}} +} |