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

2018-05-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Dropping this in favor of https://reviews.llvm.org/D47256 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

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

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
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 fi

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

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:457 Result.StartsNestedNameSpecifier = false; + // FIXME: the same result can be added multiple times as the callback can + // be called more than once. We may want to deduplicate identical

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

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:457 Result.StartsNestedNameSpecifier = false; + // FIXME: the same result can be added multiple times as the callback can + // be called more than once. We may want to deduplicate identical result

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

2018-05-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:457 Result.StartsNestedNameSpecifier = false; + // FIXME: the same result can be added multiple times as the callback can + // be called more than once. We may want to deduplicate identical

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

2018-05-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: ilya-biryukov, sammccall. Herald added subscribers: cfe-commits, jkorous, MaskRay, klimek. Currently, we only handle the first callback from sema code completion and ignore results from potential following callbacks. This causes causes loss of