diff options
Diffstat (limited to 'lib/Format/BreakableToken.h')
-rw-r--r-- | lib/Format/BreakableToken.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/Format/BreakableToken.h b/lib/Format/BreakableToken.h index 10e1801780..72852d59f9 100644 --- a/lib/Format/BreakableToken.h +++ b/lib/Format/BreakableToken.h @@ -1,9 +1,8 @@ //===--- BreakableToken.h - Format C++ code ---------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// @@ -147,9 +146,7 @@ public: // * @param loooooooooooooong line // * continuation // */ - virtual unsigned getContentIndent(unsigned LineIndex) const { - return 0; - } + virtual unsigned getContentIndent(unsigned LineIndex) const { return 0; } /// Returns a range (offset, length) at which to break the line at /// \p LineIndex, if previously broken at \p TailOffset. If possible, do not @@ -203,9 +200,7 @@ public: /// Returns whether there will be a line break at the start of the /// token. - virtual bool introducesBreakBeforeToken() const { - return false; - } + virtual bool introducesBreakBeforeToken() const { return false; } /// Replaces the whitespace between \p LineIndex-1 and \p LineIndex. virtual void adaptStartOfLine(unsigned LineIndex, @@ -364,8 +359,11 @@ public: BreakableBlockComment(const FormatToken &Token, unsigned StartColumn, unsigned OriginalStartColumn, bool FirstInLine, bool InPPDirective, encoding::Encoding Encoding, - const FormatStyle &Style); + const FormatStyle &Style, bool UseCRLF); + Split getSplit(unsigned LineIndex, unsigned TailOffset, unsigned ColumnLimit, + unsigned ContentStartColumn, + llvm::Regex &CommentPragmasRegex) const override; unsigned getRangeLength(unsigned LineIndex, unsigned Offset, StringRef::size_type Length, unsigned StartColumn) const override; |