<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/78666>78666</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] Unexpected whitespace in csharp formatting result
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
magic-akari
</td>
</tr>
</table>
<pre>
## Search Words
- clang-format
- chsarp
- c#
## Version
```bash
clang-format --version
Homebrew clang-format version 17.0.6
```
## Input
https://github.com/AvaloniaUI/Avalonia/blob/1c792b294f82b26396e4f91032a2b535ea9c0669/src/Avalonia.Controls/Button.cs#L512
```csharp
namespace Avalonia.Controls
{
public class Button : ContentControl, ICommandSource, IClickableControl
{
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
{
var (oldFlyout, newFlyout) = change.GetOldAndNewValue<FlyoutBase?>();
}
}
}
```
## Output
```csharp
namespace Avalonia.Controls {
public class Button : ContentControl, ICommandSource, IClickableControl {
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) {
var (oldFlyout, newFlyout) = change.GetOldAndNewValue < FlyoutBase ? > ();
}
}
}
```
## Note
Please pay attention to the whitespace surrounding `FlyoutBase`.
This issue occurs in version 17, and it does not exist in version 16.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VU1v4zYQ_TX0ZWBBJi1aOujg2FEboNgssN3tmR8TiV2KFEjK2fz7QpbjyGmxbYF2AcMin2beG86jSBGjaR1iTYo7UhxXYkydD3UvWqPW4qsIZiW9fqkJZYQy-IQiqA5-80FHkh9Jvl-DssK16ycfepGuWBdFGK6zKfs8vvzPZF8wROPdBeP5_JMidjO0JIb1-rQM_9n3KAM-36jDJQQ2uyzP-Dviv6jgwQ1jWuJdSkMkbE9oQ2jTmtSNMlO-J7TZn4T1zojPD4sJoY20XhLabNSuopJW26eSSspZxXH7VG1yRgWVBStQVCrnvCK0iUEtKLKDdyl4Gwlt7saUvMtUJJT9UmzoTcmv61Cxu_bWiR7jIBTCn-nmrN3dPAAAGEZpjZpaFiPMWkDYHqYUdOmSSegBHg6-74XTn_wYFM6INeqrkBZfw660NxpnneATqoQa_AlDMBrh5I2GR_cx-AFDejl0wrWoCS1f63735v6ELu1DG0GdAUKrW4030ZMIQGjprW7six_TVK3D59dJBYQdLyzZT5gerd47_QGfvwg7ImGHOfBORCSsIeye0HJSY3fvBY8X4Dp6G3xnjz2O6d0m-7dOwv9n4o_y7r-yCwg7wJthQFgDhN3D33q2nPwj2z74hLDEP1qcFAfxAiJNnZ4OmuQhdQjPnUkX9-IYgh-dNq4FwvPF5uJ5tuT7tTMRTIwjgldqDBGMWxxgU1uE02ASaI8RnE-A30xMN2E8W-ma6YpVYoX1ZpcXnJUbXq66usrZVheyKFQppeK8VFRud8gkrWTBtFqZmuZ0m282Vb6ldFtmRcF4JXcFllyLShRkm2MvjM2sPfWZD-3qXG69KznnKysk2ni-Nyi9uQMonW6SUE9pazm2kWxza2KKb0TJJHu-c24SiyN8dvhtmPffoqnGwfytwByZpu4GjKNNqzHY-jvH9iR5eayH4H9HlQhtzguZTtzzWv4IAAD__1OlI1k">