Lines Matching refs:Style

41   LevelIndentTracker(const FormatStyle &Style,  in LevelIndentTracker()  argument
44 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) { in LevelIndentTracker()
46 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); in LevelIndentTracker()
61 Indent = Line.Level * Style.IndentWidth + AdditionalIndent; in nextLine()
97 if (Style.Language == FormatStyle::LK_Java || in getIndentOffset()
98 Style.Language == FormatStyle::LK_JavaScript) in getIndentOffset()
104 return Style.AccessModifierOffset; in getIndentOffset()
118 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth; in getIndent()
121 const FormatStyle &Style; member in clang::format::__anon847ac5d30111::LevelIndentTracker
156 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner() argument
158 : Style(Style), Keywords(Keywords), End(Lines.end()), Next(Lines.begin()), in LineJoiner()
169 if (MergedLines > 0 && Style.ColumnLimit == 0) in getNextMergedLine()
203 if (Style.ColumnLimit > 0 && Indent > Style.ColumnLimit) in tryFitMultipleLinesInOne()
207 Style.ColumnLimit == 0 ? UINT_MAX : Style.ColumnLimit - Indent; in tryFitMultipleLinesInOne()
216 !Style.BraceWrapping.SplitEmptyFunction && in tryFitMultipleLinesInOne()
230 return !Style.BraceWrapping.SplitEmptyNamespace && EmptyBlock in tryFitMultipleLinesInOne()
238 return !Style.BraceWrapping.SplitEmptyRecord && EmptyBlock in tryFitMultipleLinesInOne()
246 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All || in tryFitMultipleLinesInOne()
247 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
249 (Style.AllowShortFunctionsOnASingleLine & FormatStyle::SFS_InlineOnly && in tryFitMultipleLinesInOne()
252 if (Style.CompactNamespaces) { in tryFitMultipleLinesInOne()
292 return Style.AllowShortBlocksOnASingleLine in tryFitMultipleLinesInOne()
299 return Style.BraceWrapping.AfterControlStatement in tryFitMultipleLinesInOne()
309 if (Style.AllowShortBlocksOnASingleLine) { in tryFitMultipleLinesInOne()
332 return !Style.BraceWrapping.AfterFunction || in tryFitMultipleLinesInOne()
334 !Style.BraceWrapping.SplitEmptyRecord) in tryFitMultipleLinesInOne()
340 Style.BraceWrapping.AfterFunction) { in tryFitMultipleLinesInOne()
345 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(TheLine))) in tryFitMultipleLinesInOne()
351 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
363 return Style.AllowShortIfStatementsOnASingleLine in tryFitMultipleLinesInOne()
368 return Style.AllowShortLoopsOnASingleLine in tryFitMultipleLinesInOne()
373 return Style.AllowShortCaseLabelsOnASingleLine in tryFitMultipleLinesInOne()
402 if (Style.BraceWrapping.AfterControlStatement && in tryMergeSimpleControlStatement()
403 (I[1]->First->is(tok::l_brace) && !Style.AllowShortBlocksOnASingleLine)) in tryMergeSimpleControlStatement()
483 if (Style.Language != FormatStyle::LK_Java && in tryMergeSimpleBlock()
501 if (!Style.AllowShortBlocksOnASingleLine) in tryMergeSimpleBlock()
505 if (!Style.AllowShortIfStatementsOnASingleLine && in tryMergeSimpleBlock()
507 !Style.BraceWrapping.AfterControlStatement && in tryMergeSimpleBlock()
510 if (!Style.AllowShortIfStatementsOnASingleLine && in tryMergeSimpleBlock()
512 Style.BraceWrapping.AfterControlStatement && I + 2 != E && in tryMergeSimpleBlock()
515 if (!Style.AllowShortLoopsOnASingleLine && in tryMergeSimpleBlock()
517 !Style.BraceWrapping.AfterControlStatement && in tryMergeSimpleBlock()
520 if (!Style.AllowShortLoopsOnASingleLine && in tryMergeSimpleBlock()
522 Style.BraceWrapping.AfterControlStatement && I + 2 != E && in tryMergeSimpleBlock()
593 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(*I))) in tryMergeSimpleBlock()
597 if (Style.AllowShortBlocksOnASingleLine || in tryMergeSimpleBlock()
654 const FormatStyle &Style; member in clang::format::__anon847ac5d30111::LineJoiner
685 const FormatStyle &Style, in LineFormatter() argument
687 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), in LineFormatter()
732 Previous.Children[0]->Level * Style.IndentWidth; in formatChildren()
758 if (Style.ColumnLimit > 0 && in formatChildren()
759 Child->Last->TotalLength + State.Column + 2 > Style.ColumnLimit) in formatChildren()
778 const FormatStyle &Style; member in clang::format::__anon847ac5d30111::LineFormatter
787 const FormatStyle &Style, in NoColumnLimitLineFormatter() argument
789 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in NoColumnLimitLineFormatter()
814 WhitespaceManager *Whitespaces, const FormatStyle &Style, in NoLineBreakFormatter() argument
816 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in NoLineBreakFormatter()
838 const FormatStyle &Style, in OptimizingLineFormatter() argument
840 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in OptimizingLineFormatter()
1019 LineJoiner Joiner(Style, Keywords, Lines); in format()
1030 LevelIndentTracker IndentTracker(Style, Keywords, Lines[0]->Level, in format()
1079 (Style.Language != FormatStyle::LK_JavaScript || in format()
1080 !Style.JavaScriptWrapImports)); in format()
1081 if (Style.ColumnLimit == 0) in format()
1082 NoColumnLimitLineFormatter(Indenter, Whitespaces, Style, this) in format()
1086 Penalty += NoLineBreakFormatter(Indenter, Whitespaces, Style, this) in format()
1090 Penalty += OptimizingLineFormatter(Indenter, Whitespaces, Style, this) in format()
1149 std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1); in formatFirstToken()
1166 if (!Style.KeepEmptyLinesAtTheStartOfBlocks && PreviousLine && in formatFirstToken()
1208 return Style.ColumnLimit - (ContinuesPPDirective ? 2 : 0); in getColumnLimit()