diff options
| author | Daniel Jasper <djasper@google.com> | 2013-12-19 16:45:34 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-12-19 16:45:34 +0000 |
| commit | 19a541eff09b82f2271685333c4e9d446b2bad60 (patch) | |
| tree | bb9f7dc20ed38f679557e2eda2a65519d95f89ea /clang/lib | |
| parent | e6d79ec0ebac350355c76d8132e9f1cce62e0cac (diff) | |
| download | bcm5719-llvm-19a541eff09b82f2271685333c4e9d446b2bad60.tar.gz bcm5719-llvm-19a541eff09b82f2271685333c4e9d446b2bad60.zip | |
clang-format: Increase penalty for breaking comments.
Unexpectedly, it seems that people commonly know what they were doing
when writing a comment.
Also, being more conservative about comment breaking has the advantage
of giving more flexibility. If a linebreak within the comment can
improve formatting, the author can add it (after which clang-format
won't undo it). There is no way to override clang-format's behavior if
it breaks a comment.
llvm-svn: 197698
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 080769d159a..cff6fc5f6d9 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -276,7 +276,7 @@ FormatStyle getLLVMStyle() { LLVMStyle.ContinuationIndentWidth = 4; LLVMStyle.SpacesInAngles = false; - LLVMStyle.PenaltyBreakComment = 60; + LLVMStyle.PenaltyBreakComment = 300; LLVMStyle.PenaltyBreakFirstLessLess = 120; LLVMStyle.PenaltyBreakString = 1000; LLVMStyle.PenaltyExcessCharacter = 1000000; |

