diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-01-12 14:51:47 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-01-12 14:51:47 +0000 |
commit | bb2cf63b324846ee74fc785d0f49b8b29e105297 (patch) | |
tree | 2dae45ec75b165bb4da32e729c86ae2b2841b4b6 /clang/include/clang-c | |
parent | f4374f087f4440f2b25cf2b69b089c5add35b73c (diff) | |
download | bcm5719-llvm-bb2cf63b324846ee74fc785d0f49b8b29e105297.tar.gz bcm5719-llvm-bb2cf63b324846ee74fc785d0f49b8b29e105297.zip |
[CodeComplete] Add an option to omit results from the preamble.
Summary:
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.
Reviewers: bkramer, ilya-biryukov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D41989
llvm-svn: 322371
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r-- | clang/include/clang-c/Index.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index a0c4dc98ada..775b7acc946 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -5161,7 +5161,14 @@ enum CXCodeComplete_Flags { * \brief Whether to include brief documentation within the set of code * completions returned. */ - CXCodeComplete_IncludeBriefComments = 0x04 + CXCodeComplete_IncludeBriefComments = 0x04, + + /** + * \brief Whether to speed up completion by omitting some entities which are + * defined in the preamble. There's no guarantee any particular entity will + * be omitted. This may be useful if the headers are indexed externally. + */ + CXCodeComplete_SkipPreamble = 0x08 }; /** |