summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-03-14 00:40:32 +0000
committerDaniel Jasper <djasper@google.com>2017-03-14 00:40:32 +0000
commitc79e4d2d253d234c3f5bef70ab1d5fbb582cd279 (patch)
tree4cb6f628ac9faacd6226c32ca01a51e54baee80d /clang/lib
parent54e22f33d9bf2e1225e58d8cb69dad0c64886fcc (diff)
downloadbcm5719-llvm-c79e4d2d253d234c3f5bef70ab1d5fbb582cd279.tar.gz
bcm5719-llvm-c79e4d2d253d234c3f5bef70ab1d5fbb582cd279.zip
clang-format: Make it very slighly more expensive to wrap between "= {".
This prevents unwanted fallout from r296664. Specifically in proto formatting, this changed: optional Aaaaaaaa aaaaaaaa = 12 [ (aaa) = aaaa, (bbbbbbbbbbbbbbbbbbbbbbbbbb) = { aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true } ]; Into: optional Aaaaaaaa aaaaaaaa = 12 [ (aaa) = aaaa, (bbbbbbbbbbbbbbbbbbbbbbbbbb) = {aaaaaaaaaaaaaaaaa: true, aaaaaaaaaaaaaaaa: true} ]; Which is considered less readable. Generally, it seems preferable to format such dict literals as blocks rather than contract them to one line. llvm-svn: 297696
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index ed9788d7476..228425bc473 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1976,7 +1976,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line,
if (Right.is(TT_LambdaArrow))
return 110;
if (Left.is(tok::equal) && Right.is(tok::l_brace))
- return 150;
+ return 160;
if (Left.is(TT_CastRParen))
return 100;
if (Left.is(tok::coloncolon) ||
OpenPOWER on IntegriCloud