summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-06 16:00:26 +0000
committerDaniel Jasper <djasper@google.com>2013-02-06 16:00:26 +0000
commitc485b4e5b8adf751794c2fab702b2ef62deb3fa7 (patch)
tree17a3831426a5519cd0a8ec3d1aa939cf18c4ef41 /clang/lib/Format/Format.cpp
parentd265090cd67ebb3f2dd280a30722b07f080eefce (diff)
downloadbcm5719-llvm-c485b4e5b8adf751794c2fab702b2ef62deb3fa7.tar.gz
bcm5719-llvm-c485b4e5b8adf751794c2fab702b2ef62deb3fa7.zip
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
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index eac822c5b72..3660b4ac03e 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -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
OpenPOWER on IntegriCloud