<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57301>57301</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format for obj-c binds : tighter than @selector
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format,
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
zmodem
</td>
</tr>
</table>
<pre>
Consider:
```
$ cat | buildtools/linux64/clang-format -style=chromium
void f() {
NSApplication* application = [NSApplication sharedApplication];
if ([application respondsToSelector:@selector(setAutomaticCustomizeTouchBarMenuItemEnabled:)]) {
[application setAutomaticCustomizeTouchBarMenuItemEnabled:YES];
}
}
```
the output is:
```
void f() {
NSApplication* application = [NSApplication sharedApplication];
if ([application respondsToSelector:@selector
(setAutomaticCustomizeTouchBarMenuItemEnabled:)]) {
[application setAutomaticCustomizeTouchBarMenuItemEnabled:YES];
}
}
```
it seems more desirably to keep the `@selector` with its argument, so e.g.
```
if ([application respondsToSelector:
@selector(setAutomaticCustomizeTouchBarMenuItemEnabled:)]) {
[application setAutomaticCustomizeTouchBarMenuItemEnabled:YES];
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzVVEtv3CAQ_jX4MlrLxmvv-uDDPhKph_ayufSIYdYmxcbikXTz64u92WelSJFyaC0EDDDfzHyfodbiUG10b6VAQ7IVSbYkOfVF8t6OJp0DZw7IYgO1l0o4rZUl9FHJ3v8u5mHGFeub2V6bLpybWXdQSLItb43upO-OMC9aCtgTuiS0DFjr4yrAj91qGJQMEaTuCV0Bu5gQUIDk65szYFtmUFx75VuSnQHlHsYo-foayKAddC_sk96hQu70VPQ8sSeLLi26lXc6lCD5xtswk2_4pD1v18x8x95_c9g99KxWKEZnWo5xb4sBuIv7SdCfD7vbYshi-67CeXKnztS7FkF7N3gH0n4s5z-uw5nIu-8_F0i6EAk7C502CAKtNAHyAE7DL8QBRgFHlysmigRepWtBOgvMNL7D3hG6AasB4yb-QOJPMH-h5cvvwpcS_Te7EVZpUaQ0L7N5EYkqE2VWsshJp7C6eZDCALp-nnGoZSAg_MwrcLJpHZrAO-uva4-8UVXr3DDdIvoYWhNE8HXMdTe-eerlNMwGo5-DUzCltR7HJzFfZEkatZWoC0RMirkQecJZVtY0ESnnmDNe7tMkUqxGZavAEaH0OttgjiKHocdXmIDHpXwbyYomlCZLmoWi83kep1RQzDjyPWJe7EUoAzsmVTxmF2vTRKaaEq19Y8OmktbZyyazVjY94pREwGfetdpUb50W2EVT5Gqq5w8HEOsz">