summaryrefslogtreecommitdiffstats
path: root/clang/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
commit3065a0fce412c453293b91eeafc6082baf4626e0 (patch)
treed61f11387f0ea86349b880b1b8a8a42bbaffd083 /clang/lib/Sema/SemaLookup.cpp
parent6a92511a08664b8baf214606724709a58464ed61 (diff)
downloadbcm5719-llvm-3065a0fce412c453293b91eeafc6082baf4626e0.tar.gz
bcm5719-llvm-3065a0fce412c453293b91eeafc6082baf4626e0.zip
Remove -Wspellcheck and replace it with a diagnostic option.
Thanks to Richard S. for pointing out that the warning would show up with -Weverything. llvm-svn: 177218
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index 86ddad21f5d..ad5b89a43ab 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud