forked from OSchip/llvm-project
Fix formatting of ObjC method calls.
This fixes llvm.org/PR15165. We now correctly align: [image_rep drawInRect:drawRect fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0 ssssssssdd:NO hints:nil]; llvm-svn: 174513
This commit is contained in:
parent
d265090cd6
commit
c485b4e5b8
|
@ -488,7 +488,7 @@ private:
|
|||
State.Stack.back().Indent + Current.LongestObjCSelectorName;
|
||||
else
|
||||
State.Stack.back().ColonPos =
|
||||
State.Column + Spaces + Current.LongestObjCSelectorName;
|
||||
State.Column + Spaces + Current.FormatTok.TokenLength;
|
||||
}
|
||||
|
||||
// FIXME: Do we need to do this for assignments nested in other
|
||||
|
|
|
@ -2381,6 +2381,12 @@ TEST_F(FormatTest, FormatObjCMethodExpr) {
|
|||
" selector:@selector(willEnterFullscreen)\n"
|
||||
" name:kWillEnterFullscreenNotification\n"
|
||||
" object:nil];");
|
||||
verifyFormat("[image_rep drawInRect:drawRect\n"
|
||||
" fromRect:NSZeroRect\n"
|
||||
" operation:NSCompositeCopy\n"
|
||||
" fraction:1.0\n"
|
||||
" respectFlipped:NO\n"
|
||||
" hints:nil];");
|
||||
}
|
||||
|
||||
TEST_F(FormatTest, ObjCAt) {
|
||||
|
|
Loading…
Reference in New Issue