From 26330563f27a93b9c0a0639a3e4f4cf538aa54fe Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Fri, 5 Apr 2013 17:55:00 +0000 Subject: [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. llvm-svn: 178890 --- clang/test/Analysis/Malloc+NewDelete_intersections.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/test/Analysis/Malloc+NewDelete_intersections.cpp') 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() { -- cgit v1.2.3