summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbplatform.py
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2018-02-09 15:41:56 +0000
committerFrancois Ferrand <thetypz@gmail.com>2018-02-09 15:41:56 +0000
commit38d801345880b8f3528f56af4f67ec4b0b79a577 (patch)
tree2e3b71667aea8d9d398477c23e3738c1518040d6 /lldb/packages/Python/lldbsuite/test/lldbplatform.py
parent6f374a3d7588a41aa7509da86d6f3387c538fa47 (diff)
downloadbcm5719-llvm-38d801345880b8f3528f56af4f67ec4b0b79a577.tar.gz
bcm5719-llvm-38d801345880b8f3528f56af4f67ec4b0b79a577.zip
clang-format: keep ObjC colon alignment with short object name
Summary: When the target object expression is short and the first selector name is long, clang-format used to break the colon alignment: [I performSelectorOnMainThread:@selector(loadAccessories) withObject:nil waitUntilDone:false]; This happens because the colon is placed at `ContinuationIndent + LongestObjCSelectorName`, so that any selector can be wrapped. This is however not needed in case the longest selector is the firstone, and not wrapped. To overcome this, this patch does not include the first selector in `LongestObjCSelectorName` computation (in TokenAnnotator), and lets `ContinuationIndenter` decide how to account for the first selector when wrapping. (Note this was already partly the case, see line 521 of ContinuationIndenter.cpp) This way, the code gets properly aligned whenever possible without breaking the continuation indent. [I performSelectorOnMainThread:@selector(loadAccessories) withObject:nil waitUntilDone:false]; [I // force break performSelectorOnMainThread:@selector(loadAccessories) withObject:nil waitUntilDone:false]; [I perform:@selector(loadAccessories) withSelectorOnMainThread:true waitUntilDone:false]; Reviewers: krasimir, djasper, klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43121 llvm-svn: 324741
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbplatform.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud