9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H 14 #include "clang/Index/IndexSymbol.h" 15 #include "llvm/ADT/iterator_range.h" 31 return std::tie(Subject, Predicate, Object) ==
36 return std::tie(Subject, Predicate, Object) <
92 template <>
struct DenseMapInfo<
clang::index::SymbolRole> {
95 return clang::index::SymbolRole::Declaration;
100 return clang::index::SymbolRole::Definition;
107 static bool isEqual(
const clang::index::SymbolRole &LHS,
108 const clang::index::SymbolRole &RHS) {
115 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H
bool operator==(const Relation &Other) const
Some operations such as code completion produce a set of candidates.
Represents a relation between two symbols.
std::vector< value_type >::const_iterator const_iterator
const_iterator end() const
static bool isEqual(const clang::index::SymbolRole &LHS, const clang::index::SymbolRole &RHS)
static clang::index::SymbolRole getEmptyKey()
std::vector< std::string > lookup(const SymbolIndex &I, llvm::ArrayRef< SymbolID > IDs)
index::SymbolRole Predicate
bool operator<(const Relation &Other) const
const_iterator begin() const
void insert(const Relation &R)
Adds a relation to the slab.
static unsigned getHashValue(const clang::index::SymbolRole &Key)
RelationSlab::Builder is a mutable container that can 'freeze' to RelationSlab.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
static clang::index::SymbolRole getTombstoneKey()
llvm::hash_code hash_value(const SymbolID &ID)