diff options
| author | Anton Yartsev <anton.yartsev@gmail.com> | 2013-04-02 05:59:24 +0000 |
|---|---|---|
| committer | Anton Yartsev <anton.yartsev@gmail.com> | 2013-04-02 05:59:24 +0000 |
| commit | 01acbcebbbc312fb67ec556933fb35be2d6ca4a6 (patch) | |
| tree | 2d773907a242f06a4471535c214d8cc52b5d6060 | |
| parent | 8eabc3ffde30f966ec373edd7d89fc2bfbb3113f (diff) | |
| download | bcm5719-llvm-01acbcebbbc312fb67ec556933fb35be2d6ca4a6.tar.gz bcm5719-llvm-01acbcebbbc312fb67ec556933fb35be2d6ca4a6.zip | |
[analyzer] Moving cplusplus.NewDelete to alpha.* for now.
llvm-svn: 178529
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/Checkers.td | 9 | ||||
| -rw-r--r-- | clang/test/Analysis/NewDelete-checker-test.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Analysis/NewDelete-custom.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Analysis/NewDelete-intersections.mm | 2 | ||||
| -rw-r--r-- | clang/test/Analysis/NewDelete-path-notes.cpp | 4 | ||||
| -rw-r--r-- | clang/test/Analysis/NewDelete-variadic.cpp | 2 | ||||
| -rwxr-xr-x | clang/utils/analyzer/SATestBuild.py | 2 |
8 files changed, 11 insertions, 15 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 8c85760bc6a..8699056417f 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -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"); diff --git a/clang/lib/StaticAnalyzer/Checkers/Checkers.td b/clang/lib/StaticAnalyzer/Checkers/Checkers.td index 5491662939e..f7fe0fc8e8c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/Checkers.td +++ b/clang/lib/StaticAnalyzer/Checkers/Checkers.td @@ -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" //===----------------------------------------------------------------------===// diff --git a/clang/test/Analysis/NewDelete-checker-test.cpp b/clang/test/Analysis/NewDelete-checker-test.cpp index 2b01dfe5379..c4a3dc2731c 100644 --- a/clang/test/Analysis/NewDelete-checker-test.cpp +++ b/clang/test/Analysis/NewDelete-checker-test.cpp @@ -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; diff --git a/clang/test/Analysis/NewDelete-custom.cpp b/clang/test/Analysis/NewDelete-custom.cpp index 04dda2e7c31..7d7796bccb6 100644 --- a/clang/test/Analysis/NewDelete-custom.cpp +++ b/clang/test/Analysis/NewDelete-custom.cpp @@ -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); diff --git a/clang/test/Analysis/NewDelete-intersections.mm b/clang/test/Analysis/NewDelete-intersections.mm index 4375119ff25..ca588f5c05a 100644 --- a/clang/test/Analysis/NewDelete-intersections.mm +++ b/clang/test/Analysis/NewDelete-intersections.mm @@ -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" diff --git a/clang/test/Analysis/NewDelete-path-notes.cpp b/clang/test/Analysis/NewDelete-path-notes.cpp index 83e6e9f06a6..eeb610537b8 100644 --- a/clang/test/Analysis/NewDelete-path-notes.cpp +++ b/clang/test/Analysis/NewDelete-path-notes.cpp @@ -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() { diff --git a/clang/test/Analysis/NewDelete-variadic.cpp b/clang/test/Analysis/NewDelete-variadic.cpp index b74199b525d..129af1f9c69 100644 --- a/clang/test/Analysis/NewDelete-variadic.cpp +++ b/clang/test/Analysis/NewDelete-variadic.cpp @@ -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 { diff --git a/clang/utils/analyzer/SATestBuild.py b/clang/utils/analyzer/SATestBuild.py index 3d8f7c0a14e..067be162e27 100755 --- a/clang/utils/analyzer/SATestBuild.py +++ b/clang/utils/analyzer/SATestBuild.py @@ -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 |

