https://bugs.llvm.org/show_bug.cgi?id=50423
Bug ID: 50423
Summary: [Format/ObjC] Improve handling of block parameter
arguments
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: bhamilto...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
Objective-C block parameters to method definitions currently break after the
opening paren:
```
% clang-format -style=Google test.m
@property(nonatomic, readonly, nullable) NSString *AAAAAAAAAAA;
- (instancetype)AAAAAAAAAAAAAAAAAAAAAAAAAAA:(id)AAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA:(AAAAAAAAAAAAAAAA<AAAAAAAAAAAAAAAAAAAAAAAAA> *
(^)(
void))AAAAAAAAAAAAAAAAAAAAAAAAAAAAA {
}
```
I think it's OK to split the return type from the rest, but it looks odd to
split between the
`(^)(` and the parameter type `void)`. Ideally putting everyone on one line
would work:
```
@property(nonatomic, readonly, nullable) NSString *AAAAAAAAAAA;
- (instancetype)AAAAAAAAAAAAAAAAAAAAAAAAAAA:(id)AAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA:
(AAAAAAAAAAAAAAAA<AAAAAAAAAAAAAAAAAAAAAAAAA>
*(^)(void))AAAAAAAAAAAAAAAAAAAAAAAAAAAAA {
}
```
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs