[PATCH v2 3/6] Add a few small helper methods to the TypoCorrectionConsumer.

David Blaikie dblaikie at gmail.com
Fri Oct 31 11:19:38 PDT 2014


On Fri, Oct 31, 2014 at 11:17 AM, David Blaikie <dblaikie at gmail.com> wrote:

> Again reminds me that maybe an iterator idiom for typo corrections might
> be nice
>
> (then peaking would be "std::next(i)->...")
>

But that's up to you when/how you want to address that - given the current
design, this looks plausible.

If there's a nice way to implement this function without having to change
the object's internal state and then change it back, that'd be great (can
the guts of getNextCorrection be factored in such a way as you could call
"nextCorrectionIndex" as a non-mutating operation, then just use that to
lookup the ValidatedCorrections array? Then the original getNextCorrection
function could be something like CurrentTCIndex = nextCorrectionIndex(... ))


>
> On Wed, Oct 29, 2014 at 12:49 PM, Kaelyn Takata <rikka at google.com> wrote:
>
>> ---
>>  include/clang/Sema/SemaInternal.h | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>>
>> _______________________________________________
>> 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/20141031/7cbea929/attachment.html>


More information about the cfe-commits mailing list