Improve formatting of code with comments.
authorDaniel Jasper <djasper@google.com>
Tue, 29 Jan 2013 19:41:55 +0000 (19:41 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 29 Jan 2013 19:41:55 +0000 (19:41 +0000)
commitddaa9be9783928ecd802c433821fe7c8e05bf8b9
tree337f50329be1ff6925bbb2458d37cc5a11d0201a
parent9a7a7a9a6f81baa36cf9456da3d30d2a544ee64a
Improve formatting of code with comments.

Before:
aaaaaaa(aaaaaa( // comment
                aaaaaaa));
<big mess>

After:
aaaaaaa(aaaaaa( // comment
    aaaaaaaa));
function(/* parameter 1 */ aaaaaaa,
         /* parameter 2 */ aaaaaaa,
         /* parameter 3 */ aaaaaaa,
         /* parameter 4 */ aaaaaaa);

(the latter example was only wrong in the one-arg-per-line mode, e.g. in
Google style).

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