[PATCH] D60126: [clangd] Use identifiers in file as completion candidates when build is not ready.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 9 06:50:23 PDT 2019
ioeric added a comment.
Thanks for the review!
================
Comment at: clangd/CodeComplete.cpp:1320
+ llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) && {
+ auto CompletionFilter = speculateCompletionFilter(Content, Pos);
+ if (!CompletionFilter) {
----------------
sammccall wrote:
> hmm, this function should likely also move to SourceCode, use Offset instead of Position, and move to SourceCode.h. But probably a different patch.
ack
================
Comment at: clangd/CodeComplete.cpp:1341
+
+ // Carve out the typed filter from the content so that we don't treat it as
+ // an identifier.
----------------
sammccall wrote:
> you could just erase the typed filter from the suggestion list.
> (It may be a valid word spelled elsewhere, but there's no point suggesting it)
This is following conventions of other sources. Both index and sema provide results for fully-typed names. Considering that users might be already used to this, and completion results tend to give reassurance for correctly typed names, I am inclined to keep the typed filter if it's seen somewhere else in the file.
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60126/new/
https://reviews.llvm.org/D60126
More information about the cfe-commits
mailing list