diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-04-19 13:02:15 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-04-19 13:02:15 +0000 |
commit | 621030523b0e57672979c495778ba8f13d86afa4 (patch) | |
tree | 5a6cb6c351904c1ac4b8a2f0c7959011d854ffef /clang/lib/Format/UnwrappedLineFormatter.h | |
parent | d96ddccdb4e6c74e727d97cb811e400b15ab32f7 (diff) | |
download | bcm5719-llvm-621030523b0e57672979c495778ba8f13d86afa4.tar.gz bcm5719-llvm-621030523b0e57672979c495778ba8f13d86afa4.zip |
[clang-format] Don't remove empty lines before namespace endings
Summary: This implements an alternative to r327861, namely preserving empty lines before namespace endings.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D45373
llvm-svn: 330324
Diffstat (limited to 'clang/lib/Format/UnwrappedLineFormatter.h')
-rw-r--r-- | clang/lib/Format/UnwrappedLineFormatter.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.h b/clang/lib/Format/UnwrappedLineFormatter.h index 6432ca83a4c..756d99d6409 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.h +++ b/clang/lib/Format/UnwrappedLineFormatter.h @@ -49,8 +49,9 @@ private: /// \brief Add a new line and the required indent before the first Token /// of the \c UnwrappedLine if there was no structural parsing error. void formatFirstToken(const AnnotatedLine &Line, - const AnnotatedLine *PreviousLine, unsigned Indent, - unsigned NewlineIndent); + const AnnotatedLine *PreviousLine, + const SmallVectorImpl<AnnotatedLine *> &Lines, + unsigned Indent, unsigned NewlineIndent); /// \brief Returns the column limit for a line, taking into account whether we /// need an escaped newline due to a continued preprocessor directive. |