Lines Matching refs:Style
39 LevelIndentTracker(const FormatStyle &Style, in LevelIndentTracker() argument
42 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) { in LevelIndentTracker()
44 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); in LevelIndentTracker()
59 Indent = Line.Level * Style.IndentWidth + AdditionalIndent; in nextLine()
88 if (Style.Language == FormatStyle::LK_Java || in getIndentOffset()
89 Style.Language == FormatStyle::LK_JavaScript) in getIndentOffset()
95 return Style.AccessModifierOffset; in getIndentOffset()
109 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth; in getIndent()
112 const FormatStyle &Style; member in clang::format::__anon620a99a70111::LevelIndentTracker
131 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner() argument
133 : Style(Style), Keywords(Keywords), End(Lines.end()), in LineJoiner()
145 if (MergedLines > 0 && Style.ColumnLimit == 0) in getNextMergedLine()
177 if (Style.ColumnLimit > 0 && Indent > Style.ColumnLimit) in tryFitMultipleLinesInOne()
181 Style.ColumnLimit == 0 ? UINT_MAX : Style.ColumnLimit - Indent; in tryFitMultipleLinesInOne()
191 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All || in tryFitMultipleLinesInOne()
192 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
194 (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline && in tryFitMultipleLinesInOne()
202 return !Style.BraceWrapping.AfterFunction in tryFitMultipleLinesInOne()
207 Style.BraceWrapping.AfterFunction) { in tryFitMultipleLinesInOne()
212 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(TheLine))) in tryFitMultipleLinesInOne()
227 return Style.AllowShortIfStatementsOnASingleLine in tryFitMultipleLinesInOne()
232 return Style.AllowShortLoopsOnASingleLine in tryFitMultipleLinesInOne()
237 return Style.AllowShortCaseLabelsOnASingleLine in tryFitMultipleLinesInOne()
266 if (Style.BraceWrapping.AfterControlStatement && in tryMergeSimpleControlStatement()
267 (I[1]->First->is(tok::l_brace) && !Style.AllowShortBlocksOnASingleLine)) in tryMergeSimpleControlStatement()
326 if (Style.Language != FormatStyle::LK_Java && in tryMergeSimpleBlock()
338 if (!Style.AllowShortBlocksOnASingleLine) in tryMergeSimpleBlock()
340 if (!Style.AllowShortIfStatementsOnASingleLine && in tryMergeSimpleBlock()
343 if (!Style.AllowShortLoopsOnASingleLine && in tryMergeSimpleBlock()
446 const FormatStyle &Style; member in clang::format::__anon620a99a70111::LineJoiner
476 const FormatStyle &Style, in LineFormatter() argument
478 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), in LineFormatter()
521 Previous.Children[0]->Level * Style.IndentWidth; in formatChildren()
546 if (Style.ColumnLimit > 0 && in formatChildren()
548 Style.ColumnLimit) in formatChildren()
567 const FormatStyle &Style; member in clang::format::__anon620a99a70111::LineFormatter
576 const FormatStyle &Style, in NoColumnLimitLineFormatter() argument
578 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in NoColumnLimitLineFormatter()
603 WhitespaceManager *Whitespaces, const FormatStyle &Style, in NoLineBreakFormatter() argument
605 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in NoLineBreakFormatter()
625 const FormatStyle &Style, in OptimizingLineFormatter() argument
627 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in OptimizingLineFormatter()
800 LineJoiner Joiner(Style, Keywords, Lines); in format()
811 LevelIndentTracker IndentTracker(Style, Keywords, Lines[0]->Level, in format()
852 if (Style.ColumnLimit == 0) in format()
853 NoColumnLimitLineFormatter(Indenter, Whitespaces, Style, this) in format()
856 Penalty += NoLineBreakFormatter(Indenter, Whitespaces, Style, this) in format()
859 Penalty += OptimizingLineFormatter(Indenter, Whitespaces, Style, this) in format()
914 std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1); in formatFirstToken()
926 if (!Style.KeepEmptyLinesAtTheStartOfBlocks && PreviousLine && in formatFirstToken()
961 return Style.ColumnLimit - (ContinuesPPDirective ? 2 : 0); in getColumnLimit()