From: Gabor Horvath Date: Mon, 14 Sep 2015 20:34:06 +0000 (+0000) Subject: [Static Analyzer] Turn on some nullability checks by default. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87498c8ee9b41a97679922a7ab85b399af0f1e7d;p=clang [Static Analyzer] Turn on some nullability checks by default. Differential Revision: http://reviews.llvm.org/D12858 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247614 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 1b79ed730f..7a5368a5fa 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3322,6 +3322,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, 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