[PATCH] Allow ExternalSemaSource to participate in typo correction

Eli Friedman eli.friedman at gmail.com
Tue Aug 13 18:25:47 PDT 2013


It's not obvious to me that this is actually appropriate as-is.
Sema::CorrectTypo is a very complicated routine, and I don't think you're
hooking it at the right level.  What you want isn't to completely take over
typo correction; you want the ability to add typo correction candidates
that aren't otherwise visible.  A much more focused callback would be both
easier to implement correctly and give better results in cases where the
builtin typo correction could come up with a better candidate.

-Eli


On Mon, Aug 12, 2013 at 9:58 AM, Luke Zarko <zarko at google.com> wrote:

> Ping; still looking for a reviewer. The patch still applies without
> problems.
>
> http://llvm-reviews.chandlerc.com/D1211
>
> On Thu, Aug 8, 2013 at 9:23 AM, Luke Zarko <zarko at google.com> wrote:
> > Ping; still looking for someone familiar with typo
> > correction/unittests/ExternalSemaSource.
> >
> > On Sat, Aug 3, 2013 at 6:22 PM, Luke Zarko <zarko at google.com> wrote:
> >> Ping. Looking for someone familiar with typo
> >> correction/unittests/ExternalSemaSource.
> >>
> >> On Tue, Jul 30, 2013 at 3:41 PM, Luke Zarko <zarko at google.com> wrote:
> >>>   Ping/making sure that this still applies cleanly.
> >>>
> >>>   To clarify, the difference between this and typo correction into PCH
> is that the calls for the latter are designed for a closed context ('fill a
> vector with all the namespaces you know about and return it to me'),
> whereas the former is designed for an open context ('I'll give you a
> qualified name and you tell me if it's something that exists').
> >>>
> >>> Hi jdennett,
> >>>
> >>> http://llvm-reviews.chandlerc.com/D1211
> >>>
> >>> CHANGE SINCE LAST DIFF
> >>>   http://llvm-reviews.chandlerc.com/D1211?vs=3003&id=3083#toc
> >>>
> >>> Files:
> >>>   include/clang/Sema/ExternalSemaSource.h
> >>>   include/clang/Sema/MultiplexExternalSemaSource.h
> >>>   lib/Sema/MultiplexExternalSemaSource.cpp
> >>>   lib/Sema/SemaLookup.cpp
> >>>   unittests/CMakeLists.txt
> >>>   unittests/Makefile
> >>>   unittests/Sema/CMakeLists.txt
> >>>   unittests/Sema/ExternalSemaSourceTest.cpp
> >>>   unittests/Sema/Makefile
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130813/0495405a/attachment.html>


More information about the cfe-commits mailing list