diff options
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/UnwrappedLineFormatter.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp index b0da0028bf3..2ce39fb04c6 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.cpp +++ b/clang/lib/Format/UnwrappedLineFormatter.cpp @@ -1133,12 +1133,8 @@ void UnwrappedLineFormatter::formatFirstToken(const AnnotatedLine &Line, std::min(RootToken.NewlinesBefore, Style.MaxEmptyLinesToKeep + 1); // Remove empty lines before "}" where applicable. if (RootToken.is(tok::r_brace) && - // Look for "}", "} // comment", "};" or "}; // comment". (!RootToken.Next || - (RootToken.Next->is(tok::comment) && !RootToken.Next->Next) || - (RootToken.Next->is(tok::semi) && - (!RootToken.Next->Next || (RootToken.Next->Next->is(tok::comment) && - !RootToken.Next->Next->Next))))) + (RootToken.Next->is(tok::semi) && !RootToken.Next->Next))) Newlines = std::min(Newlines, 1u); // Remove empty lines at the start of nested blocks (lambdas/arrow functions) if (PreviousLine == nullptr && Line.Level > 0) |

