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. llvm-svn: 116511
Loading
Please register or sign in to comment