Lines Matching refs:LineIndex

137     unsigned LineIndex, unsigned Offset, StringRef::size_type Length) const {
163 BreakableStringLiteral::getSplit(unsigned LineIndex, unsigned TailOffset,
170 void BreakableStringLiteral::insertBreak(unsigned LineIndex,
219 BreakableLineComment::getSplit(unsigned LineIndex, unsigned TailOffset,
225 void BreakableLineComment::insertBreak(unsigned LineIndex, unsigned TailOffset,
233 void BreakableLineComment::replaceWhitespace(unsigned LineIndex,
243 unsigned LineIndex, WhitespaceManager &Whitespaces) {
326 void BreakableBlockComment::adjustWhitespace(unsigned LineIndex,
333 size_t EndOfPreviousLine = Lines[LineIndex - 1].size();
334 if (InPPDirective && Lines[LineIndex - 1].endswith("\\"))
339 Lines[LineIndex - 1].find_last_not_of(Blanks, EndOfPreviousLine);
345 size_t StartOfLine = Lines[LineIndex].find_first_not_of(Blanks);
347 StartOfLine = Lines[LineIndex].rtrim("\r\n").size();
349 StringRef Whitespace = Lines[LineIndex].substr(0, StartOfLine);
351 Lines[LineIndex - 1] = Lines[LineIndex - 1].substr(0, EndOfPreviousLine);
352 Lines[LineIndex] = Lines[LineIndex].substr(StartOfLine);
355 LeadingWhitespace[LineIndex] =
356 Lines[LineIndex].begin() - Lines[LineIndex - 1].end();
359 StartOfLineColumn[LineIndex] =
367 unsigned LineIndex, unsigned Offset, StringRef::size_type Length) const {
368 unsigned ContentStartColumn = getContentStartColumn(LineIndex, Offset);
370 encoding::columnWidthWithTabs(Lines[LineIndex].substr(Offset, Length),
374 (LineIndex + 1 == Lines.size() ? 2 : 0);
378 BreakableBlockComment::getSplit(unsigned LineIndex, unsigned TailOffset,
380 return getCommentSplit(Lines[LineIndex].substr(TailOffset),
381 getContentStartColumn(LineIndex, TailOffset),
385 void BreakableBlockComment::insertBreak(unsigned LineIndex, unsigned TailOffset,
388 StringRef Text = Lines[LineIndex].substr(TailOffset);
390 if (LineIndex + 1 == Lines.size() &&
405 void BreakableBlockComment::replaceWhitespace(unsigned LineIndex,
408 StringRef Text = Lines[LineIndex].substr(TailOffset);
418 unsigned LineIndex, WhitespaceManager &Whitespaces) {
419 if (LineIndex == 0)
422 if (Lines[LineIndex].empty()) {
423 if (LineIndex + 1 == Lines.size()) {
435 if (StartOfLineColumn[LineIndex] == 1) {
441 unsigned WhitespaceOffsetInToken = Lines[LineIndex].data() -
443 LeadingWhitespace[LineIndex];
445 Tok, WhitespaceOffsetInToken, LeadingWhitespace[LineIndex], "", Prefix,
447 StartOfLineColumn[LineIndex] - Prefix.size());
451 BreakableBlockComment::getContentStartColumn(unsigned LineIndex,
456 return std::max(0, StartOfLineColumn[LineIndex]);