clang-tools  11.0.0
SymbolIndex.h
Go to the documentation of this file.
1 //===-- SymbolIndex.h - Interface for symbol-header matching ----*- 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_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H
10 #define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H
11 
13 #include "llvm/ADT/StringRef.h"
14 #include <vector>
15 
16 namespace clang {
17 namespace include_fixer {
18 
19 /// This class provides an interface for finding all `SymbolInfo`s corresponding
20 /// to a symbol name from a symbol database.
21 class SymbolIndex {
22 public:
23  virtual ~SymbolIndex() = default;
24 
25  /// Search for all `SymbolInfo`s corresponding to an identifier.
26  /// \param Identifier The unqualified identifier being searched for.
27  /// \returns A list of `SymbolInfo` candidates.
28  // FIXME: Expose the type name so we can also insert using declarations (or
29  // fix the usage)
30  virtual std::vector<find_all_symbols::SymbolAndSignals>
31  search(llvm::StringRef Identifier) = 0;
32 };
33 
34 } // namespace include_fixer
35 } // namespace clang
36 
37 #endif // LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H
clang::include_fixer::SymbolIndex::search
virtual std::vector< find_all_symbols::SymbolAndSignals > search(llvm::StringRef Identifier)=0
Search for all SymbolInfos corresponding to an identifier.
clang::include_fixer::SymbolIndex
This class provides an interface for finding all SymbolInfos corresponding to a symbol name from a sy...
Definition: SymbolIndex.h:21
clang::include_fixer::SymbolIndex::~SymbolIndex
virtual ~SymbolIndex()=default
SymbolInfo.h
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ApplyReplacements.h:27