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 | 26330563f27a93b9c0a0639a3e4f4cf538aa54fe (patch) | |
tree | f5afb0f99fb33432db351cbde492751555406ea7 /clang/test/Analysis/Malloc+NewDelete_intersections.cpp | |
parent | 0b55b438b25d39c37737282030d4d9d8bee07fc9 (diff) | |
download | bcm5719-llvm-26330563f27a93b9c0a0639a3e4f4cf538aa54fe.tar.gz bcm5719-llvm-26330563f27a93b9c0a0639a3e4f4cf538aa54fe.zip |
[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>
llvm-svn: 178890
Diffstat (limited to 'clang/test/Analysis/Malloc+NewDelete_intersections.cpp')
-rw-r--r-- | clang/test/Analysis/Malloc+NewDelete_intersections.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Analysis/Malloc+NewDelete_intersections.cpp b/clang/test/Analysis/Malloc+NewDelete_intersections.cpp index 7a0ef8e13c6..272813d47bb 100644 --- a/clang/test/Analysis/Malloc+NewDelete_intersections.cpp +++ b/clang/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() { |