diff options
author | Daniel Jasper <djasper@google.com> | 2013-11-08 17:33:24 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-11-08 17:33:24 +0000 |
commit | 4478e5245e208e63d4fe7cdc218f7e9a7aa29978 (patch) | |
tree | 911b39c9fbdd118fa09164d5c625c335972c5a33 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 09e604333e56396c88ed4b53dfdf4b2cb0d4370c (diff) | |
download | bcm5719-llvm-4478e5245e208e63d4fe7cdc218f7e9a7aa29978.tar.gz bcm5719-llvm-4478e5245e208e63d4fe7cdc218f7e9a7aa29978.zip |
clang-format: Improve linebreaking and indentation for ObjC calls.
Before:
popup_wdow_.reset([[RenderWidgetPopupWindow alloc]
iniithContentRect:
NSMakRet(origin_global.x, origin_global.y, pos.width(), pos.height())
syeMask:NSBorderlessWindowMask
bking:NSBackingStoreBuffered
der:NO]);
[self param:function( //
parameter)]
After:
popup_wdow_.reset([[RenderWidgetPopupWindow alloc]
iniithContentRect:NSMakRet(origin_global.x, origin_global.y, pos.width(),
pos.height())
syeMask:NSBorderlessWindowMask
bking:NSBackingStoreBuffered
der:NO]);
[self param:function( //
parameter)]
llvm-svn: 194267
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index d075c7482d0..63232beb9f0 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -277,7 +277,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, // Treat the condition inside an if as if it was a second function // parameter, i.e. let nested calls have a continuation indent. State.Stack.back().LastSpace = State.Column + 1; // 1 is length of "(". - else if (Previous.is(tok::comma)) + else if (Previous.is(tok::comma) || Previous.Type == TT_ObjCMethodExpr) State.Stack.back().LastSpace = State.Column; else if ((Previous.Type == TT_BinaryOperator || Previous.Type == TT_ConditionalExpr || |