This is an archive of the discontinued LLVM Phabricator instance.

Replaced more boilerplate code with CompletionRequest (NFC)
ClosedPublic

Authored by teemperor on Jul 5 2018, 9:08 AM.

Details

Summary

As suggested in D48796, this patch replaces even more internal calls that were using the old
completion API style with a single CompletionRequest. In some cases we also pass an option
vector/index, but as we don't always have this information, it currently is not part of the
CompletionRequest class.

The constructor of the CompletionRequest is now also more sensible. You only pass the
user input, cursor position and your list of matches to the request and the rest will be
inferred (using the same code we used before to calculate this). You also have to pass these
match window parameters to it, even though they are unused right now.

The patch shouldn't change any behavior.

Diff Detail

Repository
rL LLVM

Event Timeline

teemperor created this revision.Jul 5 2018, 9:08 AM
jingham accepted this revision.Jul 13 2018, 11:08 AM

Oops, sorry for the delay. This is so much easier to read. Thanks for cleaning this up!

This revision is now accepted and ready to land.Jul 13 2018, 11:08 AM
This revision was automatically updated to reflect the committed changes.