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"
48llvm::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;
llvm::raw_string_ostream OS
RelationSlab::Builder is a mutable container that can 'freeze' to RelationSlab.
void insert(const Relation &R)
Adds a relation to the slab.
RelationSlab build() &&
Consumes the builder to finalize the slab.
RelationSlab & operator=(RelationSlab &&RHS)=default
const_iterator begin() const
std::vector< value_type >::const_iterator const_iterator
RelationSlab(RelationSlab &&Slab)=default
const_iterator end() const
llvm::iterator_range< iterator > lookup(const SymbolID &Subject, RelationKind Predicate) const
Lookup all relations matching the given subject and predicate.
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const CodeCompletion &C)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Represents a relation between two symbols.
bool operator==(const Relation &Other) const
bool operator<(const Relation &Other) const