[PATCH] D48718: [clang-format/ObjC] Prohibit breaking after a bracket opening ObjC method expression
Jacek Olesiak via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 8 23:09:59 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336519: [clang-format/ObjC] Prohibit breaking after a bracket opening ObjC method… (authored by jolesiak, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D48718
Files:
cfe/trunk/lib/Format/ContinuationIndenter.cpp
Index: cfe/trunk/lib/Format/ContinuationIndenter.cpp
===================================================================
--- cfe/trunk/lib/Format/ContinuationIndenter.cpp
+++ cfe/trunk/lib/Format/ContinuationIndenter.cpp
@@ -321,6 +321,9 @@
State.Stack.back().NoLineBreakInOperand)
return false;
+ if (Previous.is(tok::l_square) && Previous.is(TT_ObjCMethodExpr))
+ return false;
+
return !State.Stack.back().NoLineBreak;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48718.154538.patch
Type: text/x-patch
Size: 448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180709/4bface01/attachment.bin>
More information about the cfe-commits
mailing list