Lines Matching refs:LineIndex
141 unsigned LineIndex, unsigned Offset, StringRef::size_type Length) const {
167 BreakableStringLiteral::getSplit(unsigned LineIndex, unsigned TailOffset,
174 void BreakableStringLiteral::insertBreak(unsigned LineIndex,
207 BreakableLineComment::getSplit(unsigned LineIndex, unsigned TailOffset,
213 void BreakableLineComment::insertBreak(unsigned LineIndex, unsigned TailOffset,
221 void BreakableLineComment::replaceWhitespace(unsigned LineIndex,
231 BreakableLineComment::replaceWhitespaceBefore(unsigned LineIndex,
308 void BreakableBlockComment::adjustWhitespace(unsigned LineIndex,
315 size_t EndOfPreviousLine = Lines[LineIndex - 1].size();
316 if (InPPDirective && Lines[LineIndex - 1].endswith("\\"))
321 Lines[LineIndex - 1].find_last_not_of(Blanks, EndOfPreviousLine);
327 size_t StartOfLine = Lines[LineIndex].find_first_not_of(Blanks);
329 StartOfLine = Lines[LineIndex].size();
331 StringRef Whitespace = Lines[LineIndex].substr(0, StartOfLine);
333 Lines[LineIndex - 1] = Lines[LineIndex - 1].substr(0, EndOfPreviousLine);
334 Lines[LineIndex] = Lines[LineIndex].substr(StartOfLine);
337 LeadingWhitespace[LineIndex] =
338 Lines[LineIndex].begin() - Lines[LineIndex - 1].end();
341 StartOfLineColumn[LineIndex] = std::max<int>(
350 unsigned LineIndex, unsigned Offset, StringRef::size_type Length) const {
351 unsigned ContentStartColumn = getContentStartColumn(LineIndex, Offset);
353 encoding::columnWidthWithTabs(Lines[LineIndex].substr(Offset, Length),
357 (LineIndex + 1 == Lines.size() ? 2 : 0);
361 BreakableBlockComment::getSplit(unsigned LineIndex, unsigned TailOffset,
363 return getCommentSplit(Lines[LineIndex].substr(TailOffset),
364 getContentStartColumn(LineIndex, TailOffset),
368 void BreakableBlockComment::insertBreak(unsigned LineIndex, unsigned TailOffset,
371 StringRef Text = Lines[LineIndex].substr(TailOffset);
373 if (LineIndex + 1 == Lines.size() &&
388 void BreakableBlockComment::replaceWhitespace(unsigned LineIndex,
391 StringRef Text = Lines[LineIndex].substr(TailOffset);
401 BreakableBlockComment::replaceWhitespaceBefore(unsigned LineIndex,
403 if (LineIndex == 0)
406 if (Lines[LineIndex].empty()) {
407 if (LineIndex + 1 == Lines.size()) {
419 if (StartOfLineColumn[LineIndex] == 1) {
425 unsigned WhitespaceOffsetInToken = Lines[LineIndex].data() -
427 LeadingWhitespace[LineIndex];
428 assert(StartOfLineColumn[LineIndex] >= Prefix.size());
430 Tok, WhitespaceOffsetInToken, LeadingWhitespace[LineIndex], "", Prefix,
432 StartOfLineColumn[LineIndex] - Prefix.size());
436 BreakableBlockComment::getContentStartColumn(unsigned LineIndex,
441 return StartOfLineColumn[LineIndex];