clang 20.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#include "llvm/Support/Compiler.h"
13
14namespace clang {
15
16/// Options controlling the behavior of code completion.
18public:
19 /// Show macros in code completion results.
20 LLVM_PREFERRED_TYPE(bool)
22
23 /// Show code patterns in code completion results.
24 LLVM_PREFERRED_TYPE(bool)
25 unsigned IncludeCodePatterns : 1;
26
27 /// Show top-level decls in code completion results.
28 LLVM_PREFERRED_TYPE(bool)
29 unsigned IncludeGlobals : 1;
30
31 /// Show decls in namespace (including the global namespace) in code
32 /// completion results. If this is 0, `IncludeGlobals` will be ignored.
33 ///
34 /// Currently, this only works when completing qualified IDs (i.e.
35 /// `Sema::CodeCompleteQualifiedId`).
36 /// FIXME: consider supporting more completion cases with this option.
37 LLVM_PREFERRED_TYPE(bool)
39
40 /// Show brief documentation comments in code completion results.
41 LLVM_PREFERRED_TYPE(bool)
43
44 /// Hint whether to load data from the external AST to provide full results.
45 /// If false, namespace-level declarations and macros from the preamble may be
46 /// omitted.
47 LLVM_PREFERRED_TYPE(bool)
48 unsigned LoadExternal : 1;
49
50 /// Include results after corrections (small fix-its), e.g. change '.' to '->'
51 /// on member access, etc.
52 LLVM_PREFERRED_TYPE(bool)
53 unsigned IncludeFixIts : 1;
54
59};
60
61} // namespace clang
62
63#endif
64
Options controlling the behavior of code completion.
unsigned IncludeCodePatterns
Show code patterns in code completion results.
unsigned IncludeNamespaceLevelDecls
Show decls in namespace (including the global namespace) in code completion results.
unsigned IncludeFixIts
Include results after corrections (small fix-its), e.g.
unsigned LoadExternal
Hint whether to load data from the external AST to provide full results.
unsigned IncludeMacros
Show macros in code completion results.
unsigned IncludeBriefComments
Show brief documentation comments in code completion results.
unsigned IncludeGlobals
Show top-level decls in code completion results.
The JSON file list parser is used to communicate input to InstallAPI.