aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-16 01:40:35 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-16 01:40:35 +0000
commit6aa240c03dd68ab413106d6af7a18af1c9b4e872 (patch)
treea75e57eab6b55ee500dea8d2aee96b6bb6d98dbc /lib/Sema/SemaLookup.cpp
parent1efffab67364f5afcc25f5f5f77e0f7ba5d41055 (diff)
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
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 86ddad21f5..ad5b89a43a 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -3738,11 +3738,12 @@ TypoCorrection Sema::CorrectTypo(const DeclarationNameInfo &TypoName,
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);