Lines Matching full:content
74 << ", Content start: " << ContentStartColumn << "\n"); in getCommentSplit()
222 StringRef Content = Token.TokenText.substr(2).ltrim(); in switchesFormatting() local
223 return Content.starts_with("clang-format on") || in switchesFormatting()
224 Content.starts_with("clang-format off"); in switchesFormatting()
230 // Example: consider the content in getLengthAfterCompression()
423 if (CommentPragmasRegex.match(Content[LineIndex])) in getSplit()
425 return getCommentSplit(Content[LineIndex].substr(TailOffset), in getSplit()
433 StringRef Text = Content[LineIndex].substr(TailOffset); in compressWhitespace()
434 // Text is relative to the content line, but Whitespaces operates relative to in compressWhitespace()
450 static bool mayReflowContent(StringRef Content) { in mayReflowContent() argument
451 Content = Content.trim(Blanks); in mayReflowContent()
457 if (Content.starts_with(Prefix)) { in mayReflowContent()
468 hasSpecialMeaningPrefix || kNumberedListRegexp.match(Content); in mayReflowContent()
470 // Simple heuristic for what to reflow: content should contain at least two in mayReflowContent()
473 return Content.size() >= 2 && !hasSpecialMeaningPrefix && in mayReflowContent()
474 !Content.ends_with("\\") && in mayReflowContent()
475 // Note that this is UTF-8 safe, since if isPunctuation(Content[0]) is in mayReflowContent()
477 (!isPunctuation(Content[0]) || !isPunctuation(Content[1])); in mayReflowContent()
496 Content.resize(Lines.size()); in BreakableBlockComment()
497 Content[0] = Lines[0]; in BreakableBlockComment()
514 if (Lines.size() >= 2 && Content[1].starts_with("**") && in BreakableBlockComment()
528 for (size_t i = 1, e = Content.size(); i < e && !Decoration.empty(); ++i) { in BreakableBlockComment()
529 const StringRef &Text = Content[i]; in BreakableBlockComment()
544 if (Content[i].empty()) { in BreakableBlockComment()
565 unsigned DecorationSize = Decoration.starts_with(Content[i]) in BreakableBlockComment()
566 ? Content[i].size() in BreakableBlockComment()
570 Content[i] = Content[i].substr(DecorationSize); in BreakableBlockComment()
571 if (!Decoration.starts_with(Content[i])) { in BreakableBlockComment()
600 llvm::dbgs() << i << " |" << Content[i] << "| " in BreakableBlockComment()
602 << "IN=" << (Content[i].data() - Lines[i].data()) << "\n"; in BreakableBlockComment()
611 if (CommentPragmasRegex.match(Content[LineIndex])) in getSplit()
613 return getCommentSplit(Content[LineIndex].substr(TailOffset), in getSplit()
644 Content[LineIndex - 1].data() - Lines[LineIndex - 1].data(); in adjustWhitespace()
645 Content[LineIndex - 1] = Lines[LineIndex - 1].substr( in adjustWhitespace()
647 Content[LineIndex] = Lines[LineIndex].substr(StartOfLine); in adjustWhitespace()
660 Content[LineIndex].substr(Offset, Length), StartColumn, Style.TabWidth, in getRangeLength()
673 bool HasRemainingText = Offset < Content[LineIndex].size(); in getRemainingLength()
699 // The content at LineIndex 0 of a comment like: in getContentIndent()
702 StringRef ContentWithNoDecoration = Content[LineIndex]; in getContentIndent()
715 StringRef Text = Content[LineIndex].substr(TailOffset); in insertBreak()
748 // If we're reflowing into a line with content indent, only reflow the next in getReflowSplit()
749 // line if its starting whitespace matches the content indent. in getReflowSplit()
750 size_t Trimmed = Content[LineIndex].find_first_not_of(Blanks); in getReflowSplit()
770 StringRef TrimmedContent = Content[LineIndex].ltrim(Blanks); in reflow()
776 unsigned WhitespaceOffsetInToken = Content[LineIndex - 1].data() + in reflow()
777 Content[LineIndex - 1].size() - in reflow()
808 if (Content[LineIndex].empty()) { in adaptStartOfLine()
826 unsigned WhitespaceOffsetInToken = Content[LineIndex - 1].data() + in adaptStartOfLine()
827 Content[LineIndex - 1].size() - in adaptStartOfLine()
829 unsigned WhitespaceLength = Content[LineIndex].data() - in adaptStartOfLine()
843 StringRef Line = Content.back().substr(TailOffset); in getSplitAfterLastLine()
853 // Content[LineIndex] may exclude the indent after the '*' decoration. In that in mayReflow()
855 StringRef IndentContent = Content[LineIndex]; in mayReflow()
859 mayReflowContent(Content[LineIndex]) && !Tok.Finalized && in mayReflow()
883 Content.resize(Lines.size()); in BreakableLineCommentSection()
971 // If the IndentPrefix is the whole line, there is no content and we in BreakableLineCommentSection()
977 Content[i] = Lines[i].substr(IndentPrefix.size()); in BreakableLineCommentSection()
983 size_t EndOfLine = Content[i].find_last_not_of(Blanks); in BreakableLineCommentSection()
985 EndOfLine = Content[i].size(); in BreakableLineCommentSection()
988 Content[i] = Content[i].substr(0, EndOfLine); in BreakableLineCommentSection()
1016 Content[LineIndex].substr(Offset, Length), StartColumn, Style.TabWidth, in getRangeLength()
1029 StringRef Text = Content[LineIndex].substr(TailOffset); in insertBreak()
1046 size_t Trimmed = Content[LineIndex].find_first_not_of(Blanks); in getReflowSplit()
1051 // line up to where the content starts. in getReflowSplit()
1094 Content[LineIndex].data() - Lines[LineIndex].data(); in reflow()
1116 // content column after a possible update to the prefix, hence the prefix in adaptStartOfLine()
1120 (Content[LineIndex].data() - Lines[LineIndex].data()) + in adaptStartOfLine()
1154 StringRef IndentContent = Content[LineIndex]; in mayReflow()
1164 mayReflowContent(Content[LineIndex]) && !Tok.Finalized && in mayReflow()