Home | History | Annotate | Download | only in AST

Lines Matching refs:comments

1 //===--- RawCommentList.cpp - Processing raw comments -----------*- C++ -*-===//
127 comments::Lexer L(Allocator, Context.getDiagnostics(),
131 comments::BriefParser P(L, Context.getCommentCommandTraits());
143 comments::FullComment *RawComment::parse(const ASTContext &Context,
149 comments::Lexer L(Context.getAllocator(), Context.getDiagnostics(),
153 comments::Sema S(Context.getAllocator(), Context.getSourceManager(),
158 comments::Parser P(L, S, Context.getAllocator(), Context.getSourceManager(),
218 // Check if the comments are not in source order.
219 while (!Comments.empty() &&
220 !SourceMgr.isBeforeInTranslationUnit(Comments.back()->getLocStart(),
222 // If they are, just pop a few last comments that don't fit.
223 // This happens if an \#include directive contains comments.
224 Comments.pop_back();
227 // Ordinary comments are not interesting for us.
233 if (Comments.empty()) {
234 Comments.push_back(new (Allocator) RawComment(RC));
238 const RawComment &C1 = *Comments.back();
241 // Merge comments only if there is only whitespace between them.
242 // Can't merge trailing and non-trailing comments.
243 // Merge comments if they are on same or consecutive lines.
248 *Comments.back() = RawComment(SourceMgr, MergedRange, true,
251 Comments.push_back(new (Allocator) RawComment(RC));
257 MergedComments.reserve(Comments.size() + DeserializedComments.size());
259 std::merge(Comments.begin(), Comments.end(),
263 std::swap(Comments, MergedComments);