diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-11-14 14:56:27 +0100 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-11-20 06:13:32 +0000 |
commit | 1817513d4f3a2e4e26be124dbe395340f798fd51 (patch) | |
tree | 949e5b784e36570f821b232ff1d776b81ef07c9a /lib/Format/UnwrappedLineParser.cpp | |
parent | c83dedaf74944420a172d8607a757fcc03e2f568 (diff) |
ClangFormat: Fix keeping line breaks for lambdas
Tweak the bahaviour of keeping line breaks for child tokens.
Change-Id: I38f073b2ad8f554c44abbc80cfae7e89273fc60f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index e5afa1264a..b363506bb2 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -2517,6 +2517,8 @@ void UnwrappedLineParser::nextToken(int LevelDifference) { else readTokenWithJavaScriptASI(); FormatTok->Previous = Previous; + if (FormatTok->NewlinesBefore && Style.KeepLineBreaksForNonEmptyLines) + FormatTok->MustBreakBefore = true; } void UnwrappedLineParser::distributeComments( |