clang  14.0.0git
IndexingOptions.h
Go to the documentation of this file.
1 //===--- IndexingOptions.h - Options for indexing ---------------*- 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_INDEX_INDEXINGOPTIONS_H
10 #define LLVM_CLANG_INDEX_INDEXINGOPTIONS_H
11 
13 #include <memory>
14 #include <string>
15 
16 namespace clang {
17 class Decl;
18 namespace index {
19 
22  None,
24  All,
25  };
26 
29  bool IndexFunctionLocals = false;
31  bool IndexMacros = true;
32  // Whether to index macro definitions in the Preprocesor when preprocessor
33  // callback is not available (e.g. after parsing has finished). Note that
34  // macro references are not available in Proprocessor.
36  // Has no effect if IndexFunctionLocals are false.
39 
40  // If set, skip indexing inside some declarations for performance.
41  // This prevents traversal, so skipping a struct means its declaration an
42  // members won't be indexed, but references elsewhere to that struct will be.
43  // Currently this is only checked for top-level declarations.
44  std::function<bool(const Decl *)> ShouldTraverseDecl;
45 };
46 
47 } // namespace index
48 } // namespace clang
49 
50 #endif // LLVM_CLANG_INDEX_INDEXINGOPTIONS_H
clang::index::IndexingOptions::IndexMacros
bool IndexMacros
Definition: IndexingOptions.h:31
clang::index::IndexingOptions::IndexMacrosInPreprocessor
bool IndexMacrosInPreprocessor
Definition: IndexingOptions.h:35
clang::index::IndexingOptions::IndexParametersInDeclarations
bool IndexParametersInDeclarations
Definition: IndexingOptions.h:37
clang::index::IndexingOptions::SystemSymbolFilterKind::DeclarationsOnly
@ DeclarationsOnly
clang::CodeGen::AlignmentSource::Decl
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
FrontendOptions.h
clang::index::IndexingOptions::IndexTemplateParameters
bool IndexTemplateParameters
Definition: IndexingOptions.h:38
clang::index::IndexingOptions::SystemSymbolFilterKind::All
@ All
bool
#define bool
Definition: stdbool.h:15
clang::index::IndexingOptions::IndexFunctionLocals
bool IndexFunctionLocals
Definition: IndexingOptions.h:29
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::index::IndexingOptions::SystemSymbolFilterKind::None
@ None
clang::index::IndexingOptions::ShouldTraverseDecl
std::function< bool(const Decl *)> ShouldTraverseDecl
Definition: IndexingOptions.h:44
clang::index::IndexingOptions::SystemSymbolFilter
SystemSymbolFilterKind SystemSymbolFilter
Definition: IndexingOptions.h:27
clang::index::IndexingOptions
Definition: IndexingOptions.h:20
clang::index::IndexingOptions::IndexImplicitInstantiation
bool IndexImplicitInstantiation
Definition: IndexingOptions.h:30
clang
Definition: CalledOnceCheck.h:17
clang::index::IndexingOptions::SystemSymbolFilterKind
SystemSymbolFilterKind
Definition: IndexingOptions.h:21