Issue 63452
Summary [clang-format] Reference Alignment RAS_Right broken without PAS_Right
Labels new issue
Assignees
Reporter gedare
    When `ReferenceAlignment` is `Right` but `PointerAlignment` is `Left` or `Middle`, the alignment of references is broken when the width of the space after the reference is shorter than the width of the space after the pointer.

Example:
```
double *a;
int &b;
```

Output with: `clang-format -style="{BasedOnStyle: llvm, AlignConsecutiveDeclarations: {Enabled: true}, ReferenceAlignment: Right, PointerAlignment: Left}"`:
```
double* a;
int &   b;
```

Expected Output:
```
double* a;
int &b;
```

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to