summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2017-02-21 10:54:50 +0000
committerKrasimir Georgiev <krasimir@google.com>2017-02-21 10:54:50 +0000
commit4b159228389a982b7305bd876dadf5137b41708d (patch)
treeb4f095ec5dc22960e7aa0373653c18bad01f1a74 /clang/lib/Format
parent9e52c39f0a2535b2514740c62653bc4f7b030c9e (diff)
downloadbcm5719-llvm-4b159228389a982b7305bd876dadf5137b41708d.tar.gz
bcm5719-llvm-4b159228389a982b7305bd876dadf5137b41708d.zip
[clang-format] Remove unused member variables from BreakableToken
llvm-svn: 295714
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/BreakableToken.cpp12
-rw-r--r--clang/lib/Format/BreakableToken.h14
2 files changed, 6 insertions, 20 deletions
diff --git a/clang/lib/Format/BreakableToken.cpp b/clang/lib/Format/BreakableToken.cpp
index 42e6a2140af..290df1e1581 100644
--- a/clang/lib/Format/BreakableToken.cpp
+++ b/clang/lib/Format/BreakableToken.cpp
@@ -223,13 +223,11 @@ void BreakableStringLiteral::insertBreak(unsigned LineIndex,
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::BreakableBlockComment(
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::BreakableLineCommentSection(
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;
diff --git a/clang/lib/Format/BreakableToken.h b/clang/lib/Format/BreakableToken.h
index 3f83cfe9013..e30c6171fcd 100644
--- a/clang/lib/Format/BreakableToken.h
+++ b/clang/lib/Format/BreakableToken.h
@@ -210,12 +210,9 @@ class BreakableComment : public BreakableToken {
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
OpenPOWER on IntegriCloud