[analyzer] Moving cplusplus.NewDelete to alpha.* for now.
llvm-svn: 178529
This commit is contained in:
parent
8eabc3ffde
commit
01acbcebbb
@ -1951,9 +1951,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
|
||||
CmdArgs.push_back("-analyzer-checker=deadcode");
|
||||
|
||||
if (types::isCXX(Inputs[0].getType()))
|
||||
CmdArgs.push_back("-analyzer-checker=cplusplus");
|
||||
|
||||
// Enable the following experimental checkers for testing.
|
||||
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.UncheckedReturn");
|
||||
CmdArgs.push_back("-analyzer-checker=security.insecureAPI.getpw");
|
||||
|
||||
@ -167,11 +167,6 @@ def ReturnUndefChecker : Checker<"UndefReturn">,
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
let ParentPackage = Cplusplus in {
|
||||
|
||||
def NewDeleteChecker : Checker<"NewDelete">,
|
||||
HelpText<"Check for memory leaks, double free, and use-after-free problems. Traces memory managed by new/delete.">,
|
||||
DescFile<"MallocChecker.cpp">;
|
||||
|
||||
} // end: "cplusplus"
|
||||
|
||||
let ParentPackage = CplusplusAlpha in {
|
||||
@ -180,6 +175,10 @@ def VirtualCallChecker : Checker<"VirtualCall">,
|
||||
HelpText<"Check virtual function calls during construction or destruction">,
|
||||
DescFile<"VirtualCallChecker.cpp">;
|
||||
|
||||
def NewDeleteChecker : Checker<"NewDelete">,
|
||||
HelpText<"Check for memory leaks, double free, and use-after-free problems. Traces memory managed by new/delete.">,
|
||||
DescFile<"MallocChecker.cpp">;
|
||||
|
||||
} // end: "alpha.cplusplus"
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
#include "Inputs/system-header-simulator-cxx.h"
|
||||
|
||||
typedef __typeof__(sizeof(int)) size_t;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
#include "Inputs/system-header-simulator-cxx.h"
|
||||
|
||||
void *allocator(std::size_t size);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDelete -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
#include "Inputs/system-header-simulator-cxx.h"
|
||||
#include "Inputs/system-header-simulator-objc.h"
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=text -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=plist %s -o %t.plist
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.cplusplus.NewDelete,unix.Malloc -analyzer-output=text -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.cplusplus.NewDelete,unix.Malloc -analyzer-output=plist %s -o %t.plist
|
||||
// RUN: FileCheck --input-file=%t.plist %s
|
||||
|
||||
void test() {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDelete,unix.Malloc -analyzer-store region -std=c++11 -fblocks -verify %s
|
||||
// expected-no-diagnostics
|
||||
|
||||
namespace std {
|
||||
|
||||
@ -169,7 +169,7 @@ SBOutputDirReferencePrefix = "Ref"
|
||||
|
||||
# The list of checkers used during analyzes.
|
||||
# Currently, consists of all the non experimental checkers.
|
||||
Checkers="alpha.unix.SimpleStream,alpha.security.taint,core,cplusplus,deadcode,security,unix,osx"
|
||||
Checkers="alpha.unix.SimpleStream,alpha.security.taint,core,deadcode,security,unix,osx"
|
||||
|
||||
Verbose = 1
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user