diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2014-12-16 21:39:02 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2014-12-16 21:39:02 +0000 |
commit | 246532627e1493ce7605efda3ef152aeda0d9001 (patch) | |
tree | 7f6e55807d78bb8bf863b6887e4b6f78aa8b3053 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f5acc8c625372597d033aec2cf1c1ef0db5434f7 (diff) | |
download | bcm5719-llvm-246532627e1493ce7605efda3ef152aeda0d9001.tar.gz bcm5719-llvm-246532627e1493ce7605efda3ef152aeda0d9001.zip |
Add a new flag, -fspell-checking-limit=<number> to control how many times we'll do spell checking. Note that spell checking will change the produced AST, so we don't automatically change this value when someone sets -ferror-limit=. With this, merge test typo-correction-pt2.cpp into typo-correction.cpp.
Remove Sema::UnqualifiedTyposCorrected, a cache of corrected typos. It would only cache typo corrections that didn't provide ValidateCandidate of which there were few left, and it had a bug when we had the same identifier spelled wrong twice. See the last two tests in typo-correction.cpp for cases this fires.
llvm-svn: 224375
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 610bfffc7ea..97be3d3fbf2 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -707,6 +707,9 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args, Opts.ConstexprBacktraceLimit = getLastArgIntValue( Args, OPT_fconstexpr_backtrace_limit, DiagnosticOptions::DefaultConstexprBacktraceLimit, Diags); + Opts.SpellCheckingLimit = getLastArgIntValue( + Args, OPT_fspell_checking_limit, + DiagnosticOptions::DefaultSpellCheckingLimit, Diags); Opts.TabStop = getLastArgIntValue(Args, OPT_ftabstop, DiagnosticOptions::DefaultTabStop, Diags); if (Opts.TabStop == 0 || Opts.TabStop > DiagnosticOptions::MaxTabStop) { |