Lines Matching defs:Format
1 //===--- FormatToken.cpp - Format C++ code --------------------------------===//
112 const ColumnFormat *Format = getColumnFormat(RemainingCodePoints);
117 if (!Format)
120 // Format the entire list.
131 ExtraSpaces += Format->ColumnSizes[Column] - ItemLengths[Item];
137 if (Column == Format->Columns || State.NextToken->MustBreakBefore) {
263 ColumnFormat Format;
264 Format.Columns = Columns;
265 Format.ColumnSizes.resize(Columns);
267 Format.LineCount = 1;
273 ++Format.LineCount;
280 Format.ColumnSizes[Column] = std::max(Format.ColumnSizes[Column], Length);
288 Format.TotalWidth = Columns - 1; // Width of the N-1 spaces.
291 Format.TotalWidth += Format.ColumnSizes[i];
293 // Don't use this Format, if the difference between the longest and shortest
297 if (Format.ColumnSizes[i] - MinSizeInColumn[i] > 10)
305 if (Format.TotalWidth > Style.ColumnLimit && Columns > 1)
308 Formats.push_back(Format);
315 for (const ColumnFormat &Format : llvm::reverse(Formats)) {
316 if (Format.TotalWidth <= RemainingCharacters || Format.Columns == 1) {
317 if (BestFormat && Format.LineCount > BestFormat->LineCount)
319 BestFormat = &Format;