brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · ca04d50 Raw
38 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H10#define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H11 12#include "find-all-symbols/SymbolInfo.h"13#include "llvm/ADT/StringRef.h"14#include <vector>15 16namespace clang {17namespace include_fixer {18 19/// This class provides an interface for finding all `SymbolInfo`s corresponding20/// to a symbol name from a symbol database.21class SymbolIndex {22public: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 (or29  // fix the usage)30  virtual std::vector<find_all_symbols::SymbolAndSignals>31  search(llvm::StringRef Identifier) = 0;32};33 34} // namespace include_fixer35} // namespace clang36 37#endif // LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_SYMBOLINDEX_H38