This is an archive of the discontinued LLVM Phabricator instance.

[CodeComplete] Clearly distinguish signature help and code completion.
ClosedPublic

Authored by ilya-biryukov on Sep 7 2018, 6:11 AM.

Details

Summary

Code completion in clang is actually a mix of two features:

  • Code completion is a familiar feature. Results are exposed via the CodeCompleteConsumer::ProcessCodeCompleteResults callback.
  • Signature help figures out if the current expression is an argument of some function call and shows corresponding signatures if so. Results are exposed via CodeCompleteConsumer::ProcessOverloadCandidates.

This patch refactors the implementation to untangle those two from each
other and makes some naming tweaks to avoid confusion when reading the
code.

The refactoring is required for signature help fixes, see D51038.

The only intended behavior change is the order of callbacks.
ProcessOverloadCandidates is now called before ProcessCodeCompleteResults.

Diff Detail

Repository
rC Clang

Event Timeline

ilya-biryukov created this revision.Sep 7 2018, 6:11 AM
sammccall accepted this revision.Sep 7 2018, 6:38 AM
This revision is now accepted and ready to land.Sep 7 2018, 6:38 AM
This revision was automatically updated to reflect the committed changes.