]> granicus.if.org Git - clang/commit
Fix clang-format bug in unwrapped-line merging.
authorDaniel Jasper <djasper@google.com>
Tue, 14 May 2013 09:30:02 +0000 (09:30 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 14 May 2013 09:30:02 +0000 (09:30 +0000)
commit1fb8d8814ae28a4ebe94652faafad8545a115bfe
tree16180a3abc0b42737856707915195e4a22a7f697
parentf7f295f321fd434e1e542844a71f538a56f2f8fb
Fix clang-format bug in unwrapped-line merging.

Before (in styles that allow it), clang-format would not merge an
if statement onto a single line, if only the second line was format
(e.g. in an editor integration):

if (a)
  return; // clang-format invoked on this line.

With this patch, this gets properly merged to:

if (a) return; // ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181770 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/Format.cpp
unittests/Format/FormatTest.cpp