[PATCH] D12858: [Static Analyzer] Turn on some nullability checks by default.

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 12:06:41 PDT 2015


xazax.hun created this revision.
xazax.hun added reviewers: zaks.anna, dcoughlin, jordan_rose.
xazax.hun added a subscriber: cfe-commits.

This patch turns on some of the nullability related patches by default. These checks has low false positive rate. 

http://reviews.llvm.org/D12858

Files:
  lib/Driver/Tools.cpp

Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -3322,6 +3322,11 @@
       CmdArgs.push_back("-analyzer-checker=security.insecureAPI.mktemp");
       CmdArgs.push_back("-analyzer-checker=security.insecureAPI.mkstemp");
       CmdArgs.push_back("-analyzer-checker=security.insecureAPI.vfork");
+
+      // Default nullability checks.
+      CmdArgs.push_back("-analyzer-checker=nullability.NullPassedToNonnull");
+      CmdArgs.push_back(
+          "-analyzer-checker=nullability.NullReturnedFromNonnull");
     }
 
     // Set the output format. The default is plist, for (lame) historical


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12858.34720.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150914/095e37a7/attachment.bin>


More information about the cfe-commits mailing list