]> granicus.if.org Git - clang/commit
clang-format: Avoid line breaks before the first <<.
authorDaniel Jasper <djasper@google.com>
Thu, 11 Jul 2013 20:41:21 +0000 (20:41 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 11 Jul 2013 20:41:21 +0000 (20:41 +0000)
commitfaec47bcbadf462b3ac82618dcfca6ae3b8ce5d9
tree62935fdf67296db2502ed9f0ff43f8c00645f12f
parentf5200d6865fc5867ee022f876d2cdee94b48b1ee
clang-format: Avoid line breaks before the first <<.

This puts a slight penalty on the linebreak before the first "<<", so
that clang-format generally tries to keep things on the first line.

User feedback has shown that this is generally desirable.

Before:
  llvm::outs()
      << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =" << aaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
  llvm::outs() << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ="
               << aaaaaaaaaaaaaaaaaaaaaaaaaaa;

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