]> granicus.if.org Git - clang/commitdiff
Disable the emission of frontend warnings (not errors) under --analyze.
authorTed Kremenek <kremenek@apple.com>
Mon, 22 Mar 2010 22:32:05 +0000 (22:32 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 22 Mar 2010 22:32:05 +0000 (22:32 +0000)
Fixes <rdar://problem/7405601>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99222 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 1c34df05b1c53fac404a4d82681d381af4c577a2..41333466ecd07c9918c96064981ee210ef215822 100644 (file)
@@ -796,6 +796,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     else
       CmdArgs.push_back("plist");
 
+    // Disable the presentation of standard compiler warnings when
+    // using --analyze.  We only want to show static analyzer diagnostics
+    // or frontend errors.
+    CmdArgs.push_back("-w");
+
     // Add -Xanalyzer arguments when running as analyzer.
     Args.AddAllArgValues(CmdArgs, options::OPT_Xanalyzer);
   }