]> granicus.if.org Git - clang/commit
clang-format: Adapt line break penalties for LLVM style.
authorDaniel Jasper <djasper@google.com>
Fri, 25 Oct 2013 14:29:37 +0000 (14:29 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 25 Oct 2013 14:29:37 +0000 (14:29 +0000)
commit47066e46b9ce4f830ead3c7b9a4cb5bf0ac2c857
treee28949cdc69eb4a64d722e789b1ec54131eb94c6
parent9d33c40838367ffcc3206a7120a0ce32922b66d8
clang-format: Adapt line break penalties for LLVM style.

Specifically make clang-format less eager to break after the opening
parenthesis of a function call.

Before:
  aaaaaaaaaaaaaaaaa(
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
  aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +
                        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

Apparently that is preferable. This penalties are adapted
conservatively, we might have to increase them a little bit further.

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