Only keep empty lines in unwrapped lines if they preceed a line comment.
authorDaniel Jasper <djasper@google.com>
Tue, 26 Feb 2013 13:10:34 +0000 (13:10 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 26 Feb 2013 13:10:34 +0000 (13:10 +0000)
commitfb5e241183e67c94159448e7a8113bef2c381ffe
tree8a1e347996a64e4da561889b325442268b42d30d
parent459df6f167d5a0984b979f0e4d6598903e5e40aa
Only keep empty lines in unwrapped lines if they preceed a line comment.

Empty lines followed by line comments are often used to highlight the
comment. Empty lines somewhere else are usually left over from manual or
automatic formatting and should probably be removed.

Before (clang-format would keep):
S s = {
  a,

  b
};

After:
S s = { a, b };

llvm-svn: 176086
clang/lib/Format/Format.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp