]> granicus.if.org Git - clang/commitdiff
[analyzer] Moving cplusplus.NewDelete to alpha.* for now.
authorAnton Yartsev <anton.yartsev@gmail.com>
Tue, 2 Apr 2013 05:59:24 +0000 (05:59 +0000)
committerAnton Yartsev <anton.yartsev@gmail.com>
Tue, 2 Apr 2013 05:59:24 +0000 (05:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
lib/StaticAnalyzer/Checkers/Checkers.td
test/Analysis/NewDelete-checker-test.cpp
test/Analysis/NewDelete-custom.cpp
test/Analysis/NewDelete-intersections.mm
test/Analysis/NewDelete-path-notes.cpp
test/Analysis/NewDelete-variadic.cpp
utils/analyzer/SATestBuild.py

index 8c85760bc6af06cdb641d742d4db102c330d6af4..8699056417f95faffcd2fab0565984daeceecfdf 100644 (file)
@@ -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");
index 5491662939ed6721d52fc126f8c1bd15aa0798ce..f7fe0fc8e8ce064f75fee8198189b78efdc8ca2f 100644 (file)
@@ -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"
 
 //===----------------------------------------------------------------------===//
index 2b01dfe5379681a51dffb1ef7e4a5bab2b816405..c4a3dc2731cd8e028ad79267c5bda0bb5d0c2765 100644 (file)
@@ -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;
index 04dda2e7c314ccffc499c09d46826b47484c9019..7d7796bccb6e5b125abddb277ee3a03b4c635357 100644 (file)
@@ -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);
index 4375119ff25ec0a0c9f3ec4244f42d48be5a947e..ca588f5c05a9c70f210b2da8fb3122583a84cde3 100644 (file)
@@ -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"
 
index 83e6e9f06a60d2dd73cef220ad911c9b0ed3c286..eeb610537b8a83de3d5b170aee7343584ae758c5 100644 (file)
@@ -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() {
index b74199b525d73da8c31743b118a9e9584e0ac104..129af1f9c69701f2b0a42a23e9be053de164d165 100644 (file)
@@ -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 {
index 3d8f7c0a14ec175b8873e6d83eeca4104bc55bba..067be162e27b4b2e7a688ee42be2f925b37607f8 100755 (executable)
@@ -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