[PATCH] D48718: [clang-format] Prohibit breaking after a bracket opening ObjC method expression
Jacek Olesiak via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 28 05:57:23 PDT 2018
jolesiak created this revision.
Herald added a subscriber: cfe-commits.
Repository:
rC Clang
https://reviews.llvm.org/D48718
Files:
lib/Format/ContinuationIndenter.cpp
Index: lib/Format/ContinuationIndenter.cpp
===================================================================
--- lib/Format/ContinuationIndenter.cpp
+++ 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.153301.patch
Type: text/x-patch
Size: 418 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180628/d7f5867f/attachment.bin>
More information about the cfe-commits
mailing list