Rework checker "packages" and groups to be more hierarchical.

llvm-svn: 128187
This commit is contained in:
Ted Kremenek
2011-03-24 00:28:47 +00:00
parent f949d8e13d
commit 49c79790de
32 changed files with 348 additions and 285 deletions

View File

@@ -1020,28 +1020,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// Treat blocks as analysis entry points.
CmdArgs.push_back("-analyzer-opt-analyze-nested-blocks");
CmdArgs.push_back("-analyzer-eagerly-assume");
// Add default argument set.
if (!Args.hasArg(options::OPT__analyzer_no_default_checks)) {
types::ID InputType = Inputs[0].getType();
// Checks to perform for all language types.
CmdArgs.push_back("-analyzer-checker=core");
CmdArgs.push_back("-analyzer-checker=deadcode");
CmdArgs.push_back("-analyzer-checker=security");
if (getToolChain().getTriple().getOS() != llvm::Triple::Win32)
CmdArgs.push_back("-analyzer-checker=unix");
if (getToolChain().getTriple().getVendor() == llvm::Triple::Apple)
CmdArgs.push_back("-analyzer-checker=macosx");
CmdArgs.push_back("-analyzer-checker=deadcode.DeadStores");
CmdArgs.push_back("-analyzer-checker=deadcode.IdempotentOperations");
// Checks to perform for Objective-C/Objective-C++.
if (types::isObjC(InputType)) {
// Enable all checkers in 'cocoa' package.
CmdArgs.push_back("-analyzer-checker=cocoa");
}
CmdArgs.push_back("-analyzer-eagerly-assume");
CmdArgs.push_back("-analyzer-checker=osx");
}
// Set the output format. The default is plist, for (lame) historical