From: Krasimir Georgiev Date: Wed, 8 Mar 2017 08:58:44 +0000 (+0000) Subject: [clang-format] Reformat BreakableToken.h; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6614c72da500d322713a1e833e5e223d9943fe0d;p=clang [clang-format] Reformat BreakableToken.h; NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297262 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Format/BreakableToken.h b/lib/Format/BreakableToken.h index f4dd01b64c..e642a538e2 100644 --- a/lib/Format/BreakableToken.h +++ b/lib/Format/BreakableToken.h @@ -118,10 +118,9 @@ public: /// /// A result having offset == StringRef::npos means that no piece of the line /// needs to be reformatted before any breaks are made. - virtual Split getSplitBefore(unsigned LineIndex, - unsigned PreviousEndColumn, + virtual Split getSplitBefore(unsigned LineIndex, unsigned PreviousEndColumn, unsigned ColumnLimit, - llvm::Regex& CommentPragmasRegex) const { + llvm::Regex &CommentPragmasRegex) const { return Split(StringRef::npos, 0); } @@ -130,10 +129,10 @@ public: /// \p SplitBefore has been reformatted, but before any breaks are made to /// this line. virtual unsigned getLineLengthAfterSplitBefore(unsigned LineIndex, - unsigned TailOffset, - unsigned PreviousEndColumn, - unsigned ColumnLimit, - Split SplitBefore) const { + unsigned TailOffset, + unsigned PreviousEndColumn, + unsigned ColumnLimit, + Split SplitBefore) const { return getLineLengthAfterSplit(LineIndex, TailOffset, StringRef::npos); } @@ -142,8 +141,7 @@ public: /// whitespace range \p SplitBefore. virtual void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn, - unsigned ColumnLimit, - Split SplitBefore, + unsigned ColumnLimit, Split SplitBefore, WhitespaceManager &Whitespaces) {} /// \brief Updates the next token of \p State to the next token after this @@ -291,8 +289,7 @@ public: bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style); - unsigned getLineLengthAfterSplit(unsigned LineIndex, - unsigned TailOffset, + unsigned getLineLengthAfterSplit(unsigned LineIndex, unsigned TailOffset, StringRef::size_type Length) const override; void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) override; @@ -305,8 +302,7 @@ public: unsigned ColumnLimit, Split SplitBefore) const override; void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn, - unsigned ColumnLimit, - Split SplitBefore, + unsigned ColumnLimit, Split SplitBefore, WhitespaceManager &Whitespaces) override; bool mayReflow(unsigned LineIndex, llvm::Regex &CommentPragmasRegex) const override; @@ -324,8 +320,7 @@ private: // Computes the end column if the full Content from LineIndex gets reflown // after PreviousEndColumn. - unsigned getReflownColumn(StringRef Content, - unsigned LineIndex, + unsigned getReflownColumn(StringRef Content, unsigned LineIndex, unsigned PreviousEndColumn) const; unsigned getContentStartColumn(unsigned LineIndex, @@ -362,22 +357,22 @@ public: bool InPPDirective, encoding::Encoding Encoding, const FormatStyle &Style); - unsigned getLineLengthAfterSplit(unsigned LineIndex, - unsigned TailOffset, + unsigned getLineLengthAfterSplit(unsigned LineIndex, unsigned TailOffset, StringRef::size_type Length) const override; void insertBreak(unsigned LineIndex, unsigned TailOffset, Split Split, WhitespaceManager &Whitespaces) override; Split getSplitBefore(unsigned LineIndex, unsigned PreviousEndColumn, unsigned ColumnLimit, llvm::Regex &CommentPragmasRegex) const override; - unsigned getLineLengthAfterSplitBefore(unsigned LineIndex, unsigned TailOffset, + unsigned getLineLengthAfterSplitBefore(unsigned LineIndex, + unsigned TailOffset, unsigned PreviousEndColumn, unsigned ColumnLimit, Split SplitBefore) const override; void replaceWhitespaceBefore(unsigned LineIndex, unsigned PreviousEndColumn, unsigned ColumnLimit, Split SplitBefore, WhitespaceManager &Whitespaces) override; - void updateNextToken(LineState& State) const override; + void updateNextToken(LineState &State) const override; bool mayReflow(unsigned LineIndex, llvm::Regex &CommentPragmasRegex) const override;