Lines Matching refs:TheLine

42     const AnnotatedLine *TheLine = *I;  in tryFitMultipleLinesInOne()  local
43 if (TheLine->Last->is(TT_LineComment)) in tryFitMultipleLinesInOne()
47 if (TheLine->InPPDirective && in tryFitMultipleLinesInOne()
58 Limit = TheLine->Last->TotalLength > Limit in tryFitMultipleLinesInOne()
60 : Limit - TheLine->Last->TotalLength; in tryFitMultipleLinesInOne()
69 TheLine->Level != 0); in tryFitMultipleLinesInOne()
71 if (TheLine->Last->is(TT_FunctionLBrace) && in tryFitMultipleLinesInOne()
72 TheLine->First != TheLine->Last) { in tryFitMultipleLinesInOne()
75 if (TheLine->Last->is(tok::l_brace)) { in tryFitMultipleLinesInOne()
86 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(TheLine))) in tryFitMultipleLinesInOne()
100 if (TheLine->First->is(tok::kw_if)) { in tryFitMultipleLinesInOne()
105 if (TheLine->First->isOneOf(tok::kw_for, tok::kw_while)) { in tryFitMultipleLinesInOne()
110 if (TheLine->First->isOneOf(tok::kw_case, tok::kw_default)) { in tryFitMultipleLinesInOne()
115 if (TheLine->InPPDirective && in tryFitMultipleLinesInOne()
116 (TheLine->First->HasUnescapedNewline || TheLine->First->IsFirst)) { in tryFitMultipleLinesInOne()
358 const AnnotatedLine &TheLine = **I; in format() local
359 const FormatToken *FirstTok = TheLine.First; in format()
364 if (TheLine.InPPDirective) { in format()
365 Indent = TheLine.Level * Style.IndentWidth; in format()
367 while (IndentForLevel.size() <= TheLine.Level) in format()
369 IndentForLevel.resize(TheLine.Level + 1); in format()
370 Indent = getIndent(IndentForLevel, TheLine.Level); in format()
395 if (TheLine.First->is(tok::eof)) { in format()
399 Whitespaces->replaceWhitespace(*TheLine.First, Newlines, in format()
403 } else if (TheLine.Type != LT_Invalid && in format()
404 (TheLine.Affected || FixIndentation)) { in format()
407 formatFirstToken(*TheLine.First, PreviousLine, TheLine.Level, Indent, in format()
408 TheLine.InPPDirective); in format()
418 ColumnLimit = getColumnLimit(TheLine.InPPDirective); in format()
421 if (TheLine.Last->TotalLength + Indent <= ColumnLimit || in format()
422 TheLine.Type == LT_ImportStatement) { in format()
423 LineState State = Indenter->getInitialState(Indent, &TheLine, DryRun); in format()
432 Formatter.format(Indent, &TheLine); in format()
434 Penalty += format(TheLine, Indent, DryRun); in format()
437 if (!TheLine.InPPDirective) in format()
438 IndentForLevel[TheLine.Level] = LevelIndent; in format()
439 } else if (TheLine.ChildrenAffected) { in format()
440 format(TheLine.Children, DryRun); in format()
444 for (FormatToken *Tok = TheLine.First; Tok; Tok = Tok->Next) { in format()
445 if (Tok == TheLine.First && (Tok->NewlinesBefore > 0 || Tok->IsFirst)) { in format()
450 TheLine.LeadingEmptyLinesAffected) { in format()
451 formatFirstToken(*Tok, PreviousLine, TheLine.Level, LevelIndent, in format()
452 TheLine.InPPDirective); in format()
454 Whitespaces->addUntouchableToken(*Tok, TheLine.InPPDirective); in format()
460 if (Tok->isNot(tok::comment) && !TheLine.InPPDirective) in format()
461 IndentForLevel[TheLine.Level] = LevelIndent; in format()
463 Whitespaces->addUntouchableToken(*Tok, TheLine.InPPDirective); in format()
468 markFinalized(TheLine.First); in format()