aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-14 20:34:08 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-14 20:34:08 +0000
commite24b575f06985336973bb721e198bd184bf7bdd3 (patch)
treea8826f32f2692c8b5941d7cede990c4fc952cea9 /lib/Basic/IdentifierTable.cpp
parent36d2fd44bfeec417bbd7465218353abb8bf7e95d (diff)
Tweak the typo-correction implementation to determine corrections
solely based on the names it sees, rather than actual declarations it gets. In essence, we determine the set of names that are "close enough" to the typo'd name. Then, we perform name lookup for each of those names, filtering out those that aren't actually visible, and typo-correct from the remaining results. Overall, there isn't much of a change in the behavior of typo correction here. The only test-suite change comes from the fact that we make good on our promise to require that the user type 3 characters for each 1 character corrected. The real intent behind this change is to set the stage for an optimization to typo correction (so that we don't need to deserialize all declarations in a translation unit) and future work in finding missing qualification ("'vector' isn't in scope; did you mean 'std::vector'?). Plus, the code is cleaner this way. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
0 files changed, 0 insertions, 0 deletions