diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-12 06:18:40 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-12 06:18:40 +0000 |
commit | a7252d836aa2af6db023205dee4b9a287f1037cb (patch) | |
tree | b53e414fbbc948d19e4bdcd9f48faa7a8d09924d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | eee7b81a168cc3f2a82882375109b9a059dde705 (diff) | |
download | bcm5719-llvm-a7252d836aa2af6db023205dee4b9a287f1037cb.tar.gz bcm5719-llvm-a7252d836aa2af6db023205dee4b9a287f1037cb.zip |
Formatter: Initial support for formatting Objective-C method expressions.
This follows the approach suggested by djasper in PR14911: When a '[' is
seen that's at the start of a line, follows a binary operator, or follows one
of : [ ( return throw, that '[' and its closing ']' are marked as
TT_ObjCMethodExpr and every ':' in that range that isn't part of a ternary
?: is marked as TT_ObjCMethodExpr as well.
Update the layout routines to not output spaces around ':' tokens that are
marked TT_ObjCMethodExpr, and only allow breaking after such tokens, not
before.
Before:
[self adjustButton : closeButton_ ofKind : NSWindowCloseButton];
Now:
[self adjustButton:closeButton_ ofKind:NSWindowCloseButton];
llvm-svn: 172304
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions