bool SuppressAllDiagnostics; // Suppress all diagnostics.
bool ElideType; // Elide common types of templates.
bool PrintTemplateTree; // Print a tree when comparing templates.
- bool WarnOnSpellCheck; // Emit warning when spellcheck is initiated.
bool ShowColors; // Color printing is enabled.
OverloadsShown ShowOverloads; // Which overload candidates to show.
unsigned ErrorLimit; // Cap of # errors emitted, 0 -> no limit.
/// tree format.
void setPrintTemplateTree(bool Val = false) { PrintTemplateTree = Val; }
bool getPrintTemplateTree() { return PrintTemplateTree; }
-
- /// \brief Warn when spellchecking is initated, for testing.
- void setWarnOnSpellCheck(bool Val = false) { WarnOnSpellCheck = Val; }
- bool getWarnOnSpellCheck() { return WarnOnSpellCheck; }
/// \brief Set color printing, so the type diffing will inject color markers
/// into the output.
DIAGOPT(ElideType, 1, 0) /// Elide identical types in template diffing
DIAGOPT(ShowTemplateTree, 1, 0) /// Print a template tree when diffing
-DIAGOPT(WarnOnSpellCheck, 1, 0) /// -fwarn-on-spellcheck
VALUE_DIAGOPT(ErrorLimit, 32, 0) /// Limit # errors emitted.
/// Limit depth of macro expansion backtrace.
def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
HelpText<"Silence ObjC rewriting warnings">;
-def fwarn_on_spellcheck : Flag<["-"], "fwarn-on-spellcheck">,
- HelpText<"Emit warning if spell-check is initiated, for testing">;
-
//===----------------------------------------------------------------------===//
// Frontend Options
//===----------------------------------------------------------------------===//
AllExtensionsSilenced = 0;
IgnoreAllWarnings = false;
WarningsAsErrors = false;
- WarnOnSpellCheck = false;
EnableAllWarnings = false;
ErrorsAsFatal = false;
SuppressSystemWarnings = false;
Opts.VerifyDiagnostics = Args.hasArg(OPT_verify);
Opts.ElideType = !Args.hasArg(OPT_fno_elide_type);
Opts.ShowTemplateTree = Args.hasArg(OPT_fdiagnostics_show_template_tree);
- Opts.WarnOnSpellCheck = Args.hasArg(OPT_fwarn_on_spellcheck);
Opts.ErrorLimit = Args.getLastArgIntValue(OPT_ferror_limit, 0, Diags);
Opts.MacroBacktraceLimit
= Args.getLastArgIntValue(OPT_fmacro_backtrace_limit,
Diags.setElideType(Opts.ElideType);
Diags.setPrintTemplateTree(Opts.ShowTemplateTree);
- Diags.setWarnOnSpellCheck(Opts.WarnOnSpellCheck);
Diags.setShowColors(Opts.ShowColors);
// Handle -ferror-limit
if (S && S->isInObjcMethodScope() && Typo == getSuperIdentifier())
return TypoCorrection();
- // 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);
TypoCorrectionConsumer Consumer(*this, Typo);
-// RUN: %clang_cc1 %s -verify -fsyntax-only -fwarn-on-spellcheck
+// RUN: %clang_cc1 %s -verify -fsyntax-only
@interface B
@property int x;
@end
// Spell-checking 'undefined' is ok.
-undefined var; // expected-warning {{spell-checking initiated}} \
- // expected-error {{unknown type name}}
+undefined var; // expected-error {{unknown type name}}
typedef int super1;
@implementation S