Index: test/Analysis/null-deref-ps.c
===================================================================
--- test/Analysis/null-deref-ps.c	(revision 149404)
+++ test/Analysis/null-deref-ps.c	(working copy)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,experimental.deadcode.IdempotentOperations,experimental.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -analyzer-purge=none -verify %s -Wreturn-type
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,experimental.deadcode.IdempotentOperations,experimental.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -verify %s -Wreturn-type 
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,experimental.deadcode.IdempotentOperations,experimental.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -analyzer-purge=none -verify %s -Wno-error=return-type
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,experimental.deadcode.IdempotentOperations,experimental.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -verify %s -Wno-error=return-type 
 
 typedef unsigned uintptr_t;
 
Index: test/Sema/return.c
===================================================================
--- test/Sema/return.c	(revision 149404)
+++ test/Sema/return.c	(working copy)
@@ -1,8 +1,8 @@
-// RUN: %clang %s -fsyntax-only -Wignored-qualifiers -Wreturn-type -Xclang -verify -fblocks -Wno-unreachable-code -Wno-unused-value
+// RUN: %clang %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -Xclang -verify -fblocks -Wno-unreachable-code -Wno-unused-value
 
 // clang emits the following warning by default.
-// With GCC, -pedantic, -Wreturn-type or -Wall are required to produce the 
-// following warning.
+// With GCC, -pedantic, -Wno-error=return-type or -Wall are required to produce
+// the following warning.
 int t14() {
   return; // expected-warning {{non-void function 't14' should return a value}}
 }
Index: test/Frontend/warning-mapping-6.c
===================================================================
--- test/Frontend/warning-mapping-6.c	(revision 0)
+++ test/Frontend/warning-mapping-6.c	(revision 0)
@@ -0,0 +1,6 @@
+// Check that -W diagnostic warnings down override -Werror.
+//
+// RUN: %clang_cc1 -Werror=implicit -Wall -fsyntax-only -verify %s 
+// RUN: %clang_cc1 -Wall -Werror=implicit -fsyntax-only -verify %s 
+
+int foo() { return bar(); } // expected-error{{implicit declaration of function 'bar' is invalid}}
Index: test/SemaObjCXX/vararg-non-pod.mm
===================================================================
--- test/SemaObjCXX/vararg-non-pod.mm	(revision 149404)
+++ test/SemaObjCXX/vararg-non-pod.mm	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -Wnon-pod-varargs
+// RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-error=non-pod-varargs
 
 extern char version[];
 
Index: test/CodeGen/statements.c
===================================================================
--- test/CodeGen/statements.c	(revision 149404)
+++ test/CodeGen/statements.c	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wreturn-type %s -emit-llvm-only
+// RUN: %clang_cc1 -Wno-error=return-type %s -emit-llvm-only
 
 void test1(int x) {
 switch (x) {
Index: test/SemaCXX/vararg-non-pod.cpp
===================================================================
--- test/SemaCXX/vararg-non-pod.cpp	(revision 149404)
+++ test/SemaCXX/vararg-non-pod.cpp	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s -Wnon-pod-varargs
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s -Wno-error=non-pod-varargs
 
 extern char version[];
 
Index: lib/Basic/Diagnostic.cpp
===================================================================
--- lib/Basic/Diagnostic.cpp	(revision 149404)
+++ lib/Basic/Diagnostic.cpp	(working copy)
@@ -172,6 +172,13 @@
 
   FullSourceLoc Loc(L, *SourceMgr);
   FullSourceLoc LastStateChangePos = DiagStatePoints.back().Loc;
+  // Don't allow a mapping to a warning override an error/fatal mapping.
+  if (Map == diag::MAP_WARNING) {
+    DiagnosticMappingInfo &Info = GetCurDiagState()->getOrAddMappingInfo(Diag);
+    if (Info.getMapping() == diag::MAP_ERROR ||
+        Info.getMapping() == diag::MAP_FATAL)
+      Map = Info.getMapping();
+  }
   DiagnosticMappingInfo MappingInfo = makeMappingInfo(Map, L);
 
   // Common case; setting all the diagnostics of a group in one place.
