#include "clang/AST/RawCommentList.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Comment.h"
#include "clang/AST/CommentBriefParser.h"
#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/CommentLexer.h"
#include "clang/AST/CommentParser.h"
#include "clang/AST/CommentSema.h"
#include "clang/Basic/CharInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Allocator.h"
usingnamespaceclang;
namespace {
std::pair<RawComment::CommentKind, bool> getCommentKind(StringRef Comment,
bool ParseAllComments) { … }
bool mergedCommentIsTrailingComment(StringRef Comment) { … }
bool commentsStartOnSameColumn(const SourceManager &SM, const RawComment &R1,
const RawComment &R2) { … }
}
static bool onlyWhitespaceOnLineBefore(const char *Buffer, unsigned P) { … }
static bool isOrdinaryKind(RawComment::CommentKind K) { … }
RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR,
const CommentOptions &CommentOpts, bool Merged) : … { … }
StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { … }
const char *RawComment::extractBriefText(const ASTContext &Context) const { … }
comments::FullComment *RawComment::parse(const ASTContext &Context,
const Preprocessor *PP,
const Decl *D) const { … }
static bool onlyWhitespaceBetween(SourceManager &SM,
SourceLocation Loc1, SourceLocation Loc2,
unsigned MaxNewlinesAllowed) { … }
void RawCommentList::addComment(const RawComment &RC,
const CommentOptions &CommentOpts,
llvm::BumpPtrAllocator &Allocator) { … }
const std::map<unsigned, RawComment *> *
RawCommentList::getCommentsInFile(FileID File) const { … }
bool RawCommentList::empty() const { … }
unsigned RawCommentList::getCommentBeginLine(RawComment *C, FileID File,
unsigned Offset) const { … }
unsigned RawCommentList::getCommentEndOffset(RawComment *C) const { … }
std::string RawComment::getFormattedText(const SourceManager &SourceMgr,
DiagnosticsEngine &Diags) const { … }
std::vector<RawComment::CommentLine>
RawComment::getFormattedLines(const SourceManager &SourceMgr,
DiagnosticsEngine &Diags) const { … }