summaryrefslogtreecommitdiff
path: root/include/clang-c
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-01-12 14:51:47 +0000
committerSam McCall <sam.mccall@gmail.com>2018-01-12 14:51:47 +0000
commit3ee4cc4acfa675c8cace6b05f2b41ed45a6a1033 (patch)
treeeafc3fc139c8fdbb56ec595c61ed608af8af505b /include/clang-c
parent780143bbd516aa39d754e5cab50955321b71fba0 (diff)
downloadclang-3ee4cc4acfa675c8cace6b05f2b41ed45a6a1033.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index a0c4dc98ad..775b7acc94 100644
--- a/include/clang-c/Index.h
+++ b/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
};
/**