[PATCH] D41989: [CodeComplete] Add an option to omit results from the preamble.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 12 05:51:04 PST 2018
sammccall created this revision.
sammccall added reviewers: bkramer, ilya-biryukov.
Herald added a subscriber: cfe-commits.
Enumerating the contents of a namespace or global scope will omit any
decls that aren't already loaded, instead of deserializing them from the
PCH.
This allows a fast hybrid code completion where symbols from headers are
provided by an external index. (Sema already exposes the information
needed to do a reasonabl job of filtering them).
Clangd plans to implement this hybrid.
This option is just a hint - callers still need to postfilter results if
they want to *avoid* completing decls outside the main file.
Repository:
rC Clang
https://reviews.llvm.org/D41989
Files:
include/clang-c/Index.h
include/clang/Sema/CodeCompleteConsumer.h
include/clang/Sema/CodeCompleteOptions.h
include/clang/Sema/Sema.h
lib/Frontend/ASTUnit.cpp
lib/Sema/SemaCodeComplete.cpp
lib/Sema/SemaLookup.cpp
test/Index/complete-pch-skip.cpp
test/Index/complete-pch-skip.h
tools/c-index-test/c-index-test.c
tools/libclang/CIndexCodeCompletion.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41989.129606.patch
Type: text/x-patch
Size: 22642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180112/20401fa4/attachment-0001.bin>
More information about the cfe-commits
mailing list