Have 'clang --analyze' run syntactic static analysis security checks.
authorTed Kremenek <kremenek@apple.com>
Fri, 24 Jul 2009 20:03:11 +0000 (20:03 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 24 Jul 2009 20:03:11 +0000 (20:03 +0000)
llvm-svn: 76996

clang/lib/Driver/Tools.cpp

index 2fe2aa1896bec2d8425560a3691b7ca835825333..e3612c71bdafed061b6affc7bec83794d0c5f103 100644 (file)
@@ -241,6 +241,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     // Add default argument set.
     if (!Args.hasArg(options::OPT__analyzer_no_default_checks)) {
       CmdArgs.push_back("-warn-dead-stores");
+      CmdArgs.push_back("-warn-security-syntactic");
       CmdArgs.push_back("-checker-cfref");
       CmdArgs.push_back("-analyzer-eagerly-assume");
       CmdArgs.push_back("-warn-objc-methodsigs");