llvm/clang/lib/Index/CommentToXML.cpp

//===--- CommentToXML.cpp - Convert comments to XML representation --------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "clang/Index/CommentToXML.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Comment.h"
#include "clang/AST/CommentVisitor.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Format/Format.h"
#include "clang/Index/USRGeneration.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/Support/raw_ostream.h"

usingnamespaceclang;
usingnamespaceclang::comments;
usingnamespaceclang::index;

namespace {

/// This comparison will sort parameters with valid index by index, then vararg
/// parameters, and invalid (unresolved) parameters last.
class ParamCommandCommentCompareIndex {};

/// This comparison will sort template parameters in the following order:
/// \li real template parameters (depth = 1) in index order;
/// \li all other names (depth > 1);
/// \li unresolved names.
class TParamCommandCommentComparePosition {};

/// Separate parts of a FullComment.
struct FullCommentParts {};

FullCommentParts::FullCommentParts(const FullComment *C,
                                   const CommandTraits &Traits) :{}

void printHTMLStartTagComment(const HTMLStartTagComment *C,
                              llvm::raw_svector_ostream &Result) {}

class CommentASTToHTMLConverter :
    public ConstCommentVisitor<CommentASTToHTMLConverter> {};
} // end unnamed namespace

void CommentASTToHTMLConverter::visitTextComment(const TextComment *C) {}

void CommentASTToHTMLConverter::visitInlineCommandComment(
                                  const InlineCommandComment *C) {}

void CommentASTToHTMLConverter::visitHTMLStartTagComment(
                                  const HTMLStartTagComment *C) {}

void CommentASTToHTMLConverter::visitHTMLEndTagComment(
                                  const HTMLEndTagComment *C) {}

void CommentASTToHTMLConverter::visitParagraphComment(
                                  const ParagraphComment *C) {}

void CommentASTToHTMLConverter::visitBlockCommandComment(
                                  const BlockCommandComment *C) {}

void CommentASTToHTMLConverter::visitParamCommandComment(
                                  const ParamCommandComment *C) {}

void CommentASTToHTMLConverter::visitTParamCommandComment(
                                  const TParamCommandComment *C) {}

void CommentASTToHTMLConverter::visitVerbatimBlockComment(
                                  const VerbatimBlockComment *C) {}

void CommentASTToHTMLConverter::visitVerbatimBlockLineComment(
                                  const VerbatimBlockLineComment *C) {}

void CommentASTToHTMLConverter::visitVerbatimLineComment(
                                  const VerbatimLineComment *C) {}

void CommentASTToHTMLConverter::visitFullComment(const FullComment *C) {}

void CommentASTToHTMLConverter::visitNonStandaloneParagraphComment(
                                  const ParagraphComment *C) {}

void CommentASTToHTMLConverter::appendToResultWithHTMLEscaping(StringRef S) {}

namespace {
class CommentASTToXMLConverter :
    public ConstCommentVisitor<CommentASTToXMLConverter> {};

void getSourceTextOfDeclaration(const DeclInfo *ThisDecl,
                                SmallVectorImpl<char> &Str) {}

void CommentASTToXMLConverter::formatTextOfDeclaration(
    const DeclInfo *DI, SmallString<128> &Declaration) {}

} // end unnamed namespace

void CommentASTToXMLConverter::visitTextComment(const TextComment *C) {}

void CommentASTToXMLConverter::visitInlineCommandComment(
    const InlineCommandComment *C) {}

void CommentASTToXMLConverter::visitHTMLStartTagComment(
    const HTMLStartTagComment *C) {}

void
CommentASTToXMLConverter::visitHTMLEndTagComment(const HTMLEndTagComment *C) {}

void CommentASTToXMLConverter::visitParagraphComment(
    const ParagraphComment *C) {}

void CommentASTToXMLConverter::appendParagraphCommentWithKind(
    const ParagraphComment *C, StringRef ParagraphKind,
    StringRef PrependBodyText) {}

void CommentASTToXMLConverter::visitBlockCommandComment(
    const BlockCommandComment *C) {}

void CommentASTToXMLConverter::visitParamCommandComment(
    const ParamCommandComment *C) {}

void CommentASTToXMLConverter::visitTParamCommandComment(
                                  const TParamCommandComment *C) {}

void CommentASTToXMLConverter::visitVerbatimBlockComment(
                                  const VerbatimBlockComment *C) {}

void CommentASTToXMLConverter::visitVerbatimBlockLineComment(
                                  const VerbatimBlockLineComment *C) {}

void CommentASTToXMLConverter::visitVerbatimLineComment(
                                  const VerbatimLineComment *C) {}

void CommentASTToXMLConverter::visitFullComment(const FullComment *C) {}

void CommentASTToXMLConverter::appendToResultWithXMLEscaping(StringRef S) {}

void CommentASTToXMLConverter::appendToResultWithCDATAEscaping(StringRef S) {}

CommentToXMLConverter::CommentToXMLConverter() {}
CommentToXMLConverter::~CommentToXMLConverter() {}

void CommentToXMLConverter::convertCommentToHTML(const FullComment *FC,
                                                 SmallVectorImpl<char> &HTML,
                                                 const ASTContext &Context) {}

void CommentToXMLConverter::convertHTMLTagNodeToText(
    const comments::HTMLTagComment *HTC, SmallVectorImpl<char> &Text,
    const ASTContext &Context) {}

void CommentToXMLConverter::convertCommentToXML(const FullComment *FC,
                                                SmallVectorImpl<char> &XML,
                                                const ASTContext &Context) {}