Remove the trailing whitespace of formatted lines.
authorDaniel Jasper <djasper@google.com>
Thu, 14 Feb 2013 09:58:41 +0000 (09:58 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 14 Feb 2013 09:58:41 +0000 (09:58 +0000)
commit2457010b1cdb8d698349fd02a2ed70325ac9fab1
treef7b7c557140ad01e6ed2b1268e65ff3b2bcdda0c
parent66e9dee707661e91f774dbf243d68ce669e2b3ff
Remove the trailing whitespace of formatted lines.

So far, clang-format has always assumed the whitespace belonging to the
subsequent token. This has the negative side-effect that when
clang-format formats a line, it does not remove its trailing whitespace,
as it belongs to the next token.

Thus, this patch fixes most of llvm.org/PR15062.

We are not zapping a file's trailing whitespace so far, as this does not
belong to any token we see during formatting. We need to fix this in a
subsequent patch.

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