aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2012-01-23 20:18:59 +0000
committerKaelyn Uhrain <rikka@google.com>2012-01-23 20:18:59 +0000
commit438ee1fc5e5baaa204faede83cb999e45bb6b57e (patch)
tree4e19c1899bef5a1df550671016c4f2a9109b9228 /lib/Parse/ParseDecl.cpp
parentf5249f509e3ab937921f37ce5a34b7c87474a087 (diff)
In CorrectTypo, use the cached correction as a starting point instead.
Previously, for unqualified lookups, a positive cache hit is used as the only non-keyword correction and a negative cache hit immediately returns an empty TypoCorrection. With the new callback objects, this behavior causes false negatives by not accounting for the fact that callback objects alter the set of potential/allowed corrections. The new behavior is to seed the set of corrections with the cached correction (for positive hits) to estabilishing a baseline edit distance. Negative cache hits are only stored or used when either no callback object is provided or when it returns true for a call to ValidateCandidate with an empty TypoCorrection (i.e. when ValidateCandidate does not seem to be doing any checking of the TypoCorrection, such as when an instance of the base callback class is used solely to specify the set of keywords to be accepted). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
0 files changed, 0 insertions, 0 deletions