Skip to content
Snippets Groups Projects
Commit 6614c72d authored by Krasimir Georgiev's avatar Krasimir Georgiev
Browse files

[clang-format] Reformat BreakableToken.h; NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297262 91177308-0d34-0410-b5e6-96231b3b80d8
parent 79a6eca3
No related branches found
No related tags found
No related merge requests found
...@@ -118,10 +118,9 @@ public: ...@@ -118,10 +118,9 @@ public:
/// ///
/// A result having offset == StringRef::npos means that no piece of the line /// A result having offset == StringRef::npos means that no piece of the line
/// needs to be reformatted before any breaks are made. /// needs to be reformatted before any breaks are made.
virtual Split getSplitBefore(unsigned LineIndex, virtual Split getSplitBefore(unsigned LineIndex, unsigned PreviousEndColumn,
unsigned PreviousEndColumn,
unsigned ColumnLimit, unsigned ColumnLimit,
llvm::Regex& CommentPragmasRegex) const { llvm::Regex &CommentPragmasRegex) const {
return Split(StringRef::npos, 0); return Split(StringRef::npos, 0);
} }
...@@ -130,10 +129,10 @@ public: ...@@ -130,10 +129,10 @@ public:
/// \p SplitBefore has been reformatted, but before any breaks are made to /// \p SplitBefore has been reformatted, but before any breaks are made to
/// this line. /// this line.
virtual unsigned getLineLengthAfterSplitBefore(unsigned LineIndex, virtual unsigned getLineLengthAfterSplitBefore(unsigned LineIndex,
unsigned TailOffset, unsigned TailOffset,
unsigned PreviousEndColumn, unsigned PreviousEndColumn,
unsigned ColumnLimit, unsigned ColumnLimit,
Split SplitBefore) const { Split SplitBefore) const {
return getLineLengthAfterSplit(LineIndex, TailOffset, StringRef::npos); return getLineLengthAfterSplit(LineIndex, TailOffset, StringRef::npos);
} }
...@@ -142,8 +141,7 @@ public: ...@@ -142,8 +141,7 @@ public:
/// whitespace range \p SplitBefore. /// whitespace range \p SplitBefore.
virtual void replaceWhitespaceBefore(unsigned LineIndex, virtual void replaceWhitespaceBefore(unsigned LineIndex,
unsigned PreviousEndColumn, unsigned PreviousEndColumn,
unsigned ColumnLimit, unsigned ColumnLimit, Split SplitBefore,
Split SplitBefore,
WhitespaceManager &Whitespaces) {} WhitespaceManager &Whitespaces) {}
/// \brief Updates the next token of \p State to the next token after this /// \brief Updates the next token of \p State to the next token after this
...@@ -291,8 +289,7 @@ public: ...@@ -291,8 +289,7 @@ public:
bool InPPDirective, encoding::Encoding Encoding, bool InPPDirective, encoding::Encoding Encoding,
const FormatStyle &Style); const FormatStyle &Style);
unsigned getLineLengthAfterSplit(unsigned LineIndex, unsigned getLineLengthAfterSplit(unsigned LineIndex, unsigned TailOffset,
unsigned TailOffset,
StringRef::size_type Length) const override; StringRef::size_type Length) const override;
void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split, void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split,
WhitespaceManager &Whitespaces) override; WhitespaceManager &Whitespaces) override;
...@@ -305,8 +302,7 @@ public: ...@@ -305,8 +302,7 @@ public:
unsigned ColumnLimit, unsigned ColumnLimit,
Split SplitBefore) const override; Split SplitBefore) const override;
void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn, void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn,
unsigned ColumnLimit, unsigned ColumnLimit, Split SplitBefore,
Split SplitBefore,
WhitespaceManager &Whitespaces) override; WhitespaceManager &Whitespaces) override;
bool mayReflow(unsigned LineIndex, bool mayReflow(unsigned LineIndex,
llvm::Regex &CommentPragmasRegex) const override; llvm::Regex &CommentPragmasRegex) const override;
...@@ -324,8 +320,7 @@ private: ...@@ -324,8 +320,7 @@ private:
// Computes the end column if the full Content from LineIndex gets reflown // Computes the end column if the full Content from LineIndex gets reflown
// after PreviousEndColumn. // after PreviousEndColumn.
unsigned getReflownColumn(StringRef Content, unsigned getReflownColumn(StringRef Content, unsigned LineIndex,
unsigned LineIndex,
unsigned PreviousEndColumn) const; unsigned PreviousEndColumn) const;
unsigned getContentStartColumn(unsigned LineIndex, unsigned getContentStartColumn(unsigned LineIndex,
...@@ -362,22 +357,22 @@ public: ...@@ -362,22 +357,22 @@ public:
bool InPPDirective, encoding::Encoding Encoding, bool InPPDirective, encoding::Encoding Encoding,
const FormatStyle &Style); const FormatStyle &Style);
unsigned getLineLengthAfterSplit(unsigned LineIndex, unsigned getLineLengthAfterSplit(unsigned LineIndex, unsigned TailOffset,
unsigned TailOffset,
StringRef::size_type Length) const override; StringRef::size_type Length) const override;
void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split, void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split,
WhitespaceManager &Whitespaces) override; WhitespaceManager &Whitespaces) override;
Split getSplitBefore(unsigned LineIndex, unsigned PreviousEndColumn, Split getSplitBefore(unsigned LineIndex, unsigned PreviousEndColumn,
unsigned ColumnLimit, unsigned ColumnLimit,
llvm::Regex &CommentPragmasRegex) const override; llvm::Regex &CommentPragmasRegex) const override;
unsigned getLineLengthAfterSplitBefore(unsigned LineIndex, unsigned TailOffset, unsigned getLineLengthAfterSplitBefore(unsigned LineIndex,
unsigned TailOffset,
unsigned PreviousEndColumn, unsigned PreviousEndColumn,
unsigned ColumnLimit, unsigned ColumnLimit,
Split SplitBefore) const override; Split SplitBefore) const override;
void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn, void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn,
unsigned ColumnLimit, Split SplitBefore, unsigned ColumnLimit, Split SplitBefore,
WhitespaceManager &Whitespaces) override; WhitespaceManager &Whitespaces) override;
void updateNextToken(LineState& State) const override; void updateNextToken(LineState &State) const override;
bool mayReflow(unsigned LineIndex, bool mayReflow(unsigned LineIndex,
llvm::Regex &CommentPragmasRegex) const override; llvm::Regex &CommentPragmasRegex) const override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment