diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-28 01:27:12 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-28 01:27:12 +0000 |
commit | a676d501a001657892c483bd4d651650e168f337 (patch) | |
tree | 64bebb9d141f799e0f5d33043b21022f3fb0ed30 /lib | |
parent | 103487088211c13ff3ae66f265130c56fb6be025 (diff) |
[analyzer] Move the DeadStores checker out of the 'core' package.
-Now it gets enabled with '-analyzer-checker=DeadStores'.
-The driver passes the above flag by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/Tools.cpp | 2 | ||||
-rw-r--r-- | lib/StaticAnalyzer/Checkers/Checkers.td | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ef869f1ecf..43ff90da07 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -941,6 +941,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (getToolChain().getTriple().getVendor() == llvm::Triple::Apple) CmdArgs.push_back("-analyzer-checker=macosx"); + CmdArgs.push_back("-analyzer-checker=DeadStores"); + // Checks to perform for Objective-C/Objective-C++. if (types::isObjC(InputType)) { // Enable all checkers in 'cocoa' package. diff --git a/lib/StaticAnalyzer/Checkers/Checkers.td b/lib/StaticAnalyzer/Checkers/Checkers.td index db81af0680..6cc96cef34 100644 --- a/lib/StaticAnalyzer/Checkers/Checkers.td +++ b/lib/StaticAnalyzer/Checkers/Checkers.td @@ -83,12 +83,12 @@ def StackAddrEscapeChecker : Checker<"StackAddrEscape">, HelpText<"Check that addresses to stack memory do not escape the function">, DescFile<"StackAddrEscapeChecker.cpp">; +} // end "core" + def DeadStoresChecker : Checker<"DeadStores">, HelpText<"Check for values stored to a variables that are never read afterwards">, DescFile<"DeadStoresChecker.cpp">; -} // end "core" - def UnixAPIChecker : Checker<"API">, InPackage<Unix>, HelpText<"Check calls to various UNIX/Posix functions">, |