Lines Matching refs:Format
1 //===--- FormatToken.cpp - Format C++ code --------------------------------===//
18 #include "clang/Format/Format.h"
24 namespace format {
89 // Calculate the number of code points we have to format this list. As the
95 const ColumnFormat *Format = getColumnFormat(RemainingCodePoints);
99 if (!Format)
102 // Format the entire list.
113 ExtraSpaces += Format->ColumnSizes[Column] - ItemLengths[Item];
119 if (Column == Format->Columns || State.NextToken->MustBreakBefore) {
152 // In C++11 braced list style, we should not format in columns unless they
165 // Column format doesn't really make sense if we don't align after brackets.
236 ColumnFormat Format;
237 Format.Columns = Columns;
238 Format.ColumnSizes.resize(Columns);
240 Format.LineCount = 1;
246 ++Format.LineCount;
253 Format.ColumnSizes[Column] = std::max(Format.ColumnSizes[Column], Length);
261 Format.TotalWidth = Columns - 1; // Width of the N-1 spaces.
264 Format.TotalWidth += Format.ColumnSizes[i];
266 // Don't use this Format, if the difference between the longest and shortest
270 if (Format.ColumnSizes[i] - MinSizeInColumn[i] > 10)
277 if (Format.TotalWidth > Style.ColumnLimit)
280 Formats.push_back(Format);
300 } // namespace format