Lines Matching refs:Style

40   LevelIndentTracker(const FormatStyle &Style,  in LevelIndentTracker()  argument
43 : Style(Style), Keywords(Keywords), AdditionalIndent(AdditionalIndent) { in LevelIndentTracker()
45 IndentForLevel.push_back(Style.IndentWidth * i + AdditionalIndent); in LevelIndentTracker()
61 (Style.PPIndentWidth >= 0) ? Style.PPIndentWidth : Style.IndentWidth; in nextLine()
70 Indent = Line.Level * Style.IndentWidth + Style.ContinuationIndentWidth; in nextLine()
100 if (Style.Language == FormatStyle::LK_Java || in getIndentOffset()
101 Style.Language == FormatStyle::LK_JavaScript || Style.isCSharp()) in getIndentOffset()
110 return Style.IndentAccessModifiers ? -Style.IndentWidth in getIndentOffset()
111 : Style.AccessModifierOffset; in getIndentOffset()
126 return getIndent(IndentForLevel, Level - 1) + Style.IndentWidth; in getIndent()
129 const FormatStyle &Style; member in clang::format::__anonb93c45f80111::LevelIndentTracker
173 LineJoiner(const FormatStyle &Style, const AdditionalKeywords &Keywords, in LineJoiner() argument
175 : Style(Style), Keywords(Keywords), End(Lines.end()), Next(Lines.begin()), in LineJoiner()
186 if (MergedLines > 0 && Style.ColumnLimit == 0) in getNextMergedLine()
220 if (Style.ColumnLimit > 0 && Indent > Style.ColumnLimit) in tryFitMultipleLinesInOne()
224 Style.ColumnLimit == 0 ? UINT_MAX : Style.ColumnLimit - Indent; in tryFitMultipleLinesInOne()
233 !Style.BraceWrapping.SplitEmptyFunction && in tryFitMultipleLinesInOne()
247 return !Style.BraceWrapping.SplitEmptyNamespace && EmptyBlock in tryFitMultipleLinesInOne()
255 return !Style.BraceWrapping.SplitEmptyRecord && EmptyBlock in tryFitMultipleLinesInOne()
260 Style.BraceWrapping.SplitEmptyRecord && EmptyBlock) { in tryFitMultipleLinesInOne()
268 Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All || in tryFitMultipleLinesInOne()
269 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
271 (Style.AllowShortFunctionsOnASingleLine & FormatStyle::SFS_InlineOnly && in tryFitMultipleLinesInOne()
274 if (Style.CompactNamespaces) { in tryFitMultipleLinesInOne()
317 return Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never in tryFitMultipleLinesInOne()
328 Style.BraceWrapping.AfterControlStatement == in tryFitMultipleLinesInOne()
333 return (Style.ColumnLimit == 0 || in tryFitMultipleLinesInOne()
334 TheLine->Last->TotalLength <= Style.ColumnLimit) in tryFitMultipleLinesInOne()
340 return (Style.BraceWrapping.AfterControlStatement == in tryFitMultipleLinesInOne()
346 Style.BraceWrapping.AfterControlStatement == in tryFitMultipleLinesInOne()
353 return (Style.ColumnLimit == 0 || in tryFitMultipleLinesInOne()
354 TheLine->Last->TotalLength <= Style.ColumnLimit) in tryFitMultipleLinesInOne()
373 if (Style.BraceWrapping.SplitEmptyRecord && in tryFitMultipleLinesInOne()
396 return !Style.BraceWrapping.AfterFunction || in tryFitMultipleLinesInOne()
398 !Style.BraceWrapping.SplitEmptyRecord) in tryFitMultipleLinesInOne()
404 Style.BraceWrapping.AfterFunction) { in tryFitMultipleLinesInOne()
409 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(TheLine))) in tryFitMultipleLinesInOne()
415 (Style.AllowShortFunctionsOnASingleLine >= FormatStyle::SFS_Empty && in tryFitMultipleLinesInOne()
435 (IsElseLine() && (Style.AllowShortIfStatementsOnASingleLine == in tryFitMultipleLinesInOne()
437 return Style.AllowShortIfStatementsOnASingleLine in tryFitMultipleLinesInOne()
442 return Style.AllowShortLoopsOnASingleLine in tryFitMultipleLinesInOne()
447 return Style.AllowShortCaseLabelsOnASingleLine in tryFitMultipleLinesInOne()
476 if (Style.BraceWrapping.AfterControlStatement == in tryMergeSimpleControlStatement()
479 Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never) in tryMergeSimpleControlStatement()
498 if (Style.AllowShortIfStatementsOnASingleLine == in tryMergeSimpleControlStatement()
566 if (Style.Language != FormatStyle::LK_Java && in tryMergeSimpleBlock()
584 if (Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never) in tryMergeSimpleBlock()
588 if (!Style.AllowShortIfStatementsOnASingleLine && in tryMergeSimpleBlock()
590 !Style.BraceWrapping.AfterControlStatement && in tryMergeSimpleBlock()
593 if (!Style.AllowShortIfStatementsOnASingleLine && in tryMergeSimpleBlock()
595 Style.BraceWrapping.AfterControlStatement == in tryMergeSimpleBlock()
599 if (!Style.AllowShortLoopsOnASingleLine && in tryMergeSimpleBlock()
601 !Style.BraceWrapping.AfterControlStatement && in tryMergeSimpleBlock()
604 if (!Style.AllowShortLoopsOnASingleLine && in tryMergeSimpleBlock()
606 Style.BraceWrapping.AfterControlStatement == in tryMergeSimpleBlock()
626 Tok->SpacesRequiredBefore = Style.SpaceInEmptyBlock ? 1 : 0; in tryMergeSimpleBlock()
679 Style.BraceWrapping.AfterControlStatement == in tryMergeSimpleBlock()
690 if (Limit <= 2 || (Style.ColumnLimit == 0 && containsMustBreak(*I))) in tryMergeSimpleBlock()
694 if (Style.AllowShortBlocksOnASingleLine != FormatStyle::SBS_Never || in tryMergeSimpleBlock()
751 const FormatStyle &Style; member in clang::format::__anonb93c45f80111::LineJoiner
782 const FormatStyle &Style, in LineFormatter() argument
784 : Indenter(Indenter), Whitespaces(Whitespaces), Style(Style), in LineFormatter()
829 P.Indent - Previous.Children[0]->Level * Style.IndentWidth; in formatChildren()
831 if (Style.LambdaBodyIndentation == FormatStyle::LBI_OuterScope && in formatChildren()
865 if (Style.ColumnLimit > 0 && in formatChildren()
866 Child->Last->TotalLength + State.Column + 2 > Style.ColumnLimit) in formatChildren()
886 const FormatStyle &Style; member in clang::format::__anonb93c45f80111::LineFormatter
895 const FormatStyle &Style, in NoColumnLimitLineFormatter() argument
897 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in NoColumnLimitLineFormatter()
922 WhitespaceManager *Whitespaces, const FormatStyle &Style, in NoLineBreakFormatter() argument
924 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in NoLineBreakFormatter()
946 const FormatStyle &Style, in OptimizingLineFormatter() argument
948 : LineFormatter(Indenter, Whitespaces, Style, BlockFormatter) {} in OptimizingLineFormatter()
1124 LineJoiner Joiner(Style, Keywords, Lines); in format()
1135 LevelIndentTracker IndentTracker(Style, Keywords, Lines[0]->Level, in format()
1185 (Style.Language != FormatStyle::LK_JavaScript || in format()
1186 !Style.JavaScriptWrapImports)) || in format()
1187 (Style.isCSharp() && in format()
1189 if (Style.ColumnLimit == 0) in format()
1190 NoColumnLimitLineFormatter(Indenter, Whitespaces, Style, this) in format()
1194 Penalty += NoLineBreakFormatter(Indenter, Whitespaces, Style, this) in format()
1198 Penalty += OptimizingLineFormatter(Indenter, Whitespaces, Style, this) in format()
1259 std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1); in formatFirstToken()
1276 if (!Style.KeepEmptyLinesAtTheStartOfBlocks && PreviousLine && in formatFirstToken()
1286 switch (Style.EmptyLineBeforeAccessModifier) { in formatFirstToken()
1318 switch (Style.EmptyLineAfterAccessModifier) { in formatFirstToken()
1339 if (Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash && in formatFirstToken()
1364 return Style.ColumnLimit - (ContinuesPPDirective ? 2 : 0); in getColumnLimit()