From 87498c8ee9b41a97679922a7ab85b399af0f1e7d Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Mon, 14 Sep 2015 20:34:06 +0000 Subject: [PATCH] [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 --- lib/Driver/Tools.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.50.1