From: Argyrios Kyrtzidis Date: Sat, 19 Feb 2011 08:03:21 +0000 (+0000) Subject: [analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8899ab01d43ca7359cd852e58c5c3182cd0979c5;p=clang [analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without crashing; enable it for C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126026 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 8328982ae9..75e0b3dfb9 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -938,14 +938,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-analyzer-checker=cocoa"); } - // Checks to perform for all languages *except* C++. - if (!types::isCXX(InputType)) { - // NOTE: Leaving -analyzer-check-objc-mem here is intentional. - // It also checks C code. - CmdArgs.push_back("-analyzer-check-objc-mem"); + // NOTE: Leaving -analyzer-check-objc-mem here is intentional. + // It also checks C code. + CmdArgs.push_back("-analyzer-check-objc-mem"); - CmdArgs.push_back("-analyzer-eagerly-assume"); - } + CmdArgs.push_back("-analyzer-eagerly-assume"); } // Set the output format. The default is plist, for (lame) historical