Remove -Wspellcheck and replace it with a diagnostic option.

Thanks to Richard S. for pointing out that the warning would show up
with -Weverything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177218 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 86ddad2..ad5b89a 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -3738,11 +3738,12 @@
   if (S && S->isInObjcMethodScope() && Typo == getSuperIdentifier())
     return TypoCorrection();
 
-  // This is for regression testing. It's disabled by default.
-  if (Diags.getDiagnosticLevel(diag::warn_spellcheck_initiated,
-                               TypoName.getLoc()) != DiagnosticsEngine::Ignored)
-    Diag(TypoName.getLoc(), diag::warn_spellcheck_initiated)
-      << TypoName.getName();
+  // This is for testing.
+  if (Diags.getWarnOnSpellCheck()) {
+    unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Warning,
+                                            "spell-checking initiated for %0");
+    Diag(TypoName.getLoc(), DiagID) << TypoName.getName();
+  }
 
   NamespaceSpecifierSet Namespaces(Context, CurContext, SS);