Fix <rdar://problem/6848739>.  When using -analyze, -Werror has no effect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71172 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/AnalysisConsumer.cpp b/tools/clang-cc/AnalysisConsumer.cpp
index b1fb741..381b9d0 100644
--- a/tools/clang-cc/AnalysisConsumer.cpp
+++ b/tools/clang-cc/AnalysisConsumer.cpp
@@ -654,6 +654,9 @@
 #include "Analyses.def"
       default: break;
     }
+  
+  // Last, disable the effects of '-Werror' when using the AnalysisConsumer.
+  diags.setWarningsAsErrors(false);
 
   return C.take();
 }