clang  14.0.0git
CodeCompleteOptions.h
Go to the documentation of this file.
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.
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.
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 
49  LoadExternal(1), IncludeFixIts(0) {}
50 };
51 
52 } // namespace clang
53 
54 #endif
55 
clang::CodeCompleteOptions::IncludeMacros
unsigned IncludeMacros
Show macros in code completion results.
Definition: CodeCompleteOptions.h:18
clang::CodeCompleteOptions::CodeCompleteOptions
CodeCompleteOptions()
Definition: CodeCompleteOptions.h:46
clang::CodeCompleteOptions::IncludeBriefComments
unsigned IncludeBriefComments
Show brief documentation comments in code completion results.
Definition: CodeCompleteOptions.h:35
clang::CodeCompleteOptions::IncludeFixIts
unsigned IncludeFixIts
Include results after corrections (small fix-its), e.g.
Definition: CodeCompleteOptions.h:44
clang::CodeCompleteOptions::IncludeGlobals
unsigned IncludeGlobals
Show top-level decls in code completion results.
Definition: CodeCompleteOptions.h:24
clang::CodeCompleteOptions::IncludeCodePatterns
unsigned IncludeCodePatterns
Show code patterns in code completion results.
Definition: CodeCompleteOptions.h:21
clang::CodeCompleteOptions::IncludeNamespaceLevelDecls
unsigned IncludeNamespaceLevelDecls
Show decls in namespace (including the global namespace) in code completion results.
Definition: CodeCompleteOptions.h:32
clang
Definition: CalledOnceCheck.h:17
clang::CodeCompleteOptions
Options controlling the behavior of code completion.
Definition: CodeCompleteOptions.h:15
clang::CodeCompleteOptions::LoadExternal
unsigned LoadExternal
Hint whether to load data from the external AST to provide full results.
Definition: CodeCompleteOptions.h:40