Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 33c364f

Browse files
committed
[clang-format] Remove unused member variables from BreakableToken
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295714 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f0bd41d commit 33c364f

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

Diff for: lib/Format/BreakableToken.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,11 @@ void BreakableStringLiteral::insertBreak(unsigned LineIndex,
223223

224224
BreakableComment::BreakableComment(const FormatToken &Token,
225225
unsigned StartColumn,
226-
unsigned OriginalStartColumn,
227-
bool FirstInLine, bool InPPDirective,
226+
bool InPPDirective,
228227
encoding::Encoding Encoding,
229228
const FormatStyle &Style)
230229
: BreakableToken(Token, InPPDirective, Encoding, Style),
231-
StartColumn(StartColumn), OriginalStartColumn(OriginalStartColumn),
232-
FirstInLine(FirstInLine) {}
230+
StartColumn(StartColumn) {}
233231

234232
unsigned BreakableComment::getLineCount() const { return Lines.size(); }
235233

@@ -325,8 +323,7 @@ BreakableBlockComment::BreakableBlockComment(
325323
const FormatToken &Token, unsigned StartColumn,
326324
unsigned OriginalStartColumn, bool FirstInLine, bool InPPDirective,
327325
encoding::Encoding Encoding, const FormatStyle &Style)
328-
: BreakableComment(Token, StartColumn, OriginalStartColumn, FirstInLine,
329-
InPPDirective, Encoding, Style) {
326+
: BreakableComment(Token, StartColumn, InPPDirective, Encoding, Style) {
330327
assert(Tok.is(TT_BlockComment) &&
331328
"block comment section must start with a block comment");
332329

@@ -664,8 +661,7 @@ BreakableLineCommentSection::BreakableLineCommentSection(
664661
const FormatToken &Token, unsigned StartColumn,
665662
unsigned OriginalStartColumn, bool FirstInLine, bool InPPDirective,
666663
encoding::Encoding Encoding, const FormatStyle &Style)
667-
: BreakableComment(Token, StartColumn, OriginalStartColumn, FirstInLine,
668-
InPPDirective, Encoding, Style) {
664+
: BreakableComment(Token, StartColumn, InPPDirective, Encoding, Style) {
669665
assert(Tok.is(TT_LineComment) &&
670666
"line comment section must start with a line comment");
671667
FormatToken *LineTok = nullptr;

Diff for: lib/Format/BreakableToken.h

+2-12
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,9 @@ class BreakableComment : public BreakableToken {
210210
protected:
211211
/// \brief Creates a breakable token for a comment.
212212
///
213-
/// \p StartColumn specifies the column in which the comment will start
214-
/// after formatting, while \p OriginalStartColumn specifies in which
215-
/// column the comment started before formatting.
216-
/// If the comment starts a line after formatting, set \p FirstInLine to true.
213+
/// \p StartColumn specifies the column in which the comment will start after
214+
/// formatting.
217215
BreakableComment(const FormatToken &Token, unsigned StartColumn,
218-
unsigned OriginalStartColumn, bool FirstInLine,
219216
bool InPPDirective, encoding::Encoding Encoding,
220217
const FormatStyle &Style);
221218

@@ -275,13 +272,6 @@ class BreakableComment : public BreakableToken {
275272
// The intended start column of the first line of text from this section.
276273
unsigned StartColumn;
277274

278-
// The original start column of the first line of text from this section.
279-
unsigned OriginalStartColumn;
280-
281-
// Whether the first token of this section is the first token in its unwrapped
282-
// line.
283-
bool FirstInLine;
284-
285275
// The prefix to use in front a line that has been reflown up.
286276
// For example, when reflowing the second line after the first here:
287277
// // comment 1

0 commit comments

Comments
 (0)