diff options
Diffstat (limited to 'clang/lib/Format/FormatToken.cpp')
-rw-r--r-- | clang/lib/Format/FormatToken.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp index e6c72ab..49e0ce8 100644 --- a/clang/lib/Format/FormatToken.cpp +++ b/clang/lib/Format/FormatToken.cpp @@ -42,7 +42,7 @@ unsigned CommaSeparatedList::format(LineState &State, // Calculate the number of code points we have to format this list. As the // first token is already placed, we have to subtract it. unsigned RemainingCodePoints = Style.ColumnLimit - State.Column + - State.NextToken->Previous->CodePointCount; + State.NextToken->Previous->ColumnWidth; // Find the best ColumnFormat, i.e. the best number of columns to use. const ColumnFormat *Format = getColumnFormat(RemainingCodePoints); @@ -82,7 +82,7 @@ unsigned CommaSeparatedList::format(LineState &State, static unsigned CodePointsBetween(const FormatToken *Begin, const FormatToken *End) { assert(End->TotalLength >= Begin->TotalLength); - return End->TotalLength - Begin->TotalLength + Begin->CodePointCount; + return End->TotalLength - Begin->TotalLength + Begin->ColumnWidth; } void CommaSeparatedList::precomputeFormattingInfos(const FormatToken *Token) { |