aboutsummaryrefslogtreecommitdiff
path: root/examples/clang-interpreter/main.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-12 06:18:40 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-12 06:18:40 +0000
commitbcfdd263b79c766db9154b009bd831ef83090c83 (patch)
tree24b0b37482c08593683b605e7ab553f7e273fb51 /examples/clang-interpreter/main.cpp
parent5e9f91c342f8efffe0423d516997ddbc408c9f53 (diff)
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 'examples/clang-interpreter/main.cpp')
0 files changed, 0 insertions, 0 deletions