llvm/clang-tools-extra/clang-doc/Representation.cpp

///===-- Representation.cpp - ClangDoc Representation -----------*- 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
//
//===----------------------------------------------------------------------===//
//
// This file defines the merging of different types of infos. The data in the
// calling Info is preserved during a merge unless that field is empty or
// default. In that case, the data from the parameter Info is used to replace
// the empty or default data.
//
// For most fields, the first decl seen provides the data. Exceptions to this
// include the location and description fields, which are collections of data on
// all decls related to a given definition. All other fields are ignored in new
// decls unless the first seen decl didn't, for whatever reason, incorporate
// data on that field (e.g. a forward declared class wouldn't have information
// on members on the forward declaration, but would have the class name).
//
//===----------------------------------------------------------------------===//
#include "Representation.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"

namespace clang {
namespace doc {

namespace {

const SymbolID EmptySID =;

template <typename T>
llvm::Expected<std::unique_ptr<Info>>
reduce(std::vector<std::unique_ptr<Info>> &Values) {}

// Return the index of the matching child in the vector, or -1 if merge is not
// necessary.
template <typename T>
int getChildIndexIfExists(std::vector<T> &Children, T &ChildToMerge) {}

template <typename T>
void reduceChildren(std::vector<T> &Children,
                    std::vector<T> &&ChildrenToMerge) {}

} // namespace

// Dispatch function.
llvm::Expected<std::unique_ptr<Info>>
mergeInfos(std::vector<std::unique_ptr<Info>> &Values) {}

bool CommentInfo::operator==(const CommentInfo &Other) const {}

bool CommentInfo::operator<(const CommentInfo &Other) const {}

static llvm::SmallString<64>
calculateRelativeFilePath(const InfoType &Type, const StringRef &Path,
                          const StringRef &Name, const StringRef &CurrentPath) {}

llvm::SmallString<64>
Reference::getRelativeFilePath(const StringRef &CurrentPath) const {}

llvm::SmallString<16> Reference::getFileBaseName() const {}

llvm::SmallString<64>
Info::getRelativeFilePath(const StringRef &CurrentPath) const {}

llvm::SmallString<16> Info::getFileBaseName() const {}

bool Reference::mergeable(const Reference &Other) {}

void Reference::merge(Reference &&Other) {}

void Info::mergeBase(Info &&Other) {}

bool Info::mergeable(const Info &Other) {}

void SymbolInfo::merge(SymbolInfo &&Other) {}

NamespaceInfo::NamespaceInfo(SymbolID USR, StringRef Name, StringRef Path)
    :{}

void NamespaceInfo::merge(NamespaceInfo &&Other) {}

RecordInfo::RecordInfo(SymbolID USR, StringRef Name, StringRef Path)
    :{}

void RecordInfo::merge(RecordInfo &&Other) {}

void EnumInfo::merge(EnumInfo &&Other) {}

void FunctionInfo::merge(FunctionInfo &&Other) {}

void TypedefInfo::merge(TypedefInfo &&Other) {}

BaseRecordInfo::BaseRecordInfo() :{}

BaseRecordInfo::BaseRecordInfo(SymbolID USR, StringRef Name, StringRef Path,
                               bool IsVirtual, AccessSpecifier Access,
                               bool IsParent)
    :{}

llvm::SmallString<16> Info::extractName() const {}

// Order is based on the Name attribute: case insensitive order
bool Index::operator<(const Index &Other) const {}

void Index::sort() {}

ClangDocContext::ClangDocContext(tooling::ExecutionContext *ECtx,
                                 StringRef ProjectName, bool PublicOnly,
                                 StringRef OutDirectory, StringRef SourceRoot,
                                 StringRef RepositoryUrl,
                                 std::vector<std::string> UserStylesheets)
    :{}

void ScopeChildren::sort() {}
} // namespace doc
} // namespace clang