<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/85761>85761</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] `PointerAlignment` does not respect pointer to member field
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CDAlexanderW
</td>
</tr>
</table>
<pre>
### Environment
The tested v19 clang-format executable was built from latest source of 13.03.2024. Also tested with clang-format 17.0.3.
Setting in .clang-format is:
```
Language: Cpp
PointerAlignment: Left
SpaceAroundPointerQualifiers: Before
```
### Problem
```
class A {
public:
int B;
};
void function(int A::* parameter, int* parameter2) {
int A::* variable = &A::B;
int* A::B;
}
```
formats to
```
class A {
public:
int B;
};
void function(int A::*parameter, int* parameter2) {
int A::*variable = &A::B;
int* A::B;
}
```
For the pointers to member field we expect the space between the `::*` and the `variable/parameter` name to be there and NOT removed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VMtu2zoQ_RpqM4hAkZZsLbSQ4-tVcG8uEqBrihzJLChSICk7_ftCD8dxk13RAoQewzOPc4YcEYLuLGJF8j3JD4kY48n56vFQG3wTVqH_ljRO_agI48uCf-xZe2d7tJHQA6H16wkhYoio4JyVII2w3UPrfC8i4BvKMYrGIFxEgGbUJkLrXQ9GTD4Q3Oglgmsh4ynlKaNsk0JtgrvGvOh4ug-abVOa8nTJvjxfMEZtO9AW0jusDoSvGFLQdc2_T8J2o-iQ8Boeh2ExPjttI_ra6G5hyGt4wnZl-jIIibV3o1Ur8P9RGN1q9FMa2GPrPH6Z7abfs3eNwf5LlDQiBKiBbPeLYRgbo-U7BQBtI-wJX7fJ9vD-fXZaQTtaGbWzhO0mZD158pqwGgbhRY8RPWGPU5Q7GyOsvCVdsnzwPQuv5x4SfgDCinXrVgdcI37amSr8iunSngDRwV9W4jeE-AM6HJ2HeEIYlvM0C9Jj36CHVqNRcEHAtwFlnGFhOoHQYLwg2tkyRbrWRwoKwqqr_VouYccb6YKCFT1OeRqckB5nn3__ewWPvTujShNVcVXyUiRYZduM7jYsy1lyqqgqmMISt9lGtSh3RcF5mec0p2VT5lIlupouMOVZScs8z1nKNiibskS-U6KUUpINxV5okxpz7lPnu0SHMGK1y7dFlhjRoAnzMGLs4z0mjE3jyVeT20MzdoFsqNEhhlugqKOZB9mdY36YpPh0rwsKymEA6yJ4DLPAaw9-bUEyelOdYhzmUcKOhB07HU9jk0rXE3acClhfD4N331FGwo4zrUDYcWb2MwAA__-KDpmJ">