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 | bcfdd263b79c766db9154b009bd831ef83090c83 (patch) | |
| tree | 24b0b37482c08593683b605e7ab553f7e273fb51 /lib/CodeGen/CodeGenModule.h | |
| parent | 5e9f91c342f8efffe0423d516997ddbc408c9f53 (diff) | |
| download | clang-bcfdd263b79c766db9154b009bd831ef83090c83.tar.gz clang-bcfdd263b79c766db9154b009bd831ef83090c83.tar.bz2 clang-bcfdd263b79c766db9154b009bd831ef83090c83.tar.xz | |
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];
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions
