[PATCH] D47183: [clangd] Support multiple sema code completion callbacks.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 22 08:23:13 PDT 2018

ioeric added a comment.

OK, it turned out that there are a few things that I overlooked:

1. Top-N Ranking would be broken among different callbacks. We would need to keep a single `TopN` for all callbacks.
2. Due to 1), materialization of TopN candidates would happen after all callbacks have finished but before sema is destroyed.  The problem is that the lifetime of completion results from one sema callback do not always outlive the callback, which would break our lazy materialization.

I think multi-callback support should require more careful design. And to fix the code completion in macros, I'll do the context filtering (as Ilya suggested) for now.

  rCTE Clang Tools Extra


More information about the cfe-commits mailing list