[PATCH] D51782: [CodeComplete] Clearly distinguish signature help and code completion.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 7 06:12:00 PDT 2018


ilya-biryukov created this revision.
ilya-biryukov added reviewers: sammccall, kadircet.

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 https://reviews.llvm.org/D51038.

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


Repository:
  rC Clang

https://reviews.llvm.org/D51782

Files:
  include/clang/Sema/Sema.h
  lib/Parse/ParseDecl.cpp
  lib/Parse/ParseExpr.cpp
  lib/Parse/ParseExprCXX.cpp
  lib/Parse/ParseOpenMP.cpp
  lib/Sema/SemaCodeComplete.cpp
  test/CodeCompletion/call.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51782.164398.patch
Type: text/x-patch
Size: 11988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180907/2fd4b13a/attachment.bin>


More information about the cfe-commits mailing list