llvm/clang-tools-extra/clangd/index/Relation.h

//===--- Relation.h ----------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H

#include "index/SymbolID.h"
#include "llvm/ADT/iterator_range.h"
#include <cstdint>
#include <utility>

namespace clang {
namespace clangd {

enum class RelationKind : uint8_t {};

/// Represents a relation between two symbols.
/// For an example:
///   - "A is a base class of B" is represented as
///     { Subject = A, Predicate = BaseOf, Object = B }.
///   - "Derived::Foo overrides Base::Foo" is represented as
///     { Subject = Base::Foo, Predicate = OverriddenBy, Object = Derived::Foo
///     }.
struct Relation {};
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const RelationKind R);
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Relation &R);

class RelationSlab {};

} // namespace clangd
} // namespace clang

#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_RELATION_H