arrange for -Wno-error=foo warnings to be immune to -Werror as 
they are supposed to be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69265 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 19bfeee..6b7f732 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -382,7 +382,20 @@
     // If warnings are globally mapped to ignore or error, do it.
     if (IgnoreAllWarnings)
       return Diagnostic::Ignored;
-    Result = WarningsAsErrors ? Diagnostic::Error : Diagnostic::Warning;
+      
+    Result = Diagnostic::Warning;
+    if (WarningsAsErrors)
+      Result = Diagnostic::Error;
+    break;
+  case diag::MAP_WARNING_NO_WERROR:
+    // Diagnostics specified with -Wno-error=foo should be set to warnings, but
+    // not be adjusted by -Werror or -pedantic-errors.
+    Result = Diagnostic::Warning;
+      
+    // If warnings are globally mapped to ignore or error, do it.
+    if (IgnoreAllWarnings)
+      return Diagnostic::Ignored;
+      
     break;
   }