|
|
|||
File indexing completed on 2026-05-10 08:36:59
0001 //===---- CodeCompleteOptions.h - Code Completion Options -------*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLVM_CLANG_SEMA_CODECOMPLETEOPTIONS_H 0010 #define LLVM_CLANG_SEMA_CODECOMPLETEOPTIONS_H 0011 0012 #include "llvm/Support/Compiler.h" 0013 0014 namespace clang { 0015 0016 /// Options controlling the behavior of code completion. 0017 class CodeCompleteOptions { 0018 public: 0019 /// Show macros in code completion results. 0020 LLVM_PREFERRED_TYPE(bool) 0021 unsigned IncludeMacros : 1; 0022 0023 /// Show code patterns in code completion results. 0024 LLVM_PREFERRED_TYPE(bool) 0025 unsigned IncludeCodePatterns : 1; 0026 0027 /// Show top-level decls in code completion results. 0028 LLVM_PREFERRED_TYPE(bool) 0029 unsigned IncludeGlobals : 1; 0030 0031 /// Show decls in namespace (including the global namespace) in code 0032 /// completion results. If this is 0, `IncludeGlobals` will be ignored. 0033 /// 0034 /// Currently, this only works when completing qualified IDs (i.e. 0035 /// `Sema::CodeCompleteQualifiedId`). 0036 /// FIXME: consider supporting more completion cases with this option. 0037 LLVM_PREFERRED_TYPE(bool) 0038 unsigned IncludeNamespaceLevelDecls : 1; 0039 0040 /// Show brief documentation comments in code completion results. 0041 LLVM_PREFERRED_TYPE(bool) 0042 unsigned IncludeBriefComments : 1; 0043 0044 /// Hint whether to load data from the external AST to provide full results. 0045 /// If false, namespace-level declarations and macros from the preamble may be 0046 /// omitted. 0047 LLVM_PREFERRED_TYPE(bool) 0048 unsigned LoadExternal : 1; 0049 0050 /// Include results after corrections (small fix-its), e.g. change '.' to '->' 0051 /// on member access, etc. 0052 LLVM_PREFERRED_TYPE(bool) 0053 unsigned IncludeFixIts : 1; 0054 0055 CodeCompleteOptions() 0056 : IncludeMacros(0), IncludeCodePatterns(0), IncludeGlobals(1), 0057 IncludeNamespaceLevelDecls(1), IncludeBriefComments(0), 0058 LoadExternal(1), IncludeFixIts(0) {} 0059 }; 0060 0061 } // namespace clang 0062 0063 #endif 0064
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|