/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/Sema/CodeCompleteOptions.h
Line | Count | Source |
1 | | //===---- CodeCompleteOptions.h - Code Completion Options -------*- C++ -*-===// |
2 | | // |
3 | | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | | // See https://llvm.org/LICENSE.txt for license information. |
5 | | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | | // |
7 | | //===----------------------------------------------------------------------===// |
8 | | |
9 | | #ifndef LLVM_CLANG_SEMA_CODECOMPLETEOPTIONS_H |
10 | | #define LLVM_CLANG_SEMA_CODECOMPLETEOPTIONS_H |
11 | | |
12 | | namespace clang { |
13 | | |
14 | | /// Options controlling the behavior of code completion. |
15 | | class CodeCompleteOptions { |
16 | | public: |
17 | | /// Show macros in code completion results. |
18 | | unsigned IncludeMacros : 1; |
19 | | |
20 | | /// Show code patterns in code completion results. |
21 | | unsigned IncludeCodePatterns : 1; |
22 | | |
23 | | /// Show top-level decls in code completion results. |
24 | | unsigned IncludeGlobals : 1; |
25 | | |
26 | | /// Show decls in namespace (including the global namespace) in code |
27 | | /// completion results. If this is 0, `IncludeGlobals` will be ignored. |
28 | | /// |
29 | | /// Currently, this only works when completing qualified IDs (i.e. |
30 | | /// `Sema::CodeCompleteQualifiedId`). |
31 | | /// FIXME: consider supporting more completion cases with this option. |
32 | | unsigned IncludeNamespaceLevelDecls : 1; |
33 | | |
34 | | /// Show brief documentation comments in code completion results. |
35 | | unsigned IncludeBriefComments : 1; |
36 | | |
37 | | /// Hint whether to load data from the external AST to provide full results. |
38 | | /// If false, namespace-level declarations and macros from the preamble may be |
39 | | /// omitted. |
40 | | unsigned LoadExternal : 1; |
41 | | |
42 | | /// Include results after corrections (small fix-its), e.g. change '.' to '->' |
43 | | /// on member access, etc. |
44 | | unsigned IncludeFixIts : 1; |
45 | | |
46 | | CodeCompleteOptions() |
47 | | : IncludeMacros(0), IncludeCodePatterns(0), IncludeGlobals(1), |
48 | | IncludeNamespaceLevelDecls(1), IncludeBriefComments(0), |
49 | 194k | LoadExternal(1), IncludeFixIts(0) {} |
50 | | }; |
51 | | |
52 | | } // namespace clang |
53 | | |
54 | | #endif |
55 | | |