9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H 12 #include "llvm/ADT/DenseMap.h" 13 #include "llvm/ADT/Hashing.h" 14 #include "llvm/ADT/StringRef.h" 15 #include "llvm/Support/Error.h" 16 #include "llvm/Support/raw_ostream.h" 34 explicit SymbolID(llvm::StringRef USR);
37 return HashValue == Sym.HashValue;
40 return HashValue < Sym.HashValue;
46 llvm::StringRef
raw()
const;
50 std::string
str()
const;
51 static llvm::Expected<SymbolID>
fromStr(llvm::StringRef);
54 std::array<uint8_t, RawSize> HashValue;
86 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOLID_H
Some operations such as code completion produce a set of candidates.
static SymbolID fromRaw(llvm::StringRef)
static llvm::Expected< SymbolID > fromStr(llvm::StringRef)
static clang::clangd::SymbolID getEmptyKey()
static constexpr size_t RawSize
static bool isEqual(const clang::clangd::SymbolID &LHS, const clang::clangd::SymbolID &RHS)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
llvm::StringRef raw() const
static clang::clangd::SymbolID getTombstoneKey()
bool operator<(const SymbolID &Sym) const
static unsigned getHashValue(const clang::clangd::SymbolID &Sym)
llvm::hash_code hash_value(const SymbolID &ID)
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const CodeCompletion &C)
std::array< uint8_t, 20 > SymbolID
bool operator==(const SymbolID &Sym) const