Go to the documentation of this file.
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H
13 #include "llvm/ADT/iterator_range.h"
48 llvm::raw_ostream &
operator<<(llvm::raw_ostream &
OS,
const Relation &R);
62 size_t size()
const {
return Relations.size(); }
63 bool empty()
const {
return Relations.empty(); }
66 return sizeof(*this) +
sizeof(
value_type) * Relations.capacity();
84 std::vector<Relation> Relations;
89 : Relations(std::move(Relations)) {}
91 std::vector<Relation> Relations;
97 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H
RelationSlab & operator=(RelationSlab &&RHS)=default
const_iterator begin() const
std::vector< value_type >::const_iterator const_iterator
void insert(const Relation &R)
Adds a relation to the slab.
Represents a relation between two symbols.
RelationSlab::Builder is a mutable container that can 'freeze' to RelationSlab.
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const CodeCompletion &C)
bool operator==(const Relation &Other) const
const_iterator end() const
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
llvm::raw_string_ostream OS
bool operator<(const Relation &Other) const
RelationSlab build() &&
Consumes the builder to finalize the slab.
llvm::iterator_range< iterator > lookup(const SymbolID &Subject, RelationKind Predicate) const
Lookup all relations matching the given subject and predicate.