diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-04-05 17:55:00 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-04-05 17:55:00 +0000 |
commit | e85deb356f5d2d2172b7ef70314bc9cfc742a936 (patch) | |
tree | b89a9efd9ae49605b48ad6cdd6b406fdde83ba5d /test/Analysis/Malloc+NewDelete_intersections.cpp | |
parent | 6b119d63f5036344acd4e00a6ff2b3c72f26966f (diff) |
[analyzer] Split new/delete checker into use-after-free and leaks parts.
This splits the leak-checking part of alpha.cplusplus.NewDelete into a
separate user-level checker, alpha.cplusplus.NewDeleteLeaks. All the
difficult false positives we've seen with the new/delete checker have been
spurious leak warnings; the use-after-free warnings and mismatched
deallocator warnings, while rare, have always been valid.
<rdar://problem/6194569>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/Malloc+NewDelete_intersections.cpp')
-rw-r--r-- | test/Analysis/Malloc+NewDelete_intersections.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Analysis/Malloc+NewDelete_intersections.cpp b/test/Analysis/Malloc+NewDelete_intersections.cpp index 7a0ef8e13c..272813d47b 100644 --- a/test/Analysis/Malloc+NewDelete_intersections.cpp +++ b/test/Analysis/Malloc+NewDelete_intersections.cpp @@ -1,11 +1,12 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,alpha.cplusplus.NewDelete -analyzer-store region -std=c++11 -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,alpha.cplusplus.NewDelete -std=c++11 -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,alpha.cplusplus.NewDelete,alpha.cplusplus.NewDeleteLeaks -std=c++11 -verify %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); void free(void *); //------------------------------------------------------------------- -// Check that unix.Malloc + alpha.cplusplus.NewDelete does not enable +// Check that unix.Malloc + cplusplus.NewDelete does not enable // warnings produced by unix.MismatchedDeallocator. //------------------------------------------------------------------- void testMismatchedDeallocator() { |