r295714 - [clang-format] Remove unused member variables from BreakableToken
Krasimir Georgiev via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 21 02:54:51 PST 2017
Author: krasimir
Date: Tue Feb 21 04:54:50 2017
New Revision: 295714
URL: http://llvm.org/viewvc/llvm-project?rev=295714&view=rev
Log:
[clang-format] Remove unused member variables from BreakableToken
Modified:
cfe/trunk/lib/Format/BreakableToken.cpp
cfe/trunk/lib/Format/BreakableToken.h
Modified: cfe/trunk/lib/Format/BreakableToken.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/BreakableToken.cpp?rev=295714&r1=295713&r2=295714&view=diff
==============================================================================
--- cfe/trunk/lib/Format/BreakableToken.cpp (original)
+++ cfe/trunk/lib/Format/BreakableToken.cpp Tue Feb 21 04:54:50 2017
@@ -223,13 +223,11 @@ void BreakableStringLiteral::insertBreak
BreakableComment::BreakableComment(const FormatToken &Token,
unsigned StartColumn,
- unsigned OriginalStartColumn,
- bool FirstInLine, bool InPPDirective,
+ bool InPPDirective,
encoding::Encoding Encoding,
const FormatStyle &Style)
: BreakableToken(Token, InPPDirective, Encoding, Style),
- StartColumn(StartColumn), OriginalStartColumn(OriginalStartColumn),
- FirstInLine(FirstInLine) {}
+ StartColumn(StartColumn) {}
unsigned BreakableComment::getLineCount() const { return Lines.size(); }
@@ -325,8 +323,7 @@ BreakableBlockComment::BreakableBlockCom
const FormatToken &Token, unsigned StartColumn,
unsigned OriginalStartColumn, bool FirstInLine, bool InPPDirective,
encoding::Encoding Encoding, const FormatStyle &Style)
- : BreakableComment(Token, StartColumn, OriginalStartColumn, FirstInLine,
- InPPDirective, Encoding, Style) {
+ : BreakableComment(Token, StartColumn, InPPDirective, Encoding, Style) {
assert(Tok.is(TT_BlockComment) &&
"block comment section must start with a block comment");
@@ -664,8 +661,7 @@ BreakableLineCommentSection::BreakableLi
const FormatToken &Token, unsigned StartColumn,
unsigned OriginalStartColumn, bool FirstInLine, bool InPPDirective,
encoding::Encoding Encoding, const FormatStyle &Style)
- : BreakableComment(Token, StartColumn, OriginalStartColumn, FirstInLine,
- InPPDirective, Encoding, Style) {
+ : BreakableComment(Token, StartColumn, InPPDirective, Encoding, Style) {
assert(Tok.is(TT_LineComment) &&
"line comment section must start with a line comment");
FormatToken *LineTok = nullptr;
Modified: cfe/trunk/lib/Format/BreakableToken.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/BreakableToken.h?rev=295714&r1=295713&r2=295714&view=diff
==============================================================================
--- cfe/trunk/lib/Format/BreakableToken.h (original)
+++ cfe/trunk/lib/Format/BreakableToken.h Tue Feb 21 04:54:50 2017
@@ -210,12 +210,9 @@ class BreakableComment : public Breakabl
protected:
/// \brief Creates a breakable token for a comment.
///
- /// \p StartColumn specifies the column in which the comment will start
- /// after formatting, while \p OriginalStartColumn specifies in which
- /// column the comment started before formatting.
- /// If the comment starts a line after formatting, set \p FirstInLine to true.
+ /// \p StartColumn specifies the column in which the comment will start after
+ /// formatting.
BreakableComment(const FormatToken &Token, unsigned StartColumn,
- unsigned OriginalStartColumn, bool FirstInLine,
bool InPPDirective, encoding::Encoding Encoding,
const FormatStyle &Style);
@@ -275,13 +272,6 @@ protected:
// The intended start column of the first line of text from this section.
unsigned StartColumn;
- // The original start column of the first line of text from this section.
- unsigned OriginalStartColumn;
-
- // Whether the first token of this section is the first token in its unwrapped
- // line.
- bool FirstInLine;
-
// The prefix to use in front a line that has been reflown up.
// For example, when reflowing the second line after the first here:
// // comment 1
More information about the cfe-commits
mailing list