summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-06-24 09:15:49 +0000
committerDaniel Jasper <djasper@google.com>2014-06-24 09:15:49 +0000
commita2fb50f9b3eefae4146d001365a29d4a86c41fbe (patch)
treed2af83f3e6fdf58fcc0d55a5746ce017c0e14d22 /clang/lib
parentad8065f01a900cd6663e10f8fd857a0aba934bf8 (diff)
downloadbcm5719-llvm-a2fb50f9b3eefae4146d001365a29d4a86c41fbe.tar.gz
bcm5719-llvm-a2fb50f9b3eefae4146d001365a29d4a86c41fbe.zip
clang-format: Understand that breaking before lambdas is fine.
Before: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa([]( const aaaaaaaaaa &a) { return a; }); After: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa( [](const aaaaaaaaaa &a) { return a; }); llvm-svn: 211575
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 3793fe056ed..0760f35bbbc 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1315,7 +1315,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line,
if (Right.is(tok::l_square)) {
if (Style.Language == FormatStyle::LK_Proto)
return 1;
- if (Right.Type != TT_ObjCMethodExpr)
+ if (Right.Type != TT_ObjCMethodExpr && Right.Type != TT_LambdaLSquare)
return 500;
}
if (Right.Type == TT_StartOfName || Right.is(tok::kw_operator)) {
OpenPOWER on IntegriCloud