]> granicus.if.org Git - clang/commit
clang-format: Prefer an additional line-break over hanging indent.
authorDaniel Jasper <djasper@google.com>
Thu, 3 Apr 2014 12:00:33 +0000 (12:00 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 3 Apr 2014 12:00:33 +0000 (12:00 +0000)
commit0e8e53bc16e589b64f9263c0fb8d574f28b64260
tree4a8a21d069641479acf6df74486cdbd4a732228e
parentd28a215437031f02229547fc224bc117bddcd4c0
clang-format: Prefer an additional line-break over hanging indent.

Don't allow the RHS of an operator to be split over multiple
lines unless there is a line-break right after the operator.

Before:
  if (aaaa && bbbbb || // break
                  cccc) {
  }

After:
  if (aaaa &&
      bbbbb || // break
          cccc) {
  }

In most cases, this seems to increase readability.

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