clang-tools 8.0.0

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