diff options
| author | Daniel Jasper <djasper@google.com> | 2013-08-28 10:03:58 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-08-28 10:03:58 +0000 |
| commit | f54617858a0df936746b7f521a8ffb032289d02f (patch) | |
| tree | 6002ad7b7cc713ddbcdf239fa4bb972b2f3a03da /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 3b6b5dad09d314cb8055ed7500a03c3cf3daad0f (diff) | |
| download | clang-f54617858a0df936746b7f521a8ffb032289d02f.tar.gz clang-f54617858a0df936746b7f521a8ffb032289d02f.tar.bz2 clang-f54617858a0df936746b7f521a8ffb032289d02f.tar.xz | |
clang-format: Improve token breaking behavior.
Two changes:
* Don't add an extra penalty on breaking the same token multiple times.
Generally, we should prefer not to break, but once we break, the
normal line breaking penalties apply.
* Slightly increase the penalty for breaking comments. In general, the
author has put some thought into how to break the comment and we
should not overwrite this unnecessarily.
With a 40-column column limit, formatting
aaaaaa("aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa");
Leads to:
Before:
aaaaaa(
"aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa "
"aaaaaaaaaaaaaaaa");
After:
aaaaaa("aaaaaaaaaaaaaaaa "
"aaaaaaaaaaaaaaaa "
"aaaaaaaaaaaaaaaa");
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
