llvm/clang-tools-extra/clangd/unittests/TestIndex.cpp

//===-- TestIndex.cpp -------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "TestIndex.h"
#include "clang/Index/IndexSymbol.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Regex.h"

namespace clang {
namespace clangd {

Symbol symbol(llvm::StringRef QName) {}

static std::string replace(llvm::StringRef Haystack, llvm::StringRef Needle,
                           llvm::StringRef Repl) {}

// Helpers to produce fake index symbols for memIndex() or completions().
// USRFormat is a regex replacement string for the unqualified part of the USR.
Symbol sym(llvm::StringRef QName, index::SymbolKind Kind,
           llvm::StringRef USRFormat, llvm::StringRef Signature) {}

Symbol func(llvm::StringRef Name) {}

Symbol cls(llvm::StringRef Name) {}

Symbol enm(llvm::StringRef Name) {}

Symbol enmConstant(llvm::StringRef Name) {}

Symbol var(llvm::StringRef Name) {}

Symbol ns(llvm::StringRef Name) {}

Symbol conceptSym(llvm::StringRef Name) {}

Symbol macro(llvm::StringRef Name, llvm::StringRef ArgList) {}

Symbol objcSym(llvm::StringRef Name, index::SymbolKind Kind,
               llvm::StringRef USRPrefix) {}

Symbol objcClass(llvm::StringRef Name) {}

Symbol objcCategory(llvm::StringRef Name, llvm::StringRef CategoryName) {}

Symbol objcProtocol(llvm::StringRef Name) {}

SymbolSlab generateSymbols(std::vector<std::string> QualifiedNames) {}

SymbolSlab generateNumSymbols(int Begin, int End) {}

std::string getQualifiedName(const Symbol &Sym) {}

std::vector<std::string> match(const SymbolIndex &I,
                               const FuzzyFindRequest &Req, bool *Incomplete) {}

// Returns qualified names of symbols with any of IDs in the index.
std::vector<std::string> lookup(const SymbolIndex &I,
                                llvm::ArrayRef<SymbolID> IDs) {}

} // namespace clangd
} // namespace clang