1 //===--- IndexingOptions.h - Options for indexing ---------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_INDEX_INDEXINGOPTIONS_H
10 #define LLVM_CLANG_INDEX_INDEXINGOPTIONS_H
12 #include "clang/Frontend/FrontendOptions.h"
20 struct IndexingOptions {
21 enum class SystemSymbolFilterKind {
27 SystemSymbolFilterKind SystemSymbolFilter =
28 SystemSymbolFilterKind::DeclarationsOnly;
29 bool IndexFunctionLocals = false;
30 bool IndexImplicitInstantiation = false;
31 // Whether to index macro definitions in the Preprocesor when preprocessor
32 // callback is not available (e.g. after parsing has finished). Note that
33 // macro references are not available in Proprocessor.
34 bool IndexMacrosInPreprocessor = false;
35 // Has no effect if IndexFunctionLocals are false.
36 bool IndexParametersInDeclarations = false;
37 bool IndexTemplateParameters = false;
39 // If set, skip indexing inside some declarations for performance.
40 // This prevents traversal, so skipping a struct means its declaration an
41 // members won't be indexed, but references elsewhere to that struct will be.
42 // Currently this is only checked for top-level declarations.
43 std::function<bool(const Decl *)> ShouldTraverseDecl;
49 #endif // LLVM_CLANG_INDEX_INDEXINGOPTIONS_H